🔖 项目重命名.

This commit is contained in:
lijiahangmax
2024-05-16 00:03:30 +08:00
parent f7189e34cb
commit d3a045ec20
1511 changed files with 4199 additions and 4128 deletions

View 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 });
}

View 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);
}

View 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);
}

View 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 } });
}