🔖 项目重命名.
This commit is contained in:
24
orion-visor-ui/src/api/meta/expression.ts
Normal file
24
orion-visor-ui/src/api/meta/expression.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* cron 下次执行时间请求对象
|
||||
*/
|
||||
export interface CronNextRequest {
|
||||
expression: number;
|
||||
times: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* cron 下次执行时间响应对象
|
||||
*/
|
||||
export interface CronNextResponse {
|
||||
valid: boolean;
|
||||
next: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 cron 下次执行时间
|
||||
*/
|
||||
export function getCronNextTime(request: CronNextRequest) {
|
||||
return axios.get<CronNextResponse>('/infra/expression/cron-next', { params: request });
|
||||
}
|
||||
25
orion-visor-ui/src/api/meta/favorite.ts
Normal file
25
orion-visor-ui/src/api/meta/favorite.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export type FavoriteType = 'HOST'
|
||||
|
||||
/**
|
||||
* 收藏操作对象
|
||||
*/
|
||||
export interface FavoriteOperatorRequest {
|
||||
relId: number;
|
||||
type: FavoriteType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加收藏
|
||||
*/
|
||||
export function addFavorite(request: FavoriteOperatorRequest) {
|
||||
return axios.put('/infra/favorite/add', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏
|
||||
*/
|
||||
export function cancelFavorite(request: FavoriteOperatorRequest) {
|
||||
return axios.put('/infra/favorite/cancel', request);
|
||||
}
|
||||
30
orion-visor-ui/src/api/meta/history-value.ts
Normal file
30
orion-visor-ui/src/api/meta/history-value.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 历史归档查询请求
|
||||
*/
|
||||
export interface HistoryValueQueryRequest extends Pagination {
|
||||
searchValue?: string;
|
||||
relId?: number;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史归档查询响应
|
||||
*/
|
||||
export interface HistoryValueQueryResponse extends TableData {
|
||||
id: number;
|
||||
beforeValue: string;
|
||||
afterValue: string;
|
||||
createTime: number;
|
||||
creator: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询历史归档
|
||||
*/
|
||||
export function getHistoryValuePage(request: HistoryValueQueryRequest) {
|
||||
return axios.post<DataGrid<HistoryValueQueryResponse>>('/infra/history-value/query', request);
|
||||
}
|
||||
33
orion-visor-ui/src/api/meta/tag.ts
Normal file
33
orion-visor-ui/src/api/meta/tag.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export type TagType = 'HOST' | string
|
||||
|
||||
/**
|
||||
* tag 创建对象
|
||||
*/
|
||||
export interface TagCreateRequest {
|
||||
name: number;
|
||||
type: TagType;
|
||||
}
|
||||
|
||||
/**
|
||||
* tag 响应对象
|
||||
*/
|
||||
export interface TagQueryResponse {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建标签
|
||||
*/
|
||||
export function createTag(request: TagCreateRequest) {
|
||||
return axios.post('/infra/tag/create', request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签
|
||||
*/
|
||||
export function getTagList(type: TagType) {
|
||||
return axios.get<Array<TagQueryResponse>>('/infra/tag/list', { params: { type } });
|
||||
}
|
||||
Reference in New Issue
Block a user