-
Notifications
You must be signed in to change notification settings - Fork 10
/
api.tsx
83 lines (74 loc) · 2.53 KB
/
api.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
function getApi(sys: string, path: string) {
const prefix = '/api/';
return `${prefix}${sys}${path}`;
}
function getRDBApi(path: string) {
const prefix = '/api/rdb';
return `${prefix}${path}`;
}
function getAMSCEApi(path: string) {
const prefix = '/api/ams-ce';
return `${prefix}${path}`;
}
function getAMSEEApi(path: string) {
const prefix = '/api/ams-ee';
return `${prefix}${path}`;
}
const api = {
settings: getRDBApi('/auth/settings'),
callback: getRDBApi('/auth/v2/callback'),
authorize: getRDBApi('/auth/v2/authorize'),
downloadBrowser: '/api/platform/download/browser',
login: getRDBApi('/auth/login'),
ldap: getRDBApi('/ldap'),
logout: getRDBApi('/auth/v2/logout'),
selftProfile: getRDBApi('/self/profile'),
selftPassword: getRDBApi('/self/password'),
selftToken: getRDBApi('/self/token'),
user: getRDBApi('/user'),
users: getRDBApi('/users'),
tenant: getRDBApi('/tenant'),
team: getRDBApi('/team'),
teams: getRDBApi('/teams'),
configs: getRDBApi('/configs'),
role: getRDBApi('/role'),
roles: getRDBApi('/roles'),
ops: getRDBApi('/ops'),
log: getRDBApi('/log'),
homeStatistics: getRDBApi('/home/statistics'),
project: getRDBApi('/project'),
projects: getRDBApi('/projects'),
tree: getRDBApi('/tree'),
node: getRDBApi('/node'),
nodes: getRDBApi('/nodes'),
nodeCate: getRDBApi('/node-cate'),
nodeCates: getRDBApi('/node-cates'),
resources: getRDBApi('/resources'),
belongProjects: getRDBApi('/belong-projects'),
permissionPoint: getRDBApi('/self/perms/global'),
organization: getRDBApi('/tree/orgs'),
privileges: getRDBApi('/privileges'),
pwdRules: getRDBApi('/pwd-rules'),
privilegesWeights:getRDBApi('/privileges-weights'),
privilegesImport:getRDBApi('/privileges-import'),
host: getAMSCEApi('/host'),
hosts: getAMSCEApi('/hosts'),
nethw: getAMSEEApi('/nethw'),
nethws: getAMSEEApi('/nethws'),
nws: getAMSEEApi('/nws'),
mibs: getAMSEEApi('/mibs'),
cluster: getApi('ccpapi', '/cluster'),
tmpchart: getApi('mon', '/tmpchart'),
metricsPods: getApi('mon', '/index/metrics'),
tagkvPods: getApi('mon', '/index/tagkv'),
metrics: getApi('index', '/metrics'),
tagkv: getApi('index', '/tagkv'),
fullmatch: getApi('index', '/counter/fullmatch'),
points: getApi('transfer', '/data/ui'),
messageCount: getApi('platform', '/msgs/self/count'),
ticketMessageCount: getApi('ticket', '/tickets'),
menus: getApi('platform', '/mis/services/cates'),
specgroups: getApi('billing', '/extern/specgroups'),
billingManaged: getApi('billing', '/managed'),
};
export default api;