@arkxos/arkos-app-gateway-manage 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/ark_dist/ark-meta.json +75 -0
- package/ark_dist/ark_userChunk_1.js +5 -0
- package/ark_dist/ark_userChunk_2.js +49 -0
- package/ark_dist/css/views/views-CreateGateway.41b2bde6.css +297 -0
- package/ark_dist/favicon.ico +0 -0
- package/ark_dist/img/404.png +0 -0
- package/ark_dist/img/auth_banner.jpg +0 -0
- package/ark_dist/img/avatar.jpg +0 -0
- package/ark_dist/img/avatar2.gif +0 -0
- package/ark_dist/img/avatar3.gif +0 -0
- package/ark_dist/img/loginbg.svg +1 -0
- package/ark_dist/img/logo-r.png +0 -0
- package/ark_dist/img/logo.png +0 -0
- package/ark_dist/img/no-widgets.svg +57 -0
- package/ark_dist/img/tasks-example.png +0 -0
- package/ark_dist/img/ver.svg +236 -0
- package/ark_dist/index.html +132 -0
- package/ark_dist/js/app.e014b7a5.js +1 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js +3 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js.LICENSE.txt +1 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js.map +1 -0
- package/ark_proxy/entry.js +30 -0
- package/ark_proxy_es/entry.js +18 -0
- package/package.json +156 -0
- package/scripts/check.js +13 -0
- package/scripts/meta.js +21 -0
- package/scripts/prepublishOnly.js +28 -0
- package/src/api/apidoc_api.js +35 -0
- package/src/api/authority.js +161 -0
- package/src/api/balanced_api.js +101 -0
- package/src/api/client_api.js +68 -0
- package/src/api/count_api.js +62 -0
- package/src/api/gateway-manage/client_api.js +68 -0
- package/src/api/gateway-manage/open_client.js +188 -0
- package/src/api/gateway_api.js +81 -0
- package/src/api/global_function.js +278 -0
- package/src/api/global_variable.js +35 -0
- package/src/api/groovyscript_api.js +130 -0
- package/src/api/ip_api.js +47 -0
- package/src/api/monitor_api.js +24 -0
- package/src/api/regserver_api.js +224 -0
- package/src/api/request.js +107 -0
- package/src/assets/font_1930435_u2cpsigmd9d.js +38 -0
- package/src/assets/font_ma6wg7gw3td/demo.css +539 -0
- package/src/assets/font_ma6wg7gw3td/demo_index.html +674 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.css +105 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.eot +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.js +1 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.json +163 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.svg +92 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.ttf +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.woff +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.woff2 +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/particles.json +110 -0
- package/src/auto-imports.d.ts +307 -0
- package/src/component/BoxCard.vue +156 -0
- package/src/component/ClientInfo.vue +82 -0
- package/src/component/GroovyScriptTable.vue +74 -0
- package/src/component/PanThumb/index.vue +149 -0
- package/src/component/RouteAccessChart.vue +85 -0
- package/src/component/RouteInfo.vue +146 -0
- package/src/component/RouteRequestCount.vue +126 -0
- package/src/component/TextHoverEffect/Mallki.vue +120 -0
- package/src/configs/subApp.ts +9 -0
- package/src/entrance/libProperties.ts +30 -0
- package/src/entrance/libTypes.ts +27 -0
- package/src/main.ts +13 -0
- package/src/plugins/index.ts +11 -0
- package/src/router/constantRoutes.js +155 -0
- package/src/router/loadComponent.js +29 -0
- package/src/views/AddClientGateway.vue +253 -0
- package/src/views/AddGatewayClient.vue +360 -0
- package/src/views/AddGroovyScript.vue +337 -0
- package/src/views/ApiCount.vue +291 -0
- package/src/views/ApiDoc.vue +293 -0
- package/src/views/ApiMonitor.vue +292 -0
- package/src/views/ClientList.vue +217 -0
- package/src/views/CreateBalanced.vue +341 -0
- package/src/views/CreateClient.vue +171 -0
- package/src/views/CreateGateway.vue +836 -0
- package/src/views/GatewayList.vue +322 -0
- package/src/views/GatewayTopology.vue +245 -0
- package/src/views/IpList.vue +218 -0
- package/src/views/LoadBalanced.vue +389 -0
- package/src/views/Main.vue +98 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@arkxio/ark-lib-proxy')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@arkxio/ark-lib-proxy'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@arkxos/arkos-app-gateway-manage"] = {}, global.arkLibProxy));
|
|
5
|
+
})(this, (function (exports, arkLibProxy) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
|--------------------------------------------------------------------------
|
|
9
|
+
|
|
|
10
|
+
| 对应 package.json/appGroupName
|
|
11
|
+
|
|
|
12
|
+
|--------------------------------------------------------------------------
|
|
13
|
+
*/
|
|
14
|
+
const LIB_NAME = '@arkxos/arkos-app-gateway-manage';
|
|
15
|
+
|
|
16
|
+
const lib = arkLibProxy.exposeLib(LIB_NAME);
|
|
17
|
+
// suport writing: import { regs, num, myMod } from 'hel-tpl-remote-lib';
|
|
18
|
+
const { staticRoutes, loadComponent,
|
|
19
|
+
// store,
|
|
20
|
+
install, } = lib;
|
|
21
|
+
|
|
22
|
+
exports["default"] = lib;
|
|
23
|
+
exports.install = install;
|
|
24
|
+
exports.lib = lib;
|
|
25
|
+
exports.loadComponent = loadComponent;
|
|
26
|
+
exports.staticRoutes = staticRoutes;
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
29
|
+
|
|
30
|
+
}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { exposeLib } from '@arkxio/ark-lib-proxy';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|--------------------------------------------------------------------------
|
|
5
|
+
|
|
|
6
|
+
| 对应 package.json/appGroupName
|
|
7
|
+
|
|
|
8
|
+
|--------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
const LIB_NAME = '@arkxos/arkos-app-gateway-manage';
|
|
11
|
+
|
|
12
|
+
const lib = exposeLib(LIB_NAME);
|
|
13
|
+
// suport writing: import { regs, num, myMod } from 'hel-tpl-remote-lib';
|
|
14
|
+
const { staticRoutes, loadComponent,
|
|
15
|
+
// store,
|
|
16
|
+
install, } = lib;
|
|
17
|
+
|
|
18
|
+
export { lib as default, install, lib, loadComponent, staticRoutes };
|
package/package.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arkxos/arkos-app-gateway-manage",
|
|
3
|
+
"appGroupName": "@arkxos/arkos-app-gateway-manage",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"main": "ark_proxy/entry.js",
|
|
6
|
+
"module": "ark_proxy_es/entry.js",
|
|
7
|
+
"types": "src/entrance/libTypes.ts",
|
|
8
|
+
"unpkg": "ark_dist/entry.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"ark_dist",
|
|
11
|
+
"ark_proxy",
|
|
12
|
+
"ark_proxy_es",
|
|
13
|
+
"scripts",
|
|
14
|
+
"README.md",
|
|
15
|
+
"src"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@arkxio/ark-iso": "0.1.1",
|
|
19
|
+
"@arkxos/arkos-util": "^0.1.0",
|
|
20
|
+
"@arkxos/arkos-core": "^0.1.0",
|
|
21
|
+
"@arkxio/ark-ui": "0.1.2",
|
|
22
|
+
"@arkxos/arkos-theme-classic": "^0.1.0",
|
|
23
|
+
"@element-plus/icons-vue": "2.3.1",
|
|
24
|
+
"@logicflow/core": "^0.2.9",
|
|
25
|
+
"@logicflow/extension": "^0.2.9",
|
|
26
|
+
"@vueup/vue-quill": "1.2.0",
|
|
27
|
+
"@vueuse/core": "10.7.0",
|
|
28
|
+
"@wangeditor/editor": "5.1.23",
|
|
29
|
+
"@wangeditor/editor-for-vue": "5.1.12",
|
|
30
|
+
"animate.css": "4.1.1",
|
|
31
|
+
"autoprefixer": "10.4.20",
|
|
32
|
+
"await-to-js": "3.0.0",
|
|
33
|
+
"bignumber.js": "^6.0.0",
|
|
34
|
+
"china-area-data": "^5.0.1",
|
|
35
|
+
"clipboard": "^2.0.8",
|
|
36
|
+
"codemirror": "5.65.18",
|
|
37
|
+
"core-js": "^3.6.4",
|
|
38
|
+
"crypto-js": "4.2.0",
|
|
39
|
+
"dayjs": "^1.10.4",
|
|
40
|
+
"driver.js": "1.3.1",
|
|
41
|
+
"echarts": "5.5.1",
|
|
42
|
+
"file-saver": "2.0.5",
|
|
43
|
+
"fuse.js": "6.6.2",
|
|
44
|
+
"js-cookie": "3.0.5",
|
|
45
|
+
"jsencrypt": "3.3.2",
|
|
46
|
+
"jsplumb": "^2.15.5",
|
|
47
|
+
"lodash": "^4.17.21",
|
|
48
|
+
"mitt": "3.0.1",
|
|
49
|
+
"nprogress": "0.2.0",
|
|
50
|
+
"path-browserify": "1.0.1",
|
|
51
|
+
"path-to-regexp": "6.2.0",
|
|
52
|
+
"postcss": "8.4.47",
|
|
53
|
+
"qs": "6.13.0",
|
|
54
|
+
"raw-loader": "^4.0.2",
|
|
55
|
+
"resize-detector": "^0.3.0",
|
|
56
|
+
"screenfull": "6.0.2",
|
|
57
|
+
"sm-crypto": "0.3.13",
|
|
58
|
+
"sortablejs": "1.15.3",
|
|
59
|
+
"splitpanes": "3.1.5",
|
|
60
|
+
"tailwindcss": "3.4.14",
|
|
61
|
+
"vue-clipboard3": "2.0.0",
|
|
62
|
+
"vue-cropper": "1.1.1",
|
|
63
|
+
"vue-echarts": "7.0.3",
|
|
64
|
+
"vue-json-viewer": "^2.2.18",
|
|
65
|
+
"vue-types": "5.1.1",
|
|
66
|
+
"vuedraggable": "4.1.0",
|
|
67
|
+
"vuex": "^3.6.2",
|
|
68
|
+
"xlsx": "0.16.9",
|
|
69
|
+
"mavon-editor": "^2.9.0",
|
|
70
|
+
"particles.js": "^2.0.0",
|
|
71
|
+
"echarts-gl": "^1.1.2"
|
|
72
|
+
},
|
|
73
|
+
"arkDependencies": {
|
|
74
|
+
"@arkxos/arkos-util": "1.0.200",
|
|
75
|
+
"@arkxos/arkos-core": "1.0.202",
|
|
76
|
+
"@arkxio/ark-ui": "0.1.2",
|
|
77
|
+
"@arkxos/arkos-theme-classic": "1.0.200"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"@arkxio/ark-lib-proxy": "0.1.1",
|
|
81
|
+
"@arkxio/ark-micro": "0.1.1",
|
|
82
|
+
"vue-router": "4.4.5",
|
|
83
|
+
"pinia": "2.2.4",
|
|
84
|
+
"vue-i18n": "9.8.0",
|
|
85
|
+
"core-js": "3.8.3",
|
|
86
|
+
"axios": "^1.8.0",
|
|
87
|
+
"vue": "3.5.12",
|
|
88
|
+
"element-plus": "^2.8.5"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@arkxio/ark-dev-utils": "0.1.1",
|
|
92
|
+
"@intlify/unplugin-vue-i18n": "1.6.0",
|
|
93
|
+
"@rollup/plugin-typescript": "9.0.1",
|
|
94
|
+
"@swc/core": "~1.6.13",
|
|
95
|
+
"@types/jest": "27.0.1",
|
|
96
|
+
"@types/node": "18.14.2",
|
|
97
|
+
"@types/nprogress": "^0.2.0",
|
|
98
|
+
"@types/sortablejs": "^1.15.0",
|
|
99
|
+
"@types/webpack-env": "^1.18.5",
|
|
100
|
+
"@typescript-eslint/eslint-plugin": "6.15.0",
|
|
101
|
+
"@typescript-eslint/parser": "6.15.0",
|
|
102
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
|
103
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
104
|
+
"@vue/cli-plugin-typescript": "~5.0.0",
|
|
105
|
+
"@vue/cli-plugin-unit-jest": "~5.0.0",
|
|
106
|
+
"@vue/cli-service": "~5.0.0",
|
|
107
|
+
"@vue/compiler-sfc": "^3.4.3",
|
|
108
|
+
"@vue/eslint-config-standard": "6.1.0",
|
|
109
|
+
"@vue/eslint-config-typescript": "9.1.0",
|
|
110
|
+
"@vue/test-utils": "2.4.6",
|
|
111
|
+
"@vue/vue3-jest": "27.0.0-alpha.1",
|
|
112
|
+
"babel-jest": "27.0.6",
|
|
113
|
+
"chalk": "4.0.0",
|
|
114
|
+
"consola": "^3.0.0",
|
|
115
|
+
"cross-env": "7.0.3",
|
|
116
|
+
"eslint": "8.55.0",
|
|
117
|
+
"eslint-plugin-import": "2.29.0",
|
|
118
|
+
"eslint-plugin-node": "11.1.0",
|
|
119
|
+
"eslint-plugin-promise": "5.1.0",
|
|
120
|
+
"eslint-plugin-vue": "9.19.2",
|
|
121
|
+
"jest": "27.0.5",
|
|
122
|
+
"pinia-plugin-persistedstate": "^3.2.1",
|
|
123
|
+
"prettier": "3.3.3",
|
|
124
|
+
"rollup": "2.79.1",
|
|
125
|
+
"rollup-plugin-terser": "7.0.2",
|
|
126
|
+
"sass": "1.58.3",
|
|
127
|
+
"terser": "^5.31.1",
|
|
128
|
+
"ts-jest": "27.0.4",
|
|
129
|
+
"typescript": "5.6.2",
|
|
130
|
+
"@iconify/utils": "2.1.32",
|
|
131
|
+
"unplugin-auto-import": "0.15.3",
|
|
132
|
+
"unplugin-icons": "0.14.14",
|
|
133
|
+
"unplugin-vue-components": "0.22.11",
|
|
134
|
+
"unplugin-vue-setup-extend-plus": "1.0.0",
|
|
135
|
+
"vue-cli-plugin-vite": "~1.5.0",
|
|
136
|
+
"vue-eslint-parser": "^9.1.0"
|
|
137
|
+
},
|
|
138
|
+
"publishConfig": {
|
|
139
|
+
"access": "public"
|
|
140
|
+
},
|
|
141
|
+
"scripts": {
|
|
142
|
+
"start": "cross-env PORT=7010 vue-cli-service serve --mode development",
|
|
143
|
+
"start:vite": "node ./bin/vite",
|
|
144
|
+
"build": "npm run check_name && npm run build_dist && npm run build_meta && npm run build_proxy",
|
|
145
|
+
"build_dist": "vue-cli-service build",
|
|
146
|
+
"check_name": "node ./scripts/check.js",
|
|
147
|
+
"build_proxy": "npm run build_proxy_umd && npm run build_proxy_es && copy ./ark_proxy/entry.js ./ark_dist",
|
|
148
|
+
"build_proxy_umd": "rollup -c",
|
|
149
|
+
"build_proxy_es": "cross-env BUILD_ENV=es rollup -c",
|
|
150
|
+
"build_cust": "npm run set_home_page \"npm run build && npm run build_meta\"",
|
|
151
|
+
"set_home_page": "cross-env-shell HEL_APP_HOME_PAGE=http://127.0.0.1:9001",
|
|
152
|
+
"build_meta": "node scripts/meta.js",
|
|
153
|
+
"test:unit": "vue-cli-service test:unit",
|
|
154
|
+
"lint": "vue-cli-service lint"
|
|
155
|
+
}
|
|
156
|
+
}
|
package/scripts/check.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
|
|
|
4
|
+
| 此脚本在流水线上会被触发,用于校验组名是否和应用里的组名保持一致
|
|
5
|
+
|
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const arkDevUtils = require('@arkxio/ark-dev-utils');
|
|
10
|
+
const pkg = require('../package.json');
|
|
11
|
+
|
|
12
|
+
const fileFullPath = path.join(__dirname, '../src/configs/subApp');
|
|
13
|
+
arkDevUtils.check(pkg, { fileFullPath, checkEnv: false });
|
package/scripts/meta.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
|
|
|
4
|
+
| 生成meta
|
|
5
|
+
|
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
const process = require('process');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const arkDevUtils = require('@arkxio/ark-dev-utils');
|
|
11
|
+
const packageJson = require('../package.json');
|
|
12
|
+
const appInfo = require('../appInfo');
|
|
13
|
+
|
|
14
|
+
// arkDevUtils.extractArkMetaJson({
|
|
15
|
+
// subApp: appInfo,
|
|
16
|
+
// buildDirFullPath: path.join(__dirname, '../ark_dist'),
|
|
17
|
+
// packageJson,
|
|
18
|
+
// }).catch(err => {
|
|
19
|
+
// console.error(err);
|
|
20
|
+
// process.exit(-1);
|
|
21
|
+
// });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|--------------------------------------------------------------------------
|
|
3
|
+
| npm publush 前检查根目录下 package.json 的版本号是否和 ark_dist/ark-meta.json 一致
|
|
4
|
+
|--------------------------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const chalk = require("chalk");
|
|
8
|
+
const pkg = require("../package.json");
|
|
9
|
+
const fs = require("fs");
|
|
10
|
+
const path = require("path");
|
|
11
|
+
const helDistPath = path.resolve(__dirname, "../ark_dist/ark-meta.json");
|
|
12
|
+
const existHelMeata = fs.existsSync(helDistPath);
|
|
13
|
+
|
|
14
|
+
// 检查是否执行npm run build 打包命令
|
|
15
|
+
if (!existHelMeata) {
|
|
16
|
+
console.log(chalk.red("Run the 'npm run build' command first.\n"));
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const { app } = JSON.parse(fs.readFileSync(helDistPath, "utf-8"));
|
|
20
|
+
// 检查根目录下 package.json 的版本号是否和 ark_dist/ark-meta.json 一致
|
|
21
|
+
if (app?.build_version !== pkg.version) {
|
|
22
|
+
console.log(
|
|
23
|
+
chalk.red(
|
|
24
|
+
"The package.json version number and the ark_dist/ark-meta.json version number must be the same.\n"
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//apidoc_api.js
|
|
2
|
+
import { request } from '@arkxos/arkos-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 查询网关路由列表
|
|
6
|
+
*/
|
|
7
|
+
export const apiDocList = data => {
|
|
8
|
+
return request({
|
|
9
|
+
url: '/gateway-manage/apiDoc/list',
|
|
10
|
+
method: 'get',
|
|
11
|
+
data
|
|
12
|
+
})
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 保存API接口内容
|
|
17
|
+
*/
|
|
18
|
+
export const saveApiDoc = data => {
|
|
19
|
+
return request({
|
|
20
|
+
url: '/gateway-manage/apiDoc/save',
|
|
21
|
+
method: 'post',
|
|
22
|
+
data
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 查询API接口内容
|
|
28
|
+
*/
|
|
29
|
+
export const findByApiDoc = data => {
|
|
30
|
+
return request({
|
|
31
|
+
url: '/gateway-manage/apiDoc/findById',
|
|
32
|
+
method: 'get',
|
|
33
|
+
data
|
|
34
|
+
})
|
|
35
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 权限管理
|
|
3
|
+
*/
|
|
4
|
+
import { request } from '@arkxos/arkos-core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 获取用户已分配权限
|
|
8
|
+
* @param userId
|
|
9
|
+
*/
|
|
10
|
+
export const getAuthorityUser = (userId) => {
|
|
11
|
+
const params = {
|
|
12
|
+
userId: userId
|
|
13
|
+
}
|
|
14
|
+
return request({
|
|
15
|
+
url: 'base/authority/user',
|
|
16
|
+
params,
|
|
17
|
+
method: 'get'
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 获取角色已分配权限
|
|
23
|
+
* @param roleId
|
|
24
|
+
*/
|
|
25
|
+
export const getAuthorityRole = (roleId) => {
|
|
26
|
+
const params = {
|
|
27
|
+
roleId: roleId
|
|
28
|
+
}
|
|
29
|
+
return request({
|
|
30
|
+
url: 'base/authority/role',
|
|
31
|
+
params,
|
|
32
|
+
method: 'get'
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 获取应用已分配权限
|
|
38
|
+
* @param roleId
|
|
39
|
+
*/
|
|
40
|
+
export const getAuthorityApp = (appId, appSystemCode) => {
|
|
41
|
+
const params = {
|
|
42
|
+
appId: appId,
|
|
43
|
+
appSystemCode: appSystemCode
|
|
44
|
+
}
|
|
45
|
+
return request({
|
|
46
|
+
url: 'base/authority/app',
|
|
47
|
+
params,
|
|
48
|
+
method: 'get'
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 获取菜单和操作权限列表
|
|
54
|
+
* @param serviceId
|
|
55
|
+
*/
|
|
56
|
+
export const getAuthorityMenu = () => {
|
|
57
|
+
return request({
|
|
58
|
+
url: 'base/authority/menu',
|
|
59
|
+
method: 'get'
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 获取API权限列表
|
|
65
|
+
* @param serviceId
|
|
66
|
+
*/
|
|
67
|
+
export const getAuthorityApi = (serviceId) => {
|
|
68
|
+
return request({
|
|
69
|
+
url: 'base/authority/api',
|
|
70
|
+
method: 'get',
|
|
71
|
+
params: {
|
|
72
|
+
serviceId: serviceId
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const getAuthorityAction = (actionId) => {
|
|
78
|
+
const params = {
|
|
79
|
+
actionId: actionId
|
|
80
|
+
}
|
|
81
|
+
return request({
|
|
82
|
+
url: 'base/authority/action',
|
|
83
|
+
params,
|
|
84
|
+
method: 'get'
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 用户授权
|
|
90
|
+
* @param userId
|
|
91
|
+
*/
|
|
92
|
+
export const grantAuthorityUser = ({ userId, expireTime, authorityIds }) => {
|
|
93
|
+
const data = {
|
|
94
|
+
userId: userId,
|
|
95
|
+
expireTime: expireTime,
|
|
96
|
+
authorityIds: authorityIds.join(',')
|
|
97
|
+
}
|
|
98
|
+
return request({
|
|
99
|
+
url: 'base/authority/user/grant',
|
|
100
|
+
data,
|
|
101
|
+
method: 'post'
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 角色授权
|
|
107
|
+
* @param userId
|
|
108
|
+
*/
|
|
109
|
+
export const grantAuthorityRole = ({ roleId, expireTime, authorityIds }) => {
|
|
110
|
+
const data = {
|
|
111
|
+
roleId: roleId,
|
|
112
|
+
expireTime: expireTime,
|
|
113
|
+
authorityIds: authorityIds.join(',')
|
|
114
|
+
}
|
|
115
|
+
return request({
|
|
116
|
+
url: 'base/authority/role/grant',
|
|
117
|
+
headers: {
|
|
118
|
+
'Content-Type': 'multipart/form-data;charset=UTF-8'
|
|
119
|
+
},
|
|
120
|
+
data,
|
|
121
|
+
method: 'post'
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 应用授权
|
|
127
|
+
* @param userId
|
|
128
|
+
*/
|
|
129
|
+
export const grantAuthorityApp = ({ appId, appSystemCode, expireTime, authorityIds }) => {
|
|
130
|
+
const data = {
|
|
131
|
+
appId: appId,
|
|
132
|
+
appSystemCode: appSystemCode,
|
|
133
|
+
expireTime: expireTime,
|
|
134
|
+
authorityIds: authorityIds.join(',')
|
|
135
|
+
}
|
|
136
|
+
return request({
|
|
137
|
+
url: 'base/authority/app/grant',
|
|
138
|
+
data,
|
|
139
|
+
// headers: {
|
|
140
|
+
// 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
141
|
+
// },
|
|
142
|
+
method: 'post'
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 操作功能授权
|
|
148
|
+
* @param actionId
|
|
149
|
+
* @param apiIds
|
|
150
|
+
*/
|
|
151
|
+
export const grantAuthorityAction = ({ actionId, authorityIds }) => {
|
|
152
|
+
const data = {
|
|
153
|
+
actionId: actionId,
|
|
154
|
+
authorityIds: authorityIds.join(',')
|
|
155
|
+
}
|
|
156
|
+
return request({
|
|
157
|
+
url: 'base/authority/action/grant',
|
|
158
|
+
data,
|
|
159
|
+
method: 'post'
|
|
160
|
+
})
|
|
161
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//balanced_api.js
|
|
2
|
+
import { request } from '@arkxos/arkos-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 添加负载配置
|
|
6
|
+
*/
|
|
7
|
+
export const addBalanced = data => {
|
|
8
|
+
return request({
|
|
9
|
+
url: '/gateway-manage/balanced/add',
|
|
10
|
+
method: 'post',
|
|
11
|
+
data
|
|
12
|
+
})
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 删除负载配置
|
|
17
|
+
*/
|
|
18
|
+
export const deleteBalanced = data => {
|
|
19
|
+
return request({
|
|
20
|
+
url: '/gateway-manage/balanced/delete',
|
|
21
|
+
method: 'get',
|
|
22
|
+
data
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 更新负载配置
|
|
28
|
+
*/
|
|
29
|
+
export const updateBalanced = data => {
|
|
30
|
+
return request({
|
|
31
|
+
url: '/gateway-manage/balanced/update',
|
|
32
|
+
method: 'post',
|
|
33
|
+
data
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 查找负载配置
|
|
39
|
+
*/
|
|
40
|
+
export const findByBalanced = data => {
|
|
41
|
+
return request({
|
|
42
|
+
url: '/gateway-manage/balanced/findById',
|
|
43
|
+
method: 'get',
|
|
44
|
+
data
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 分页展示负载配置
|
|
50
|
+
*/
|
|
51
|
+
export const balancedPageList = data => {
|
|
52
|
+
return request({
|
|
53
|
+
url: '/gateway-manage/balanced/pageList',
|
|
54
|
+
method: 'post',
|
|
55
|
+
data
|
|
56
|
+
})
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 启用负载服务
|
|
61
|
+
*/
|
|
62
|
+
export const startBalanced = data => {
|
|
63
|
+
return request({
|
|
64
|
+
url: '/gateway-manage/balanced/start',
|
|
65
|
+
method: 'get',
|
|
66
|
+
data
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 禁用负载服务
|
|
72
|
+
*/
|
|
73
|
+
export const stopBalanced = data => {
|
|
74
|
+
return request({
|
|
75
|
+
url: '/gateway-manage/balanced/stop',
|
|
76
|
+
method: 'get',
|
|
77
|
+
data
|
|
78
|
+
})
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 已注册负载服务
|
|
83
|
+
*/
|
|
84
|
+
export const loadServerRegList = data => {
|
|
85
|
+
return request({
|
|
86
|
+
url: '/gateway-manage/loadServer/regList',
|
|
87
|
+
method: 'post',
|
|
88
|
+
data
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 未注册负载服务
|
|
94
|
+
*/
|
|
95
|
+
export const loadServerNotRegList = data => {
|
|
96
|
+
return request({
|
|
97
|
+
url: '/gateway-manage/loadServer/notRegPageList',
|
|
98
|
+
method: 'post',
|
|
99
|
+
data
|
|
100
|
+
})
|
|
101
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//client_api.js
|
|
2
|
+
import { request } from '@arkxos/arkos-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 添加客户端
|
|
6
|
+
*/
|
|
7
|
+
export const addClient = data => {
|
|
8
|
+
return request({
|
|
9
|
+
url: '/gateway-manage/client/add',
|
|
10
|
+
method: 'post',
|
|
11
|
+
data
|
|
12
|
+
})
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 更新客户端
|
|
17
|
+
*/
|
|
18
|
+
export const updateClient = data => {
|
|
19
|
+
return request({
|
|
20
|
+
url: '/gateway-manage/client/update',
|
|
21
|
+
method: 'post',
|
|
22
|
+
data
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 分页查询客户端列表
|
|
28
|
+
*/
|
|
29
|
+
export const clientPageList = data => {
|
|
30
|
+
return request({
|
|
31
|
+
url: '/gateway-manage/client/pageList',
|
|
32
|
+
method: 'post',
|
|
33
|
+
data
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 启用客户端
|
|
39
|
+
*/
|
|
40
|
+
export const startClient = data => {
|
|
41
|
+
return request({
|
|
42
|
+
url: '/gateway-manage/client/start',
|
|
43
|
+
method: 'get',
|
|
44
|
+
data
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 停止客户端
|
|
50
|
+
*/
|
|
51
|
+
export const stopClient = data => {
|
|
52
|
+
return request({
|
|
53
|
+
url: '/gateway-manage/client/stop',
|
|
54
|
+
method: 'get',
|
|
55
|
+
data
|
|
56
|
+
})
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 删除客户端
|
|
61
|
+
*/
|
|
62
|
+
export const deleteClient = data => {
|
|
63
|
+
return request({
|
|
64
|
+
url: '/gateway-manage/client/delete',
|
|
65
|
+
method: 'get',
|
|
66
|
+
data
|
|
67
|
+
})
|
|
68
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//count_api.js
|
|
2
|
+
import { request } from '@arkxos/arkos-core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 统计网关路由请求量
|
|
6
|
+
*/
|
|
7
|
+
export const countRequest = data => {
|
|
8
|
+
return request({
|
|
9
|
+
url: '/gateway-manage/count/request',
|
|
10
|
+
method: 'post',
|
|
11
|
+
loading: false,
|
|
12
|
+
data
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 统计负载网关路由请求量
|
|
18
|
+
*/
|
|
19
|
+
export const countBalancedRequest = data => {
|
|
20
|
+
return request({
|
|
21
|
+
url: '/gateway-manage/count/balanced/request',
|
|
22
|
+
method: 'post',
|
|
23
|
+
loading: false,
|
|
24
|
+
data
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 获取网关路由集合
|
|
30
|
+
*/
|
|
31
|
+
export const countRoutePageList = data => {
|
|
32
|
+
return request({
|
|
33
|
+
url: '/gateway-manage/count/route/pageList',
|
|
34
|
+
method: 'post',
|
|
35
|
+
loading: false,
|
|
36
|
+
data
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 统计按7天和按24小时维度计算的请求总量
|
|
42
|
+
*/
|
|
43
|
+
export const countRequestTotal = data => {
|
|
44
|
+
return request({
|
|
45
|
+
url: '/gateway-manage/count/request/total',
|
|
46
|
+
method: 'post',
|
|
47
|
+
loading: false,
|
|
48
|
+
data
|
|
49
|
+
})
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 统计按7天和按24小时维度计算的请求总量
|
|
54
|
+
*/
|
|
55
|
+
export const countAppRequestTotal = data => {
|
|
56
|
+
return request({
|
|
57
|
+
url: '/gateway-manage/count/request/app/total',
|
|
58
|
+
method: 'get',
|
|
59
|
+
loading: false,
|
|
60
|
+
data
|
|
61
|
+
})
|
|
62
|
+
};
|