feat: Add More Extension module (#292)
* build: update reliable * build: update monaco editor * fix: resolve bug * fix: delete mock confirm and monaco editor * fix: basic auth can't send in client * fix: auth extension can't debug * fix: extension list image error * fix: trace mock and share error * fix: offiline extension search * fix: binary go test error * feat: schema-form develop * feat: schema-form develop * fix: local workspace import group default set isInherited * feat: schema-form develop * feat: schema-form develop * fix: theme scroll view error * wip: Only add beforeunload listeners conditionally * test: update testcase --------- Co-authored-by: yZaio <842499102@qq.com>
This commit is contained in:
parent
d7c653f32e
commit
c3d2ce8dd8
File diff suppressed because it is too large
Load Diff
47
package.json
47
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "postcat",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"main": "out/app/electron-main/main.js",
|
||||
"description": "A lightweight, extensible API tool",
|
||||
"homepage": "https://github.com/Postcatlab/postcat.git",
|
||||
|
@ -32,7 +32,7 @@
|
|||
"clear:electron:tsc": "tsc --build --clean",
|
||||
"electron:tsc": "tsc -p tsconfig.json",
|
||||
"electron:dev": "npm run electron:tsc && electron . --development",
|
||||
"api:gen": "donkey run",
|
||||
"api:gen": "npx donkey run",
|
||||
"web:start:direct": "yarn workspace postcat-web run start:direct",
|
||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r -0",
|
||||
"lint:lint-staged": "lint-staged",
|
||||
|
@ -43,8 +43,8 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@bqy/node-module-alias": "^1.0.1",
|
||||
"@grpc/grpc-js": "1.7.3",
|
||||
"@grpc/proto-loader": "0.7.3",
|
||||
"@grpc/grpc-js": "1.8.13",
|
||||
"@grpc/proto-loader": "0.7.6",
|
||||
"@koa/cors": "4.0.0",
|
||||
"axios": "1.3.4",
|
||||
"cors": "2.8.5",
|
||||
|
@ -59,29 +59,30 @@
|
|||
"iconv-lite": "^0.6.3",
|
||||
"jquery": "3.6.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsdom": "20.0.1",
|
||||
"koa": "2.13.4",
|
||||
"jsdom": "21.1.1",
|
||||
"koa": "2.14.1",
|
||||
"koa-body": "6.0.1",
|
||||
"memoizee": "0.4.15",
|
||||
"npm": "6.14.17",
|
||||
"pm2": "5.2.2",
|
||||
"portfinder": "1.0.32",
|
||||
"postman-sandbox": "^4.2.3",
|
||||
"qiniu": "^6.0.0",
|
||||
"qiniu": "^7.8.0",
|
||||
"resolve": "^1.22.1",
|
||||
"showdown": "2.1.0",
|
||||
"socket.io": "4.5.4",
|
||||
"ws": "8.12.0",
|
||||
"ws": "8.13.0",
|
||||
"xml2js": "0.4.23",
|
||||
"yaml": "2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "~17.3.0",
|
||||
"@commitlint/config-conventional": "~17.3.0",
|
||||
"api-donkey": "1.0.5",
|
||||
"@commitlint/cli": "~17.5.1",
|
||||
"@commitlint/config-conventional": "~17.4.4",
|
||||
"@playwright/test": "1.32.1",
|
||||
"@types/node": "18.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.29.0",
|
||||
"@typescript-eslint/parser": "5.29.0",
|
||||
"@types/node": "18.15.11",
|
||||
"@typescript-eslint/eslint-plugin": "5.57.1",
|
||||
"@typescript-eslint/parser": "5.57.1",
|
||||
"electron": "22.1.0",
|
||||
"electron-builder": "23.6.0",
|
||||
"electron-notarize": "1.2.1",
|
||||
|
@ -90,11 +91,11 @@
|
|||
"eslint-config-prettier": "~8.5.0",
|
||||
"eslint-plugin-deprecation": "~1.3.2",
|
||||
"eslint-plugin-import": "~2.26.0",
|
||||
"eslint-plugin-jsdoc": "~39.3.6",
|
||||
"eslint-plugin-jsdoc": "~40.1.1",
|
||||
"eslint-plugin-prefer-arrow": "~1.2.3",
|
||||
"eslint-plugin-prettier": "~4.2.1",
|
||||
"husky": "8.0.2",
|
||||
"lint-staged": "~12.5.0",
|
||||
"lint-staged": "~13.2.0",
|
||||
"minimist": "1.2.7",
|
||||
"npm-run-all": "4.1.5",
|
||||
"octokit": "2.0.14",
|
||||
|
@ -102,17 +103,17 @@
|
|||
"postcss-scss": "4.0.6",
|
||||
"prettier": "^2.7.1",
|
||||
"ssh2": "1.11.0",
|
||||
"style-loader": "3.3.1",
|
||||
"stylelint": "^14.10.0",
|
||||
"style-loader": "3.3.2",
|
||||
"stylelint": "^15.4.0",
|
||||
"stylelint-config-html": "1.1.0",
|
||||
"stylelint-config-prettier": "9.0.4",
|
||||
"stylelint-config-rational-order": "^0.1.2",
|
||||
"stylelint-config-standard": "29.0.0",
|
||||
"stylelint-config-standard-scss": "6.1.0",
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.5.0",
|
||||
"stylelint-order": "5.0.0",
|
||||
"ts-node": "10.8.1",
|
||||
"typescript": "~4.9.4",
|
||||
"stylelint-config-standard": "32.0.0",
|
||||
"stylelint-config-standard-scss": "7.0.1",
|
||||
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
||||
"stylelint-order": "6.0.3",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "~5.0.3",
|
||||
"wait-on": "7.0.1"
|
||||
},
|
||||
"__npminstall_done": false,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,7 +31,6 @@ const cpFile = (fromFile, toFile) =>
|
|||
const version = package.version;
|
||||
const fileList = [
|
||||
'release/Postcat-Setup-?.exe',
|
||||
'release/Postcat Setup ?.exe.blockmap',
|
||||
'release/Postcat-?-arm64.dmg',
|
||||
'release/Postcat-?-arm64-mac.zip',
|
||||
'release/Postcat-?.dmg',
|
||||
|
|
|
@ -48,6 +48,7 @@ const version = package.version;
|
|||
//! Dont't upload .blockmap when use nsis package windows
|
||||
const fileList = [
|
||||
'release/Postcat-Setup-?.exe',
|
||||
'release/Postcat Setup ?.exe.blockmap',
|
||||
'release/Postcat-?-arm64.dmg',
|
||||
'release/Postcat-?-arm64-mac.zip',
|
||||
'release/Postcat-?.dmg',
|
||||
|
|
|
@ -122,7 +122,7 @@ class EoBrowserWindow {
|
|||
public create(): BrowserWindow {
|
||||
// Create the browser window.
|
||||
const opts = {
|
||||
useContentSize: true, // 这个要设置,不然计算显示区域尺寸不准
|
||||
useContentSize: true,
|
||||
frame: os.type() === 'Darwin' ? true : false, //mac use default frame
|
||||
minWidth: 400,
|
||||
minHeight: 300,
|
||||
|
@ -130,6 +130,7 @@ class EoBrowserWindow {
|
|||
webSecurity: false,
|
||||
preload: path.join(__dirname, '../../', 'platform', 'electron-browser', 'preload.js'),
|
||||
nodeIntegration: true,
|
||||
//! it must be false because we need run extension in sandbox
|
||||
contextIsolation: false,
|
||||
allowRunningInsecureContent: processEnv === 'development' ? true : false
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//Polyfill Node.js core modules in Webpack. This module is only needed for webpack 5+.
|
||||
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
|
||||
|
||||
/**
|
||||
* Custom angular webpack configuration
|
||||
*/
|
||||
|
|
|
@ -197,11 +197,11 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">75</context>
|
||||
<context context-type="linenumber">76</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">230</context>
|
||||
<context context-type="linenumber">231</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1334771356257554730" datatype="html">
|
||||
|
@ -340,14 +340,14 @@
|
|||
<source>Please import the file first</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/extension-select/import-api/import-api.component.ts</context>
|
||||
<context context-type="linenumber">106</context>
|
||||
<context context-type="linenumber">99</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4653473492937803201" datatype="html">
|
||||
<source>The imported file contains <x id="PH" equiv-text="data.collections.length"/> APIs, which will be ignored</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/extension-select/import-api/import-api.component.ts</context>
|
||||
<context context-type="linenumber">129</context>
|
||||
<context context-type="linenumber">123</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="746377231893378783" datatype="html">
|
||||
|
@ -853,7 +853,7 @@
|
|||
<source>Search</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">25</context>
|
||||
<context context-type="linenumber">26</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/overview/member/workspace-member.component.ts</context>
|
||||
|
@ -868,7 +868,7 @@
|
|||
<source>New Workspace</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
<context context-type="linenumber">30</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/components/user-modal/user-modal.component.ts</context>
|
||||
|
@ -879,21 +879,21 @@
|
|||
<source>LOCAL</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">39</context>
|
||||
<context context-type="linenumber">40</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="339001911246398758" datatype="html">
|
||||
<source>CLOUD</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">51</context>
|
||||
<context context-type="linenumber">52</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7760753102681833241" datatype="html">
|
||||
<source>No cloud workspace</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">52</context>
|
||||
<context context-type="linenumber">53</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7530915397595055169" datatype="html">
|
||||
|
@ -928,28 +928,28 @@
|
|||
<source> Share API </source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">27,28</context>
|
||||
<context context-type="linenumber">25,26</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1837147473270736353" datatype="html">
|
||||
<source>Share via link</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">31</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5068564145162977684" datatype="html">
|
||||
<source> This link will be updated with the API content. Everyone can access it without logging in </source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">33,34</context>
|
||||
<context context-type="linenumber">31,32</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4073590403857682869" datatype="html">
|
||||
<source>If you want to share API,Please switch to cloud workspace</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">60</context>
|
||||
<context context-type="linenumber">58</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="894965666917873756" datatype="html">
|
||||
|
@ -1804,9 +1804,13 @@
|
|||
<context context-type="sourcefile">src/app/pages/workspace/overview/edit/workspace-edit.component.ts</context>
|
||||
<context context-type="linenumber">122</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/api-group.service.ts</context>
|
||||
<context context-type="linenumber">45</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">141</context>
|
||||
<context context-type="linenumber">146</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/store/api-effect.service.ts</context>
|
||||
|
@ -1819,9 +1823,13 @@
|
|||
<context context-type="sourcefile">src/app/pages/workspace/overview/edit/workspace-edit.component.ts</context>
|
||||
<context context-type="linenumber">125</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/api-group.service.ts</context>
|
||||
<context context-type="linenumber">49</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">144</context>
|
||||
<context context-type="linenumber">149</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/store/api-effect.service.ts</context>
|
||||
|
@ -2076,11 +2084,11 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">242</context>
|
||||
<context context-type="linenumber">243</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">248</context>
|
||||
<context context-type="linenumber">249</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="NewMockTitle" datatype="html">
|
||||
|
@ -2091,7 +2099,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">113</context>
|
||||
<context context-type="linenumber">115</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5968366500418000730" datatype="html">
|
||||
|
@ -2219,7 +2227,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">124</context>
|
||||
<context context-type="linenumber">127</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5719912962272225542" datatype="html">
|
||||
|
@ -2238,7 +2246,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">127</context>
|
||||
<context context-type="linenumber">130</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6112087277983123757" datatype="html">
|
||||
|
@ -2622,7 +2630,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">136</context>
|
||||
<context context-type="linenumber">139</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-case.service.ts</context>
|
||||
|
@ -3204,11 +3212,19 @@
|
|||
<context context-type="linenumber">86</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4416290763660062288" datatype="html">
|
||||
<source></source>
|
||||
<trans-unit id="9142685431369791033" datatype="html">
|
||||
<source>Are you sure you want to delete the data <strong title="<x id="PH" equiv-text="mock_name"/>"><x id="PH_1" equiv-text="mock_name.length > 50 ? `${mock_name.slice(0, 50)}...` : mock_name"/></strong> ? You cannot restore it once deleted!</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">137</context>
|
||||
<context context-type="linenumber">140,142</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-case.service.ts</context>
|
||||
<context context-type="linenumber">42,44</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/service/project-api.service.ts</context>
|
||||
<context context-type="linenumber">82,84</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="666710856997912735" datatype="html">
|
||||
|
@ -3253,17 +3269,6 @@
|
|||
<context context-type="linenumber">184</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="9142685431369791033" datatype="html">
|
||||
<source>Are you sure you want to delete the data <strong title="<x id="PH" equiv-text="model.name"/>"><x id="PH_1" equiv-text="model.name.length > 50 ? `${model.name.slice(0, 50)}...` : model.name"/></strong> ? You cannot restore it once deleted!</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-case.service.ts</context>
|
||||
<context context-type="linenumber">42,44</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/service/project-api.service.ts</context>
|
||||
<context context-type="linenumber">82,84</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3039128405337181324" datatype="html">
|
||||
<source>Failed to copy</source>
|
||||
<context-group purpose="location">
|
||||
|
@ -3343,74 +3348,74 @@
|
|||
<source>Curl text error: <x id="PH" equiv-text="err"/></source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test-ui.component.ts</context>
|
||||
<context context-type="linenumber">500</context>
|
||||
<context context-type="linenumber">508</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="1153957724275241408" datatype="html">
|
||||
<source>Save as API</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">148</context>
|
||||
<context context-type="linenumber">149</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">194</context>
|
||||
<context context-type="linenumber">195</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4557858482654346075" datatype="html">
|
||||
<source>Save as Case</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">211</context>
|
||||
<context context-type="linenumber">212</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5153636153872151968" datatype="html">
|
||||
<source>Failed to create Case</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">251</context>
|
||||
<context context-type="linenumber">252</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="3599061521262544840" datatype="html">
|
||||
<source>Created Case successfully</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">257</context>
|
||||
<context context-type="linenumber">258</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="2355771272834438001" datatype="html">
|
||||
<source>Can't find the Case</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">274</context>
|
||||
<context context-type="linenumber">275</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="4637051004445462729" datatype="html">
|
||||
<source>Edit Case Failed</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">283</context>
|
||||
<context context-type="linenumber">284</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="166637629284890356" datatype="html">
|
||||
<source>Edited Case successfully</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">287</context>
|
||||
<context context-type="linenumber">288</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7470072726632505149" datatype="html">
|
||||
<source>Edited Case Name Failed</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">303</context>
|
||||
<context context-type="linenumber">304</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="6127006205300878369" datatype="html">
|
||||
<source>Edited Case Name successfully</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">308</context>
|
||||
<context context-type="linenumber">309</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="5822129944523922179" datatype="html">
|
||||
|
@ -3612,7 +3617,7 @@ If the current test URL is a local API, please download the desktop and re-initi
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/services/storage/db/services/project.service.ts</context>
|
||||
<context context-type="linenumber">145</context>
|
||||
<context context-type="linenumber">144</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="7790897507248839015" datatype="html">
|
||||
|
@ -3877,7 +3882,7 @@ If the current test URL is a local API, please download the desktop and re-initi
|
|||
<source>Please enter </source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/shared/components/schema-form/schema-form.component.ts</context>
|
||||
<context context-type="linenumber">151</context>
|
||||
<context context-type="linenumber">138</context>
|
||||
</context-group>
|
||||
</trans-unit>
|
||||
<trans-unit id="8246619971129925918" datatype="html">
|
||||
|
|
|
@ -214,11 +214,11 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">75</context>
|
||||
<context context-type="linenumber">76</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">230</context>
|
||||
<context context-type="linenumber">231</context>
|
||||
</context-group>
|
||||
<target state="translated">保存</target>
|
||||
</trans-unit>
|
||||
|
@ -366,7 +366,7 @@
|
|||
<source>Please import the file first</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/extension-select/import-api/import-api.component.ts</context>
|
||||
<context context-type="linenumber">106</context>
|
||||
<context context-type="linenumber">99</context>
|
||||
</context-group>
|
||||
<target state="translated">请先导入文件</target>
|
||||
</trans-unit>
|
||||
|
@ -374,7 +374,7 @@
|
|||
<source>The imported file contains <x id="PH" equiv-text="data.collections.length"/> APIs, which will be ignored</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/components/extension-select/import-api/import-api.component.ts</context>
|
||||
<context context-type="linenumber">129</context>
|
||||
<context context-type="linenumber">123</context>
|
||||
</context-group>
|
||||
<target state="translated">导入的文件包含 <x id="PH" equiv-text="data.collections.length"/> API,将被忽略</target>
|
||||
</trans-unit>
|
||||
|
@ -946,7 +946,7 @@
|
|||
<source>Search</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">25</context>
|
||||
<context context-type="linenumber">26</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/overview/member/workspace-member.component.ts</context>
|
||||
|
@ -962,7 +962,7 @@
|
|||
<source>New Workspace</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
<context context-type="linenumber">30</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/components/user-modal/user-modal.component.ts</context>
|
||||
|
@ -974,7 +974,7 @@
|
|||
<source>LOCAL</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">39</context>
|
||||
<context context-type="linenumber">40</context>
|
||||
</context-group>
|
||||
<target state="translated">本地</target>
|
||||
</trans-unit>
|
||||
|
@ -982,7 +982,7 @@
|
|||
<source>CLOUD</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">51</context>
|
||||
<context context-type="linenumber">52</context>
|
||||
</context-group>
|
||||
<target state="translated">云端</target>
|
||||
</trans-unit>
|
||||
|
@ -990,7 +990,7 @@
|
|||
<source>No cloud workspace</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/breadcrumb/select-workspace/select-workspace.component.ts</context>
|
||||
<context context-type="linenumber">52</context>
|
||||
<context context-type="linenumber">53</context>
|
||||
</context-group>
|
||||
<target state="translated">暂无云工作空间</target>
|
||||
</trans-unit>
|
||||
|
@ -1030,7 +1030,7 @@
|
|||
<source> Share API </source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">27,28</context>
|
||||
<context context-type="linenumber">25,26</context>
|
||||
</context-group>
|
||||
<target state="translated"> 分享 API </target>
|
||||
</trans-unit>
|
||||
|
@ -1038,7 +1038,7 @@
|
|||
<source>Share via link</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">31</context>
|
||||
<context context-type="linenumber">29</context>
|
||||
</context-group>
|
||||
<target state="translated">通过链接分享</target>
|
||||
</trans-unit>
|
||||
|
@ -1046,7 +1046,7 @@
|
|||
<source> This link will be updated with the API content. Everyone can access it without logging in </source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">33,34</context>
|
||||
<context context-type="linenumber">31,32</context>
|
||||
</context-group>
|
||||
<target state="translated"> 每个人都可以在没有登录的情况下查看最新的 API 文档 </target>
|
||||
</trans-unit>
|
||||
|
@ -1054,7 +1054,7 @@
|
|||
<source>If you want to share API,Please switch to cloud workspace</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/layouts/navbar/get-share-link.component.ts</context>
|
||||
<context context-type="linenumber">60</context>
|
||||
<context context-type="linenumber">58</context>
|
||||
</context-group>
|
||||
<target state="translated">如果您想要分享 API,请切换到云空间</target>
|
||||
</trans-unit>
|
||||
|
@ -2006,9 +2006,13 @@
|
|||
<context context-type="sourcefile">src/app/pages/workspace/overview/edit/workspace-edit.component.ts</context>
|
||||
<context context-type="linenumber">122</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/api-group.service.ts</context>
|
||||
<context context-type="linenumber">45</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">141</context>
|
||||
<context context-type="linenumber">146</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/store/api-effect.service.ts</context>
|
||||
|
@ -2022,9 +2026,13 @@
|
|||
<context context-type="sourcefile">src/app/pages/workspace/overview/edit/workspace-edit.component.ts</context>
|
||||
<context context-type="linenumber">125</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/components/group/api-group.service.ts</context>
|
||||
<context context-type="linenumber">49</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">144</context>
|
||||
<context context-type="linenumber">149</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/store/api-effect.service.ts</context>
|
||||
|
@ -2304,11 +2312,11 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">242</context>
|
||||
<context context-type="linenumber">243</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">248</context>
|
||||
<context context-type="linenumber">249</context>
|
||||
</context-group>
|
||||
<target state="final">新建用例</target>
|
||||
</trans-unit>
|
||||
|
@ -2320,7 +2328,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">113</context>
|
||||
<context context-type="linenumber">115</context>
|
||||
</context-group>
|
||||
<target state="translated">新建 Mock</target>
|
||||
</trans-unit>
|
||||
|
@ -2460,7 +2468,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">124</context>
|
||||
<context context-type="linenumber">127</context>
|
||||
</context-group>
|
||||
<target state="translated">添加失败</target>
|
||||
</trans-unit>
|
||||
|
@ -2480,7 +2488,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">127</context>
|
||||
<context context-type="linenumber">130</context>
|
||||
</context-group>
|
||||
<target state="translated">添加成功</target>
|
||||
</trans-unit>
|
||||
|
@ -2909,7 +2917,7 @@
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">136</context>
|
||||
<context context-type="linenumber">139</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-case.service.ts</context>
|
||||
|
@ -3557,12 +3565,21 @@
|
|||
</context-group>
|
||||
<target state="translated">必填</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="4416290763660062288" datatype="html">
|
||||
<source/>
|
||||
<trans-unit id="9142685431369791033" datatype="html">
|
||||
<source>Are you sure you want to delete the data <strong title="<x id="PH" equiv-text="mock_name"/>"><x id="PH_1" equiv-text="mock_name.length > 50 ? `${mock_name.slice(0, 50)}...` : mock_name"/></strong> ? You cannot restore it once deleted!</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/mock/api-mock.service.ts</context>
|
||||
<context context-type="linenumber">137</context>
|
||||
<context context-type="linenumber">140,142</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-case.service.ts</context>
|
||||
<context context-type="linenumber">42,44</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/service/project-api.service.ts</context>
|
||||
<context context-type="linenumber">82,84</context>
|
||||
</context-group>
|
||||
<target state="translated">确认要删除数据 <strong title="<x id="PH" equiv-text="mock_name"/>"><x id="PH_1" equiv-text="mock_name.length > 50 ? `${mock_name.slice(0, 50)}...` : mock_name"/></strong> 吗? 删除后不可恢复!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="666710856997912735" datatype="html">
|
||||
<source>Please input mock name</source>
|
||||
|
@ -3612,18 +3629,6 @@
|
|||
</context-group>
|
||||
<target state="translated">数据无变化</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="9142685431369791033" datatype="html">
|
||||
<source>Are you sure you want to delete the data <strong title="<x id="PH" equiv-text="model.name"/>"><x id="PH_1" equiv-text="model.name.length > 50 ? `${model.name.slice(0, 50)}...` : model.name"/></strong> ? You cannot restore it once deleted!</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-case.service.ts</context>
|
||||
<context context-type="linenumber">42,44</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/service/project-api.service.ts</context>
|
||||
<context context-type="linenumber">82,84</context>
|
||||
</context-group>
|
||||
<target state="translated">确认要删除数据 <strong title="<x id="PH" equiv-text="apiInfo.name"/>"><x id="PH_1" equiv-text="apiInfo.name.length > 50 ? apiInfo.name.slice(0, 50) + '...' : apiInfo.name"/></strong> 吗?删除后不可恢复!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="3039128405337181324" datatype="html">
|
||||
<source>Failed to copy</source>
|
||||
<context-group purpose="location">
|
||||
|
@ -3712,7 +3717,7 @@
|
|||
<source>Curl text error: <x id="PH" equiv-text="err"/></source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test-ui.component.ts</context>
|
||||
<context context-type="linenumber">500</context>
|
||||
<context context-type="linenumber">508</context>
|
||||
</context-group>
|
||||
<target state="translated">Curl 文本错误: <x id="PH" equiv-text="err"/></target>
|
||||
</trans-unit>
|
||||
|
@ -3720,11 +3725,11 @@
|
|||
<source>Save as API</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">148</context>
|
||||
<context context-type="linenumber">149</context>
|
||||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">194</context>
|
||||
<context context-type="linenumber">195</context>
|
||||
</context-group>
|
||||
<target state="translated">保存为新 API</target>
|
||||
</trans-unit>
|
||||
|
@ -3732,7 +3737,7 @@
|
|||
<source>Save as Case</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">211</context>
|
||||
<context context-type="linenumber">212</context>
|
||||
</context-group>
|
||||
<target state="translated">保存为用例</target>
|
||||
</trans-unit>
|
||||
|
@ -3740,7 +3745,7 @@
|
|||
<source>Failed to create Case</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">251</context>
|
||||
<context context-type="linenumber">252</context>
|
||||
</context-group>
|
||||
<target state="translated">新建用例失败</target>
|
||||
</trans-unit>
|
||||
|
@ -3748,7 +3753,7 @@
|
|||
<source>Created Case successfully</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">257</context>
|
||||
<context context-type="linenumber">258</context>
|
||||
</context-group>
|
||||
<target state="translated">新建用例成功</target>
|
||||
</trans-unit>
|
||||
|
@ -3756,7 +3761,7 @@
|
|||
<source>Can't find the Case</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">274</context>
|
||||
<context context-type="linenumber">275</context>
|
||||
</context-group>
|
||||
<target state="translated">找不到用例</target>
|
||||
</trans-unit>
|
||||
|
@ -3764,7 +3769,7 @@
|
|||
<source>Edit Case Failed</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">283</context>
|
||||
<context context-type="linenumber">284</context>
|
||||
</context-group>
|
||||
<target state="translated">编辑用例失败</target>
|
||||
</trans-unit>
|
||||
|
@ -3772,7 +3777,7 @@
|
|||
<source>Edited Case successfully</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">287</context>
|
||||
<context context-type="linenumber">288</context>
|
||||
</context-group>
|
||||
<target state="translated">编辑用例成功</target>
|
||||
</trans-unit>
|
||||
|
@ -3780,7 +3785,7 @@
|
|||
<source>Edited Case Name Failed</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">303</context>
|
||||
<context context-type="linenumber">304</context>
|
||||
</context-group>
|
||||
<target state="translated">编辑用例名称失败</target>
|
||||
</trans-unit>
|
||||
|
@ -3788,7 +3793,7 @@
|
|||
<source>Edited Case Name successfully</source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/pages/workspace/project/api/http/test/api-test.component.ts</context>
|
||||
<context context-type="linenumber">308</context>
|
||||
<context context-type="linenumber">309</context>
|
||||
</context-group>
|
||||
<target state="translated">编辑用例名称成功</target>
|
||||
</trans-unit>
|
||||
|
@ -4014,7 +4019,7 @@ If the current test URL is a local API, please download the desktop and re-initi
|
|||
</context-group>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/services/storage/db/services/project.service.ts</context>
|
||||
<context context-type="linenumber">145</context>
|
||||
<context context-type="linenumber">144</context>
|
||||
</context-group>
|
||||
<target state="translated">根分组</target>
|
||||
</trans-unit>
|
||||
|
@ -4314,7 +4319,7 @@ If the current test URL is a local API, please download the desktop and re-initi
|
|||
<source>Please enter </source>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/shared/components/schema-form/schema-form.component.ts</context>
|
||||
<context context-type="linenumber">151</context>
|
||||
<context context-type="linenumber">138</context>
|
||||
</context-group>
|
||||
<target state="translated">请输入 </target>
|
||||
</trans-unit>
|
||||
|
|
|
@ -24,79 +24,80 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@angular-cli/base-href-webpack": "1.0.16",
|
||||
"@angular/animations": "15.2.2",
|
||||
"@angular/common": "15.2.2",
|
||||
"@angular/compiler": "15.2.2",
|
||||
"@angular/core": "15.2.2",
|
||||
"@angular/forms": "15.2.2",
|
||||
"@angular/language-service": "15.2.2",
|
||||
"@angular/platform-browser": "15.2.2",
|
||||
"@angular/platform-browser-dynamic": "15.2.2",
|
||||
"@angular/router": "15.2.2",
|
||||
"@angular/upgrade": "^15.2.2",
|
||||
"@angular/animations": "15.2.5",
|
||||
"@angular/common": "15.2.5",
|
||||
"@angular/compiler": "15.2.5",
|
||||
"@angular/core": "15.2.5",
|
||||
"@angular/forms": "15.2.5",
|
||||
"@angular/language-service": "15.2.5",
|
||||
"@angular/platform-browser": "15.2.5",
|
||||
"@angular/platform-browser-dynamic": "15.2.5",
|
||||
"@angular/router": "15.2.5",
|
||||
"@angular/upgrade": "^15.2.5",
|
||||
"@micro-zoe/micro-app": "1.0.0-alpha.10",
|
||||
"@xmagic/ngx-wujie": "1.0.0-rc.20",
|
||||
"ajv": "8.12.0",
|
||||
"color": "^4.2.3",
|
||||
"compare-versions": "6.0.0-rc.1",
|
||||
"core-js": "3.27.2",
|
||||
"eo-ng-auto-complete": "0.1.11",
|
||||
"core-js": "3.30.0",
|
||||
"eo-ng-auto-complete": "0.1.18",
|
||||
"eo-ng-button": "0.1.10",
|
||||
"eo-ng-checkbox": "0.1.10",
|
||||
"eo-ng-checkbox": "0.1.12",
|
||||
"eo-ng-dropdown": "0.1.14",
|
||||
"eo-ng-feedback": "0.1.10",
|
||||
"eo-ng-input": "0.1.13",
|
||||
"eo-ng-empty": "0.1.11",
|
||||
"eo-ng-feedback": "0.1.11",
|
||||
"eo-ng-input": "0.1.16",
|
||||
"eo-ng-layout": "0.1.10",
|
||||
"eo-ng-menu": "0.1.10",
|
||||
"eo-ng-radio": "0.1.10",
|
||||
"eo-ng-select": "0.1.12",
|
||||
"eo-ng-menu": "0.1.12",
|
||||
"eo-ng-radio": "0.1.13",
|
||||
"eo-ng-select": "0.1.15",
|
||||
"eo-ng-switch": "0.1.10",
|
||||
"eo-ng-table": "0.1.14",
|
||||
"eo-ng-table": "0.1.30",
|
||||
"eo-ng-tabs": "0.1.11",
|
||||
"eo-ng-tree": "0.1.16",
|
||||
"eo-ng-tree": "0.1.18",
|
||||
"gpt3-tokenizer": "1.1.5",
|
||||
"is-xml": "0.1.0",
|
||||
"js-beautify": "1.14.7",
|
||||
"lodash-es": "4.17.21",
|
||||
"markdown-it": "13.0.1",
|
||||
"mobx": "6.7.0",
|
||||
"monaco-editor": "0.33.0",
|
||||
"ng-zorro-antd": "15.0.3",
|
||||
"mobx": "6.9.0",
|
||||
"monaco-editor": "0.36.1",
|
||||
"ng-zorro-antd": "15.1.0",
|
||||
"omit-deep-lodash": "1.1.7",
|
||||
"parse-multipart-data": "1.5.0",
|
||||
"qs": "6.11.0",
|
||||
"qs": "6.11.1",
|
||||
"rxjs": "7.8.0",
|
||||
"shellwords-ts": "3.0.1",
|
||||
"socket.io-client": "4.5.4",
|
||||
"socket.io-client": "4.6.1",
|
||||
"tslib": "^2.5.0",
|
||||
"wujie": "1.0.6",
|
||||
"wujie": "1.0.14",
|
||||
"zone.js": "~0.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "15.0.0",
|
||||
"@angular-devkit/build-angular": "15.2.2",
|
||||
"@angular-devkit/build-angular": "15.2.4",
|
||||
"@angular-eslint/builder": "15.2.1",
|
||||
"@angular-eslint/eslint-plugin": "15.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "15.2.1",
|
||||
"@angular-eslint/schematics": "15.2.1",
|
||||
"@angular-eslint/template-parser": "15.2.1",
|
||||
"@angular/cli": "15.1.4",
|
||||
"@angular/compiler-cli": "15.1.3",
|
||||
"@angular/localize": "15.1.3",
|
||||
"@angular/cli": "15.2.4",
|
||||
"@angular/compiler-cli": "15.2.5",
|
||||
"@angular/localize": "15.2.5",
|
||||
"@types/color": "3.0.3",
|
||||
"@types/jasmine": "4.3.1",
|
||||
"@types/parse-multipart": "1.0.0",
|
||||
"@types/jasminewd2": "2.0.10",
|
||||
"@types/lodash-es": "4.17.6",
|
||||
"@types/lodash-es": "4.17.7",
|
||||
"@types/markdown-it": "12.2.3",
|
||||
"@types/node": "18.15.0",
|
||||
"@types/node": "18.15.11",
|
||||
"@types/omit-deep-lodash": "1.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.54.1",
|
||||
"@typescript-eslint/parser": "5.54.1",
|
||||
"@types/parse-multipart": "1.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.57.1",
|
||||
"@typescript-eslint/parser": "5.57.1",
|
||||
"autoprefixer": "10.4.14",
|
||||
"conventional-changelog-cli": "2.2.2",
|
||||
"dexie": "^4.0.1-alpha.7",
|
||||
"jasmine-core": "4.5.0",
|
||||
"jasmine-core": "4.6.0",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
"karma": "6.4.1",
|
||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||
|
@ -104,10 +105,10 @@
|
|||
"karma-jasmine-html-reporter": "2.0.0",
|
||||
"node-polyfill-webpack-plugin": "2.0.1",
|
||||
"npm-run-all": "4.1.5",
|
||||
"tailwindcss": "3.2.4",
|
||||
"tailwindcss": "3.3.0",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "~4.9.5",
|
||||
"webpack": "5.76.0",
|
||||
"typescript": "~5.0.3",
|
||||
"webpack": "5.77.0",
|
||||
"webpack-bundle-analyzer": "4.8.0"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -29,7 +29,7 @@ const routes: Routes = [
|
|||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, {
|
||||
//Electron user hash to keep router after page refresh
|
||||
//Electron use hash to keep router after page refresh
|
||||
useHash: !!(window && window.process && window.process.type) ? true : false,
|
||||
preloadingStrategy: PreloadAllModules
|
||||
}),
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* {
|
||||
max-width: 100%;
|
||||
}
|
||||
/* stylelint-disable max-line-length,font-family-no-duplicate-names,no-duplicate-selectors,selector-pseudo-element-no-unknown */
|
||||
/* stylelint-disable max-line-length,font-family-no-duplicate-names,no-duplicate-selectors,selector-pseudo-element-no-unknown,selector-anb-no-unmatchable */
|
||||
.markdown-body {
|
||||
text-size-adjust: 100%;
|
||||
margin: 0;
|
||||
|
@ -102,6 +102,7 @@
|
|||
.markdown-body img {
|
||||
border-style: none;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
box-sizing: content-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
@ -892,10 +893,7 @@
|
|||
|
||||
.markdown-body .footnotes li:target::before {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -8px;
|
||||
bottom: -8px;
|
||||
left: -24px;
|
||||
inset: -8px -8px -8px -24px;
|
||||
pointer-events: none;
|
||||
content: '';
|
||||
border: 2px solid #0969da;
|
||||
|
|
|
@ -229,6 +229,7 @@ export class EoTabComponent implements OnInit, OnDestroy {
|
|||
this.cacheData();
|
||||
}
|
||||
private watchPageLeave = () => {
|
||||
//TODO Only add beforeunload listeners conditionally: https://web.dev/bfcache/?utm_source=devtools#never-use-the-unload-event
|
||||
window.addEventListener('beforeunload', e => {
|
||||
this.cacheData();
|
||||
});
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { has } from 'lodash-es';
|
||||
import { ExtensionService } from 'pc/browser/src/app/services/extensions/extension.service';
|
||||
import { MessageService } from 'pc/browser/src/app/services/message';
|
||||
import { ApiService } from 'pc/browser/src/app/services/storage/api.service';
|
||||
import { TraceService } from 'pc/browser/src/app/services/trace.service';
|
||||
import { EXPORT_API } from 'pc/browser/src/app/shared/constans/featureName';
|
||||
|
@ -9,24 +8,26 @@ import { ExtensionChange } from 'pc/browser/src/app/shared/decorators';
|
|||
import { FeatureInfo } from 'pc/browser/src/app/shared/models/extension-manager';
|
||||
import { StoreService } from 'pc/browser/src/app/shared/store/state.service';
|
||||
import StorageUtil from 'pc/browser/src/app/shared/utils/storage/storage.utils';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import pkgInfo from '../../../../../../../package.json';
|
||||
|
||||
@Component({
|
||||
selector: 'eo-export-api',
|
||||
template: `<extension-select [(extension)]="currentExtension" tipsType="exportAPI" [extensionList]="supportList"></extension-select> `
|
||||
template: `<extension-select
|
||||
[(extension)]="currentExtension"
|
||||
tipsType="exportAPI"
|
||||
[extensionList]="supportList"
|
||||
(extensionChange)="selectChange($event)"
|
||||
></extension-select> `
|
||||
})
|
||||
export class ExportApiComponent implements OnInit {
|
||||
currentExtension = StorageUtil.get('export_api_modal');
|
||||
supportList: any[] = [];
|
||||
isValid = true;
|
||||
featureMap: Map<string, FeatureInfo>;
|
||||
private destroy$: Subject<void> = new Subject<void>();
|
||||
constructor(
|
||||
private extensionService: ExtensionService,
|
||||
private apiService: ApiService,
|
||||
private messageService: MessageService,
|
||||
private trace: TraceService,
|
||||
private store: StoreService
|
||||
) {}
|
||||
|
@ -35,7 +36,6 @@ export class ExportApiComponent implements OnInit {
|
|||
}
|
||||
@ExtensionChange(EXPORT_API, true)
|
||||
initData() {
|
||||
console.log('initData');
|
||||
this.featureMap = this.extensionService.getValidExtensionsByFature(EXPORT_API);
|
||||
this.supportList = [];
|
||||
this.featureMap?.forEach((data: FeatureInfo, key: string) => {
|
||||
|
@ -50,6 +50,9 @@ export class ExportApiComponent implements OnInit {
|
|||
this.currentExtension = key || '';
|
||||
}
|
||||
}
|
||||
selectChange($event) {
|
||||
StorageUtil.set('export_api_modal', this.currentExtension);
|
||||
}
|
||||
submit(callback: () => boolean) {
|
||||
this.export(callback);
|
||||
}
|
||||
|
@ -73,7 +76,6 @@ export class ExportApiComponent implements OnInit {
|
|||
* @param callback
|
||||
*/
|
||||
private async export(callback) {
|
||||
StorageUtil.set('export_api_modal', this.currentExtension);
|
||||
const feature = this.featureMap.get(this.currentExtension);
|
||||
const action = feature.action || null;
|
||||
const filename = feature.filename || 'export.json';
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
|
|||
import { Router } from '@angular/router';
|
||||
import { EoNgFeedbackMessageService } from 'eo-ng-feedback';
|
||||
import { ExtensionService } from 'pc/browser/src/app/services/extensions/extension.service';
|
||||
import { Message, MessageService } from 'pc/browser/src/app/services/message';
|
||||
import { ApiService } from 'pc/browser/src/app/services/storage/api.service';
|
||||
import { parseAndCheckCollections, parseAndCheckEnv } from 'pc/browser/src/app/services/storage/db/validate/validate';
|
||||
import { TraceService } from 'pc/browser/src/app/services/trace.service';
|
||||
|
@ -10,8 +9,6 @@ import { IMPORT_API } from 'pc/browser/src/app/shared/constans/featureName';
|
|||
import { ExtensionChange } from 'pc/browser/src/app/shared/decorators';
|
||||
import { FeatureInfo } from 'pc/browser/src/app/shared/models/extension-manager';
|
||||
import { StoreService } from 'pc/browser/src/app/shared/store/state.service';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
import StorageUtil from '../../../shared/utils/storage/storage.utils';
|
||||
|
||||
|
@ -52,6 +49,7 @@ import StorageUtil from '../../../shared/utils/storage/storage.utils';
|
|||
[allowDrag]="true"
|
||||
tipsType="importAPI"
|
||||
[(extension)]="currentExtension"
|
||||
(extensionChange)="selectChange($event)"
|
||||
[extensionList]="supportList"
|
||||
(uploadChange)="uploadChange($event)"
|
||||
></extension-select>`
|
||||
|
@ -62,7 +60,6 @@ export class ImportApiComponent implements OnInit {
|
|||
uploadData = null;
|
||||
isValid = true;
|
||||
featureMap: Map<string, FeatureInfo>;
|
||||
private destroy$: Subject<void> = new Subject<void>();
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
@ -70,17 +67,14 @@ export class ImportApiComponent implements OnInit {
|
|||
private feedback: EoNgFeedbackMessageService,
|
||||
private extensionService: ExtensionService,
|
||||
private store: StoreService,
|
||||
private apiService: ApiService,
|
||||
private messageService: MessageService
|
||||
private apiService: ApiService
|
||||
) {}
|
||||
ngOnInit(): void {
|
||||
this.initData();
|
||||
this.messageService
|
||||
.get()
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe((inArg: Message) => {});
|
||||
}
|
||||
|
||||
selectChange($event) {
|
||||
StorageUtil.set('import_api_modal', this.currentExtension);
|
||||
}
|
||||
@ExtensionChange(IMPORT_API, true)
|
||||
initData() {
|
||||
this.featureMap = this.extensionService.getValidExtensionsByFature(IMPORT_API);
|
||||
|
@ -101,7 +95,6 @@ export class ImportApiComponent implements OnInit {
|
|||
this.uploadData = data;
|
||||
}
|
||||
async submit(callback) {
|
||||
StorageUtil.set('import_api_modal', this.currentExtension);
|
||||
if (!this.uploadData) {
|
||||
this.feedback.error($localize`Please import the file first`);
|
||||
callback('stayModal');
|
||||
|
@ -112,6 +105,7 @@ export class ImportApiComponent implements OnInit {
|
|||
const action = feature.action || null;
|
||||
const module = await this.extensionService.getExtensionPackage(this.currentExtension);
|
||||
let { name, content } = this.uploadData;
|
||||
console.log(content);
|
||||
try {
|
||||
const [data, err] = module[action](content);
|
||||
console.log(data, 555);
|
||||
|
|
|
@ -5,7 +5,7 @@ import StorageUtil from '../../../shared/utils/storage/storage.utils';
|
|||
|
||||
@Component({
|
||||
selector: 'pc-debug-theme',
|
||||
template: `<div class="h-[80%]"
|
||||
template: `<div class="h-[80vh]"
|
||||
><eo-monaco-editor
|
||||
[autoFormat]="true"
|
||||
class="border-all"
|
||||
|
|
|
@ -11,6 +11,7 @@ import { MessageService } from '../../../../services/message';
|
|||
template: ` <button
|
||||
nzTrigger="click"
|
||||
eo-ng-button
|
||||
(nzVisibleChange)="dropdownVisibleChange($event)"
|
||||
nzType="text"
|
||||
nzOverlayClassName="select-workspace-class"
|
||||
eo-ng-dropdown
|
||||
|
@ -88,7 +89,10 @@ export class SelectWorkspaceComponent {
|
|||
this.store.getWorkspaceList.filter(val => !val?.isLocal)
|
||||
);
|
||||
}
|
||||
|
||||
dropdownVisibleChange(isVisible) {
|
||||
if (!isVisible) return;
|
||||
this.effect.updateWorkspaceList();
|
||||
}
|
||||
changeWorkspace(workspaceID) {
|
||||
this.effect.switchWorkspace(workspaceID);
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@ import { Component } from '@angular/core';
|
|||
import { EoNgFeedbackMessageService } from 'eo-ng-feedback';
|
||||
import { EffectService } from 'pc/browser/src/app/shared/store/effect.service';
|
||||
import { StoreService } from 'pc/browser/src/app/shared/store/state.service';
|
||||
import { copy } from 'pc/browser/src/app/shared/utils/index.utils';
|
||||
import { interval } from 'rxjs';
|
||||
|
||||
import { DataSourceService } from '../../services/data-source/data-source.service';
|
||||
@Component({
|
||||
|
@ -38,7 +36,7 @@ import { DataSourceService } from '../../services/data-source/data-source.servic
|
|||
<ng-container *ngIf="link">
|
||||
<p nz-typography [nzContent]="link" nzCopyable nzEllipsis [nzCopyText]="link" [nzCopyIcons]="[copedIcon, copedIcon]"> </p>
|
||||
<ng-template #copedIcon>
|
||||
<button eo-ng-button nzType="text"><eo-iconpark-icon name="copy"></eo-iconpark-icon></button>
|
||||
<button trace traceID="copy_share_link" eo-ng-button nzType="text"><eo-iconpark-icon name="copy"></eo-iconpark-icon></button>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { autorun, observable, makeObservable } from 'mobx';
|
|||
import { WebService } from 'pc/browser/src/app/core/services';
|
||||
|
||||
import { ExtensionService } from '../../../../services/extensions/extension.service';
|
||||
import { ContributionPointsPrefix, ExtensionGroupType, suggestList } from '../extension.model';
|
||||
import { CategoryContributionPoints, ContributionPointsPrefix, ExtensionGroupType, suggestList } from '../extension.model';
|
||||
|
||||
const extensionSearch = list => {
|
||||
return (keyword = '') => {
|
||||
|
@ -23,7 +23,7 @@ const extensionSearch = list => {
|
|||
export class ExtensionListComponent implements OnInit {
|
||||
@Input() @observable type: string = ExtensionGroupType.all;
|
||||
@Input() @observable keyword = '';
|
||||
@Input() @observable category = '';
|
||||
@Input() @observable category: CategoryContributionPoints;
|
||||
@Output() readonly selectChange: EventEmitter<any> = new EventEmitter<any>();
|
||||
extensionList = [];
|
||||
loading = false;
|
||||
|
@ -46,10 +46,10 @@ export class ExtensionListComponent implements OnInit {
|
|||
let type = this.type;
|
||||
if (type.startsWith(ContributionPointsPrefix.category)) {
|
||||
type = 'category';
|
||||
this.category = this.type.slice(ContributionPointsPrefix.category.length);
|
||||
this.category = this.type.slice(ContributionPointsPrefix.category.length) as CategoryContributionPoints;
|
||||
}
|
||||
this.extensionList = [];
|
||||
const data = await this.searchPlugin(type, { keyword: this.keyword, category: this.category });
|
||||
const data = await this.searchPlugin(type, { keyword: this.keyword, category: this.category, feature: '' });
|
||||
// 避免频繁切换,导致侧边栏选中状态与右侧展示不一致
|
||||
if (originType === this.type) {
|
||||
this.extensionList = data;
|
||||
|
@ -61,11 +61,12 @@ export class ExtensionListComponent implements OnInit {
|
|||
item.nzSelectedIndex = nzSelectedIndex;
|
||||
this.selectChange.emit(item);
|
||||
}
|
||||
async searchPlugin(groupType, { keyword = '', category = '', feature = '' }) {
|
||||
async searchPlugin(groupType, { keyword = '', category, feature }) {
|
||||
this.loading = true;
|
||||
const suggest = suggestList.find(n => keyword.startsWith(n));
|
||||
|
||||
if (suggest) {
|
||||
//Re Generate feature or catory by keyword
|
||||
const prefix = Object.values(ContributionPointsPrefix).find(n => keyword.startsWith(n));
|
||||
const text = suggest.slice(prefix.length);
|
||||
keyword = keyword.slice(suggest.length).trim();
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<eo-toolbar></eo-toolbar>
|
||||
|
||||
<!-- Global component -->
|
||||
<pc-nps-mask></pc-nps-mask>
|
||||
<!-- <pc-nps-mask></pc-nps-mask> -->
|
||||
<pc-chatgpt-robot></pc-chatgpt-robot>
|
||||
<ng-template #notificationTmp>
|
||||
<p class="font-bold text-[16px]" i18n>We use cookies</p>
|
||||
|
|
|
@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NzNotificationModule } from 'ng-zorro-antd/notification';
|
||||
|
||||
import { NpsMaskModule } from '../components/nps-mask/nps-mask.module';
|
||||
// import { NpsMaskModule } from '../components/nps-mask/nps-mask.module';
|
||||
import { SystemSettingModule } from '../components/system-setting/system-setting.module';
|
||||
import { LocalWorkspaceTipComponent } from '../layouts/local-workspace-tip/local-workspace-tip.component';
|
||||
import { NavbarModule } from '../layouts/navbar/navbar.module';
|
||||
|
@ -23,7 +23,7 @@ import { PagesComponent } from './pages.component';
|
|||
imports: [
|
||||
ChatgptRobotComponent,
|
||||
PagesRoutingModule,
|
||||
NpsMaskModule,
|
||||
// NpsMaskModule,
|
||||
NzNotificationModule,
|
||||
SystemSettingModule,
|
||||
CommonModule,
|
||||
|
|
|
@ -2,7 +2,6 @@ import { CommonModule } from '@angular/common';
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { EoNgTabsModule } from 'eo-ng-tabs';
|
||||
import { NzSelectModule } from 'ng-zorro-antd/select';
|
||||
|
||||
import { MemberListModule } from '../../../components/member-list/member-list.module';
|
||||
import { MemberService } from '../../../components/member-list/member.service';
|
||||
|
@ -10,8 +9,6 @@ import { SharedModule } from '../../../shared/shared.module';
|
|||
import { WorkspaceSettingComponent } from './edit/workspace-edit.component';
|
||||
import { WorkspaceMemberComponent } from './member/workspace-member.component';
|
||||
import { WorkspaceMemberService } from './member/workspace-member.service';
|
||||
import { ProjectListModule } from './project-list/project-list.module';
|
||||
import { ProjectListService } from './project-list/project-list.service';
|
||||
import { WorkspaceOverviewComponent } from './workspace-overview.component';
|
||||
|
||||
@NgModule({
|
||||
|
@ -21,7 +18,6 @@ import { WorkspaceOverviewComponent } from './workspace-overview.component';
|
|||
MemberListModule,
|
||||
SharedModule,
|
||||
EoNgTabsModule,
|
||||
NzSelectModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
|
|
|
@ -70,7 +70,7 @@ export class ApiMockTableComponent implements OnInit, OnChanges {
|
|||
showFn: item => item.data.createWay !== 'system',
|
||||
confirm: true,
|
||||
confirmFn: (item, index) => {
|
||||
this.apiMock.toDelete(item.data.id);
|
||||
this.apiMock.toDelete(item.data.id, item.data.name);
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="flex w-full eo-api-script">
|
||||
<div class="flex-1 overflow-hidden">
|
||||
<div class="flex-1">
|
||||
<eo-monaco-editor
|
||||
[(code)]="code"
|
||||
[config]="{ language: 'javascript' }"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
:host {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</li>
|
||||
</a>
|
||||
<a>
|
||||
<li nz-menu-item (click)="aiToAPI()">
|
||||
<li nz-menu-item (click)="aiToAPI()" trace traceID="generate_ai">
|
||||
<eo-iconpark-icon name="robot" class="mr-[10px]"></eo-iconpark-icon>
|
||||
<span i18n>AI generate API</span>
|
||||
<nz-tag [nzColor]="primaryColor" class="ml-[10px]" i18n>experiment</nz-tag>
|
||||
|
|
|
@ -374,7 +374,7 @@ export class ApiGroupTreeComponent implements OnInit, OnDestroy {
|
|||
},
|
||||
{
|
||||
title: $localize`:@Delete:Delete`,
|
||||
click: ({ relationInfo: item }) => this.mockService.toDelete(item.id)
|
||||
click: ({ relationInfo: item }) => this.mockService.toDelete(item.id, item.name)
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -30,8 +30,8 @@ export class EnvEditComponent implements OnDestroy, EditTabViewComponent {
|
|||
varName = $localize`{{Variable Name}}`;
|
||||
envDataItem = { name: '', value: '', description: '' };
|
||||
envListColumns: ColumnItem[] = [
|
||||
{ title: $localize`Name`, type: 'input', key: 'name' },
|
||||
{ title: $localize`Value`, type: 'input', key: 'value' },
|
||||
{ title: $localize`Name`, type: 'input', key: 'name', maxlength: 65535 },
|
||||
{ title: $localize`Value`, type: 'input', key: 'value', maxlength: 65535 },
|
||||
{ title: $localize`:@@Description:Description`, type: 'input', key: 'description' },
|
||||
{
|
||||
title: $localize`Operate`,
|
||||
|
|
|
@ -1,45 +1,12 @@
|
|||
.env-select {
|
||||
--select-background-color: var(--background-color);
|
||||
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
|
||||
::ng-deep .ant-select .clear-btn:hover eo-iconpark-icon {
|
||||
background-color: var(--item-active-background-color);
|
||||
}
|
||||
|
||||
::ng-deep .ant-select .clear-btn:hover eo-iconpark-icon svg {
|
||||
color: var(--icon-color) !important;
|
||||
}
|
||||
|
||||
.clear-btn eo-iconpark-icon {
|
||||
padding: 3px;
|
||||
vertical-align: middle;
|
||||
border-radius: 50%;
|
||||
transform: translateY(-25%);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Modify component style
|
||||
|
||||
.ant-tabs-tab-remove {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
nz-divider {
|
||||
margin: 0.1em 0;
|
||||
}
|
||||
// nz-divider {
|
||||
// margin: 0.1em 0;
|
||||
// }
|
||||
|
||||
:host ::ng-deep {
|
||||
eo-ng-select eo-ng-select-top-control {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
||||
background-color: unset !important;
|
||||
border: unset !important;
|
||||
}
|
||||
|
||||
.ant-select {
|
||||
width: 140px;
|
||||
}
|
||||
|
@ -66,4 +33,19 @@ nz-divider {
|
|||
.preview-env .ant-popover-inner-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.env-select {
|
||||
.ant-select .clear-btn:hover eo-iconpark-icon {
|
||||
background-color: var(--item-active-background-color);
|
||||
}
|
||||
|
||||
.clear-btn eo-iconpark-icon {
|
||||
padding: 3px;
|
||||
border-radius: 50%;
|
||||
|
||||
svg {
|
||||
color: var(--danger-color) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ import { ApiStoreService } from '../../store/api-state.service';
|
|||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<nz-select
|
||||
<eo-ng-select
|
||||
[nzDropdownMatchSelectWidth]="false"
|
||||
[(ngModel)]="envUuid"
|
||||
class="env-select-componnet"
|
||||
|
@ -78,7 +78,7 @@ import { ApiStoreService } from '../../store/api-state.service';
|
|||
nzPlaceHolder="Environment"
|
||||
[nzClearIcon]="clearIconTemplate"
|
||||
>
|
||||
</nz-select>
|
||||
</eo-ng-select>
|
||||
<ng-template #renderTemplate>
|
||||
<ng-container *ngIf="!globalStore.isShare">
|
||||
<nz-divider></nz-divider>
|
||||
|
|
|
@ -34,6 +34,9 @@ export class ApiEditUtilService {
|
|||
item.partType = mui[tableName];
|
||||
// 0: request, 1: response
|
||||
item.paramType = ParamTypeEnum.REQUEST;
|
||||
item.paramAttr ??= {
|
||||
example: ''
|
||||
};
|
||||
return filterArrFun(item);
|
||||
}
|
||||
});
|
||||
|
@ -57,6 +60,9 @@ export class ApiEditUtilService {
|
|||
filterFn: item => {
|
||||
item.partType = mui[tableName];
|
||||
item.paramType = 1;
|
||||
item.paramAttr ??= {
|
||||
example: ''
|
||||
};
|
||||
return filterArrFun(item);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -11,6 +11,7 @@ import { ModalService } from 'pc/browser/src/app/services/modal.service';
|
|||
import { ApiService } from 'pc/browser/src/app/services/storage/api.service';
|
||||
import { MockCreateWay } from 'pc/browser/src/app/services/storage/db/models';
|
||||
import { ApiData } from 'pc/browser/src/app/services/storage/db/models/apiData';
|
||||
import { TraceService } from 'pc/browser/src/app/services/trace.service';
|
||||
import { StoreService } from 'pc/browser/src/app/shared/store/state.service';
|
||||
import { json2xml, table2json } from 'pc/browser/src/app/shared/utils/data-transfer/data-transfer.utils';
|
||||
import storageUtils from 'pc/browser/src/app/shared/utils/storage/storage.utils';
|
||||
|
@ -26,6 +27,7 @@ export class ApiMockService {
|
|||
private testUtils: ApiTestUtilService,
|
||||
private router: Router,
|
||||
private message: EoNgFeedbackMessageService,
|
||||
private trace: TraceService,
|
||||
private apiEffect: ApiEffectService,
|
||||
private projectApi: ProjectApiService,
|
||||
private modalService: ModalService,
|
||||
|
@ -114,6 +116,7 @@ export class ApiMockService {
|
|||
response: this.getMockResponseByAPI(apiData),
|
||||
apiUuid: apiUuid
|
||||
};
|
||||
this.trace.report('add_mock_success');
|
||||
this.addNewMock(data);
|
||||
}
|
||||
|
||||
|
@ -131,10 +134,12 @@ export class ApiMockService {
|
|||
queryParams: { uuid: data.id, pageID: Date.now().toString() }
|
||||
});
|
||||
}
|
||||
async toDelete(id: number) {
|
||||
async toDelete(id: number, mock_name: string) {
|
||||
const modelRef = this.modalService.confirm({
|
||||
nzTitle: $localize`Deletion Confirmation?`,
|
||||
nzContent: $localize``,
|
||||
nzContent: $localize`Are you sure you want to delete the data <strong title="${mock_name}">${
|
||||
mock_name.length > 50 ? `${mock_name.slice(0, 50)}...` : mock_name
|
||||
}</strong> ? You cannot restore it once deleted!`,
|
||||
nzOnOk: async () => {
|
||||
const data = await this.deleteMock(id);
|
||||
if (!data) {
|
||||
|
|
|
@ -218,6 +218,6 @@ export class MockComponent implements EditTabViewComponent {
|
|||
}
|
||||
|
||||
async handleDeleteMockItem() {
|
||||
await this.apiMock.toDelete(this.model.id);
|
||||
await this.apiMock.toDelete(this.model.id, this.model.name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,6 +156,13 @@ export class ApiTestUiComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|||
{ fireImmediately: true }
|
||||
)
|
||||
);
|
||||
|
||||
reaction(
|
||||
() => [this.model.request.scriptList],
|
||||
value => {
|
||||
console.log(value);
|
||||
}
|
||||
);
|
||||
}
|
||||
get beforeInject() {
|
||||
return this.getScript(1);
|
||||
|
@ -272,6 +279,7 @@ export class ApiTestUiComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|||
}
|
||||
changeUserSelectedContentType() {
|
||||
this.fixedHeaderAndContentType();
|
||||
this.modelChange.emit(this.model);
|
||||
}
|
||||
/**
|
||||
* Set headerParams and userSelectedContentType by bodyType
|
||||
|
|
|
@ -12,6 +12,7 @@ import {
|
|||
TabsConfig
|
||||
} from 'pc/browser/src/app/pages/workspace/project/api/constants/api.model';
|
||||
import { isInherited, NONE_AUTH_OPTION } from 'pc/browser/src/app/pages/workspace/project/api/constants/auth.model';
|
||||
import { ApiCaseService } from 'pc/browser/src/app/pages/workspace/project/api/http/test/api-case.service';
|
||||
import { ApiTestUiComponent, ContentTypeMap } from 'pc/browser/src/app/pages/workspace/project/api/http/test/api-test-ui.component';
|
||||
import {
|
||||
ContentType,
|
||||
|
@ -24,7 +25,7 @@ import { ProjectApiService } from 'pc/browser/src/app/pages/workspace/project/ap
|
|||
import { ApiTestResData } from 'pc/browser/src/app/pages/workspace/project/api/service/test-server/test-server.model';
|
||||
import { ApiEffectService } from 'pc/browser/src/app/pages/workspace/project/api/store/api-effect.service';
|
||||
import { ApiService } from 'pc/browser/src/app/services/storage/api.service';
|
||||
import { ApiTestHistory } from 'pc/browser/src/app/services/storage/db/models';
|
||||
import { ApiCase, ApiTestHistory } from 'pc/browser/src/app/services/storage/db/models';
|
||||
import { HeaderParam } from 'pc/browser/src/app/services/storage/db/models/apiData';
|
||||
import { eoDeepCopy, getDifference, isEmptyObj, JSONParse, whatTextType } from 'pc/browser/src/app/shared/utils/index.utils';
|
||||
import StorageUtil from 'pc/browser/src/app/shared/utils/storage/storage.utils';
|
||||
|
@ -82,8 +83,8 @@ export class ApiTestComponent implements EditTabViewComponent {
|
|||
private effect: ApiEffectService,
|
||||
private projectApi: ProjectApiService,
|
||||
private feedback: EoNgFeedbackMessageService,
|
||||
private api: ApiService,
|
||||
private apiTestUtil: ApiTestUtilService,
|
||||
private apiCase: ApiCaseService,
|
||||
@Inject(BASIC_TABS_INFO) public tabsConfig: TabsConfig
|
||||
) {}
|
||||
uiModelChange($event) {
|
||||
|
@ -311,7 +312,7 @@ export class ApiTestComponent implements EditTabViewComponent {
|
|||
this.isNameEdit = false;
|
||||
},
|
||||
delete: async () => {
|
||||
await this.effect.deleteCase(apiCaseUuid);
|
||||
this.apiCase.toDelete(this.model.request as ApiCase);
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<nz-divider nzType="vertical"></nz-divider>
|
||||
<span class="text-[12px]">Content-Type:</span>
|
||||
<eo-ng-select
|
||||
class="text-[12px]"
|
||||
class="text-[12px] !w-auto"
|
||||
[nzDropdownMatchSelectWidth]="false"
|
||||
(ngModelChange)="changeContentType($event)"
|
||||
[(ngModel)]="contentType"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Injectable, Inject, LOCALE_ID } from '@angular/core';
|
||||
import { toJS } from 'mobx';
|
||||
import { eoDeepCopy } from 'pc/browser/src/app/shared/utils/index.utils';
|
||||
|
||||
import { ElectronService } from '../../../../../../../core/services';
|
||||
import { ApiTestUtilService } from '../../api-test-util.service';
|
||||
|
@ -17,7 +18,8 @@ export class TestServerLocalNodeService extends TestServerService {
|
|||
}
|
||||
send(module, message) {
|
||||
console.log('[localNode]send message', message);
|
||||
this.electron.ipcRenderer.send(module, toJS(message));
|
||||
//!Prevent Proxy Object can't send ipcRender
|
||||
this.electron.ipcRenderer.send(module, eoDeepCopy(message));
|
||||
}
|
||||
close() {
|
||||
this.electron.ipcRenderer.removeAllListeners('unitTest');
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ElectronService } from 'pc/browser/src/app/core/services';
|
||||
import { LanguageService } from 'pc/browser/src/app/core/services/language/language.service';
|
||||
import { MessageService } from 'pc/browser/src/app/services/message';
|
||||
import { CategoryContributionPoints, FeatureContributionPoints } from 'pc/browser/src/app/pages/components/extension/extension.model';
|
||||
import { extensionMessageSubject } from 'pc/browser/src/app/shared/decorators';
|
||||
import { defaultExtensions } from 'pc/browser/src/app/shared/models/extension';
|
||||
import { FeatureInfo, ExtensionInfo, SidebarView } from 'pc/browser/src/app/shared/models/extension-manager';
|
||||
|
@ -33,7 +33,6 @@ export class ExtensionService {
|
|||
private extensionCommon: ExtensionCommonService,
|
||||
private language: LanguageService,
|
||||
private webExtensionService: WebExtensionService,
|
||||
private messageService: MessageService,
|
||||
public store: StoreService
|
||||
) {}
|
||||
async init() {
|
||||
|
@ -45,7 +44,11 @@ export class ExtensionService {
|
|||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//* Web Installl
|
||||
this.updateInstalledInfo(new Map(this.webExtensionService.installedList.map(obj => [obj.name, obj.pkgInfo])), {
|
||||
action: 'init'
|
||||
});
|
||||
const installedName = [];
|
||||
//Get extensions
|
||||
[...this.webExtensionService.installedList, ...(!this.store.getAppHasInitial ? defaultExtensions.map(name => ({ name })) : [])].forEach(
|
||||
|
@ -104,27 +107,33 @@ export class ExtensionService {
|
|||
isInstalled(name) {
|
||||
return this.installedList.includes(name);
|
||||
}
|
||||
public async requestList(type = 'list', queryParams = {}) {
|
||||
public async requestList(
|
||||
type = 'list',
|
||||
queryParams: { category?: CategoryContributionPoints; author?: string; keyword?: string; feature?: FeatureContributionPoints } = {}
|
||||
) {
|
||||
if (type === 'list' && !this.isFirstInit) {
|
||||
this.requestPending?.unsubscribe();
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const params = JSON.parse(JSON.stringify({ locale: this.language.systemLanguage, ...queryParams }));
|
||||
|
||||
this.requestPending = this.http.get<any>(`${this.HOST}/list`, { params }).subscribe({
|
||||
next: async result => {
|
||||
const debugExtensions = [];
|
||||
let debugExtensions = [];
|
||||
const originData = structuredClone(result.data);
|
||||
|
||||
if (type !== 'init') {
|
||||
for (let i = 0; i < this.webExtensionService.debugExtensionNames.length; i++) {
|
||||
const name = this.webExtensionService.debugExtensionNames[i];
|
||||
const hasExist = this.installedList.some(val => val.name === name);
|
||||
if (hasExist) continue;
|
||||
debugExtensions.push(await this.webExtensionService.getDebugExtensionsPkgInfo(name));
|
||||
//Debug extension
|
||||
if (this.electron.isElectron) {
|
||||
debugExtensions = this.installedList.filter(val => result.data.every(remoteExt => remoteExt.name !== val.name));
|
||||
} else {
|
||||
for (let i = 0; i < this.webExtensionService.debugExtensionNames.length; i++) {
|
||||
const name = this.webExtensionService.debugExtensionNames[i];
|
||||
const hasExist = this.installedList.some(val => val.name === name);
|
||||
if (hasExist) continue;
|
||||
debugExtensions.push(await this.webExtensionService.getDebugExtensionsPkgInfo(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result.data = [
|
||||
...debugExtensions,
|
||||
//Installed package
|
||||
|
@ -149,6 +158,28 @@ export class ExtensionService {
|
|||
return result;
|
||||
});
|
||||
|
||||
//Search Condition
|
||||
//? Prevent offiline and debug extension show in search result
|
||||
result.data = result.data.filter(n => {
|
||||
const isMatchCategories = queryParams.category && n.categories?.length ? n.categories?.includes(queryParams.category) : true;
|
||||
const isMatchFeature =
|
||||
queryParams.feature && n.features ? Object.keys(n.features).some(key => queryParams.feature === key) : true;
|
||||
const isMatchAuthor =
|
||||
!queryParams.author && !queryParams.keyword
|
||||
? true
|
||||
: n.author.toLocaleUpperCase().includes?.((queryParams.author || queryParams.keyword).toLocaleUpperCase());
|
||||
const isMatchKeyword = () => {
|
||||
if (!queryParams.keyword) return true;
|
||||
const info = n.i18n[0];
|
||||
const { title = n.title, description = n.description } = info.package;
|
||||
return (
|
||||
title.toLocaleUpperCase().includes(queryParams.keyword.toLocaleUpperCase()) &&
|
||||
description?.toLocaleUpperCase?.().includes(queryParams.keyword.toLocaleUpperCase())
|
||||
);
|
||||
};
|
||||
return isMatchFeature && isMatchCategories && isMatchAuthor && isMatchKeyword();
|
||||
});
|
||||
|
||||
//Get debug extensions
|
||||
this.webExtensionService.debugExtensions = result.data.filter(val => val.isDebug);
|
||||
|
||||
|
|
|
@ -156,6 +156,7 @@ export class WebExtensionService {
|
|||
}
|
||||
|
||||
async getPkgInfo(extName: string, version = 'latest') {
|
||||
if (!this.extensionCommon.getExtensionList?.length) return null;
|
||||
const newestExt = this.extensionCommon.getExtensionList.find(val => val.name === extName);
|
||||
version = version === 'latest' ? newestExt?.version || 'latest' : version;
|
||||
let pkgInfo;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import { UpdateSpec } from 'dexie';
|
||||
import {
|
||||
AuthTypeValue,
|
||||
INHERIT_AUTH_OPTION,
|
||||
isInherited,
|
||||
NONE_AUTH_OPTION
|
||||
} from 'pc/browser/src/app/pages/workspace/project/api/constants/auth.model';
|
||||
import { AuthTypeValue, isInherited, NONE_AUTH_OPTION } from 'pc/browser/src/app/pages/workspace/project/api/constants/auth.model';
|
||||
import { GroupModule } from 'pc/browser/src/app/pages/workspace/project/api/group-edit/group.module';
|
||||
import { dataSource } from 'pc/browser/src/app/services/storage/db/dataSource';
|
||||
import { ApiResponse } from 'pc/browser/src/app/services/storage/db/decorators/api-response.decorator';
|
||||
|
@ -12,7 +7,6 @@ import { GroupDeleteDto } from 'pc/browser/src/app/services/storage/db/dto/group
|
|||
import { Group, GroupModuleType, GroupType, ViewGroup } from 'pc/browser/src/app/services/storage/db/models';
|
||||
import { DbBaseService } from 'pc/browser/src/app/services/storage/db/services/base.service';
|
||||
import { serializeObj } from 'pc/browser/src/app/services/storage/db/utils';
|
||||
|
||||
// 对数据重新进行升序编排
|
||||
const formatSort = (arr: any[] = []) => {
|
||||
return arr
|
||||
|
@ -216,6 +210,13 @@ export class DbGroupService extends DbBaseService<Group> {
|
|||
|
||||
async bulkRead(params) {
|
||||
const result = await this.baseService.bulkRead(params);
|
||||
if (!result.data) {
|
||||
return {
|
||||
success: false,
|
||||
code: 1,
|
||||
data: null
|
||||
};
|
||||
}
|
||||
//! Warning case/mock/group id may dupublicate in local
|
||||
const { data: apiDataList } = await this.apiDataService.bulkRead({ projectUuid: params.projectUuid });
|
||||
const { data: mockDataList } = await this.mockDataService.bulkRead({ projectUuid: params.projectUuid });
|
||||
|
|
|
@ -6,7 +6,6 @@ import {
|
|||
ProjectBulkCreateDto,
|
||||
ProjectPageDto,
|
||||
ProjectDeleteDto,
|
||||
ProjectUpdateDto,
|
||||
ImportProjectDto,
|
||||
Collection
|
||||
} from 'pc/browser/src/app/services/storage/db/dto/project.dto';
|
||||
|
@ -303,7 +302,7 @@ export class DbProjectService extends DbBaseService<Project> {
|
|||
});
|
||||
|
||||
if (groups.length) {
|
||||
const groupIds = await this.apiGroupTable.bulkAdd(groups, { allKeys: true });
|
||||
const groupIds = (await this.groupService.bulkCreate(groups)).data.map(val => val.id);
|
||||
const remoteGroups = await this.apiGroupTable.bulkGet(groupIds);
|
||||
|
||||
for (const [index, localGroup] of groupList.entries()) {
|
||||
|
|
|
@ -7,6 +7,8 @@ const ErrorStyle = 'background-color: #a73836; color: #fff;padding:3px;box-sizin
|
|||
|
||||
const SuccessStyle = 'background-color: #316745; color: #fff;padding:3px;box-sizing: border-box;border-radius: 3px;';
|
||||
|
||||
const MessageStyle = 'color: #a73836;padding:3px;box-sizing: border-box;text-decoration-line: underline; font-weight: bold;';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
@ -42,6 +44,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -73,6 +76,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -108,6 +112,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -144,6 +149,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData - detail 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -171,6 +177,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData - list 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -207,6 +214,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -243,6 +251,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -278,6 +287,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase - detail 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -313,6 +323,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -372,6 +383,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c mock - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -408,6 +420,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c mock - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -453,6 +466,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c mock - list 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -484,6 +498,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c mock - detail 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -515,6 +530,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c mock - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -538,6 +554,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c group - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -574,6 +591,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c group - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -605,6 +623,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c group - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -636,6 +655,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c group - detail 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -671,6 +691,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c group - list 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -728,6 +749,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -768,6 +790,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory - list 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -803,6 +826,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory - detail 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -838,6 +862,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -874,6 +899,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c environment - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -915,6 +941,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c environment - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -946,6 +973,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c environment - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -977,6 +1005,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c environment - detail 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1004,6 +1033,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c environment - list 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1027,6 +1057,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1054,6 +1085,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1077,6 +1109,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1104,6 +1137,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - exportProject 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1131,6 +1165,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - create 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1158,6 +1193,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - list 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1189,6 +1225,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - update 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1212,6 +1249,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - delete 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1230,6 +1268,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - import 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1261,6 +1300,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - createSyncSetting 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1292,6 +1332,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - updateSyncSetting 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1327,6 +1368,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - delSyncSetting 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1357,6 +1399,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - getSyncSettingList 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
@ -1388,6 +1431,7 @@ export class LocalService {
|
|||
return resolve([null, { code, data }]);
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
console.log('%c project - syncBatchUpdate 接口调用失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
});
|
||||
|
|
|
@ -6,6 +6,8 @@ const ErrorStyle = 'background-color: #a73836; color: #fff;padding:3px;box-sizin
|
|||
|
||||
const SuccessStyle = 'background-color: #316745; color: #fff;padding:3px;box-sizing: border-box;border-radius: 3px;';
|
||||
|
||||
const MessageStyle = 'color: #a73836;padding:3px;box-sizing: border-box;text-decoration-line: underline; font-weight: bold;';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
|
@ -36,10 +38,11 @@ export class RemoteService {
|
|||
console.log('%c apiData:create - api_apiDataCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData:create - api_apiDataCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -71,10 +74,11 @@ export class RemoteService {
|
|||
console.log('%c apiData:update - api_apiDataUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData:update - api_apiDataUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -112,10 +116,11 @@ export class RemoteService {
|
|||
console.log('%c apiData:delete - api_apiDataDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData:delete - api_apiDataDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -151,10 +156,11 @@ export class RemoteService {
|
|||
console.log('%c apiData:detail - api_apiDataDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData:detail - api_apiDataDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -186,10 +192,11 @@ export class RemoteService {
|
|||
console.log('%c apiData:list - api_apiDataList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData:list - api_apiDataList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -210,10 +217,11 @@ export class RemoteService {
|
|||
console.log('%c apiData:getGroup - api_apiDataGetGroup 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiData:getGroup - api_apiDataGetGroup 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -252,10 +260,11 @@ export class RemoteService {
|
|||
console.log('%c apiCase:create - api_apiCaseCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase:create - api_apiCaseCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -294,10 +303,11 @@ export class RemoteService {
|
|||
console.log('%c apiCase:update - api_apiCaseUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase:update - api_apiCaseUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -333,10 +343,11 @@ export class RemoteService {
|
|||
console.log('%c apiCase:detail - api_apiCaseDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase:detail - api_apiCaseDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -372,10 +383,11 @@ export class RemoteService {
|
|||
console.log('%c apiCase:delete - api_apiCaseDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiCase:delete - api_apiCaseDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -437,10 +449,11 @@ export class RemoteService {
|
|||
console.log('%c mock:create - api_mockCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c mock:create - api_mockCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -472,10 +485,11 @@ export class RemoteService {
|
|||
console.log('%c mock:update - api_mockUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c mock:update - api_mockUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -519,10 +533,11 @@ export class RemoteService {
|
|||
console.log('%c mock:list - api_mockList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c mock:list - api_mockList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -558,10 +573,11 @@ export class RemoteService {
|
|||
console.log('%c mock:detail - api_mockDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c mock:detail - api_mockDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -597,10 +613,11 @@ export class RemoteService {
|
|||
console.log('%c mock:delete - api_mockDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c mock:delete - api_mockDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -621,10 +638,11 @@ export class RemoteService {
|
|||
console.log('%c group:create - api_groupCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c group:create - api_groupCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -663,10 +681,11 @@ export class RemoteService {
|
|||
console.log('%c group:update - api_groupUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c group:update - api_groupUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -702,10 +721,11 @@ export class RemoteService {
|
|||
console.log('%c group:delete - api_groupDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c group:delete - api_groupDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -741,10 +761,11 @@ export class RemoteService {
|
|||
console.log('%c group:detail - api_groupDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c group:detail - api_groupDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -780,10 +801,11 @@ export class RemoteService {
|
|||
console.log('%c group:list - api_groupList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c group:list - api_groupList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -843,10 +865,11 @@ export class RemoteService {
|
|||
console.log('%c apiTestHistory:create - api_apiTestHistoryCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory:create - api_apiTestHistoryCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -886,10 +909,11 @@ export class RemoteService {
|
|||
console.log('%c apiTestHistory:list - api_apiTestHistoryList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory:list - api_apiTestHistoryList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -925,10 +949,11 @@ export class RemoteService {
|
|||
console.log('%c apiTestHistory:detail - api_apiTestHistoryDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory:detail - api_apiTestHistoryDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -966,10 +991,11 @@ export class RemoteService {
|
|||
console.log('%c apiTestHistory:delete - api_apiTestHistoryDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c apiTestHistory:delete - api_apiTestHistoryDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1008,10 +1034,11 @@ export class RemoteService {
|
|||
console.log('%c environment:create - api_environmentCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c environment:create - api_environmentCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1055,10 +1082,11 @@ export class RemoteService {
|
|||
console.log('%c environment:update - api_environmentUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c environment:update - api_environmentUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1094,10 +1122,11 @@ export class RemoteService {
|
|||
console.log('%c environment:delete - api_environmentDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c environment:delete - api_environmentDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1133,10 +1162,11 @@ export class RemoteService {
|
|||
console.log('%c environment:detail - api_environmentDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c environment:detail - api_environmentDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1168,10 +1198,11 @@ export class RemoteService {
|
|||
console.log('%c environment:list - api_environmentList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c environment:list - api_environmentList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1187,10 +1218,11 @@ export class RemoteService {
|
|||
console.log('%c user:readInfo - api_userReadInfo 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:readInfo - api_userReadInfo 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1206,10 +1238,11 @@ export class RemoteService {
|
|||
console.log('%c user:updateInfo - api_userUpdateInfo 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:updateInfo - api_userUpdateInfo 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1230,10 +1263,11 @@ export class RemoteService {
|
|||
console.log('%c user:updatePassword - api_userUpdatePassword 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:updatePassword - api_userUpdatePassword 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1258,10 +1292,11 @@ export class RemoteService {
|
|||
console.log('%c user:login - api_userLogin 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:login - api_userLogin 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1277,10 +1312,11 @@ export class RemoteService {
|
|||
console.log('%c user:refreshToken - api_userRefreshToken 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:refreshToken - api_userRefreshToken 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1296,10 +1332,11 @@ export class RemoteService {
|
|||
console.log('%c user:logout - api_userLogout 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:logout - api_userLogout 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1324,10 +1361,11 @@ export class RemoteService {
|
|||
console.log('%c user:search - api_userSearch 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:search - api_userSearch 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1368,10 +1406,11 @@ export class RemoteService {
|
|||
console.log('%c user:thirdLogin - api_userThirdLogin 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:thirdLogin - api_userThirdLogin 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1392,10 +1431,11 @@ export class RemoteService {
|
|||
console.log('%c user:thirdLoginResult - api_userThirdLoginResult 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:thirdLoginResult - api_userThirdLoginResult 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1411,10 +1451,11 @@ export class RemoteService {
|
|||
console.log('%c user:getToken - api_userGetToken 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:getToken - api_userGetToken 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1430,10 +1471,11 @@ export class RemoteService {
|
|||
console.log('%c user:resetToken - api_userResetToken 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c user:resetToken - api_userResetToken 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1454,10 +1496,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:create - api_workspaceCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:create - api_workspaceCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1482,10 +1525,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:update - api_workspaceUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:update - api_workspaceUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1510,10 +1554,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:delete - api_workspaceDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:delete - api_workspaceDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1550,10 +1595,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:searchMember - api_workspaceSearchMember 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:searchMember - api_workspaceSearchMember 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1578,10 +1624,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:addMember - api_workspaceAddMember 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:addMember - api_workspaceAddMember 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1610,10 +1657,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:removeMember - api_workspaceRemoveMember 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:removeMember - api_workspaceRemoveMember 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1638,10 +1686,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:memberQuit - api_workspaceMemberQuit 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:memberQuit - api_workspaceMemberQuit 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1671,10 +1720,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:addMemberRole - api_workspaceAddMemberRole 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:addMemberRole - api_workspaceAddMemberRole 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1699,10 +1749,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:getMemberPermiss - api_workspaceGetMemberPermiss 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:getMemberPermiss - api_workspaceGetMemberPermiss 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1718,10 +1769,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:list - api_workspaceList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:list - api_workspaceList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1746,10 +1798,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:roles - api_workspaceRoles 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:roles - api_workspaceRoles 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1779,10 +1832,11 @@ export class RemoteService {
|
|||
console.log('%c workspace:setRole - api_workspaceSetRole 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c workspace:setRole - api_workspaceSetRole 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1814,10 +1868,11 @@ export class RemoteService {
|
|||
console.log('%c project:exportProject - api_projectExportProject 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:exportProject - api_projectExportProject 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1846,10 +1901,11 @@ export class RemoteService {
|
|||
console.log('%c project:memberList - api_projectMemberList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:memberList - api_projectMemberList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1874,10 +1930,11 @@ export class RemoteService {
|
|||
console.log('%c project:addMember - api_projectAddMember 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:addMember - api_projectAddMember 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1906,10 +1963,11 @@ export class RemoteService {
|
|||
console.log('%c project:delMember - api_projectDelMember 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:delMember - api_projectDelMember 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1938,10 +1996,11 @@ export class RemoteService {
|
|||
console.log('%c project:memberQuit - api_projectMemberQuit 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:memberQuit - api_projectMemberQuit 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1966,10 +2025,11 @@ export class RemoteService {
|
|||
console.log('%c project:setRole - api_projectSetRole 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:setRole - api_projectSetRole 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -1994,10 +2054,11 @@ export class RemoteService {
|
|||
console.log('%c project:getRole - api_projectGetRole 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:getRole - api_projectGetRole 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2022,10 +2083,11 @@ export class RemoteService {
|
|||
console.log('%c project:userPermission - api_projectUserPermission 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:userPermission - api_projectUserPermission 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2050,10 +2112,11 @@ export class RemoteService {
|
|||
console.log('%c project:create - api_projectCreate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:create - api_projectCreate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2082,10 +2145,11 @@ export class RemoteService {
|
|||
console.log('%c project:list - api_projectList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:list - api_projectList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2114,10 +2178,11 @@ export class RemoteService {
|
|||
console.log('%c project:update - api_projectUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:update - api_projectUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2142,10 +2207,11 @@ export class RemoteService {
|
|||
console.log('%c project:delete - api_projectDelete 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:delete - api_projectDelete 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2161,10 +2227,11 @@ export class RemoteService {
|
|||
console.log('%c project:import - api_projectImport 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:import - api_projectImport 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2198,10 +2265,11 @@ export class RemoteService {
|
|||
console.log('%c project:createSyncSetting - api_projectCreateSyncSetting 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:createSyncSetting - api_projectCreateSyncSetting 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2235,10 +2303,11 @@ export class RemoteService {
|
|||
console.log('%c project:updateSyncSetting - api_projectUpdateSyncSetting 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:updateSyncSetting - api_projectUpdateSyncSetting 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2274,10 +2343,11 @@ export class RemoteService {
|
|||
console.log('%c project:delSyncSetting - api_projectDelSyncSetting 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:delSyncSetting - api_projectDelSyncSetting 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2309,10 +2379,11 @@ export class RemoteService {
|
|||
console.log('%c project:getSyncSettingList - api_projectGetSyncSettingList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:getSyncSettingList - api_projectGetSyncSettingList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2346,10 +2417,11 @@ export class RemoteService {
|
|||
console.log('%c project:syncBatchUpdate - api_projectSyncBatchUpdate 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c project:syncBatchUpdate - api_projectSyncBatchUpdate 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2365,10 +2437,11 @@ export class RemoteService {
|
|||
console.log('%c role:list - api_roleList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c role:list - api_roleList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2396,10 +2469,11 @@ export class RemoteService {
|
|||
console.log('%c projectShare:createShare - api_projectShareCreateShare 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c projectShare:createShare - api_projectShareCreateShare 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2431,10 +2505,11 @@ export class RemoteService {
|
|||
console.log('%c projectShare:getShareLink - api_projectShareGetShareLink 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c projectShare:getShareLink - api_projectShareGetShareLink 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2459,10 +2534,11 @@ export class RemoteService {
|
|||
console.log('%c projectShare:deleteShare - api_projectShareDeleteShare 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c projectShare:deleteShare - api_projectShareDeleteShare 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2487,10 +2563,11 @@ export class RemoteService {
|
|||
console.log('%c share:projectDetail - api_shareProjectDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c share:projectDetail - api_shareProjectDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2519,10 +2596,11 @@ export class RemoteService {
|
|||
console.log('%c share:groupList - api_shareGroupList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c share:groupList - api_shareGroupList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2551,10 +2629,11 @@ export class RemoteService {
|
|||
console.log('%c share:apiDataDetail - api_shareApiDataDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c share:apiDataDetail - api_shareApiDataDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2583,10 +2662,11 @@ export class RemoteService {
|
|||
console.log('%c share:mockDetail - api_shareMockDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c share:mockDetail - api_shareMockDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2615,10 +2695,11 @@ export class RemoteService {
|
|||
console.log('%c share:caseDetail - api_shareCaseDetail 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c share:caseDetail - api_shareCaseDetail 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
@ -2643,10 +2724,11 @@ export class RemoteService {
|
|||
console.log('%c share:environmentList - api_shareEnvironmentList 接口请求成功 %c', SuccessStyle, '');
|
||||
return resolve([data, null]);
|
||||
}
|
||||
console.log('Error: ', message);
|
||||
console.log(`%c Error: ${message} %c`, MessageStyle, '');
|
||||
resolve([null, { code, message, data }]);
|
||||
},
|
||||
error: error => {
|
||||
console.log(error);
|
||||
console.log('%c share:environmentList - api_shareEnvironmentList 接口请求失败 %c', ErrorStyle, '');
|
||||
resolve([null, error]);
|
||||
}
|
||||
|
|
|
@ -29,109 +29,95 @@ const compMap = {
|
|||
],
|
||||
template: `
|
||||
<form @animateTrigger *ngIf="isInited && validateForm" nz-form [formGroup]="validateForm" [nzNoColon]="true" class="form">
|
||||
<nz-form-item nz-col class="flex-1" *ngFor="let field of objectKeys(properties)">
|
||||
<ng-container *ngIf="properties[field]?.label">
|
||||
<nz-form-label
|
||||
nzFor="{{ field }}"
|
||||
[nzSpan]="properties[field]?.span ?? 24"
|
||||
[nzRequired]="properties[field]?.required"
|
||||
class="label font-bold"
|
||||
>
|
||||
{{ properties[field]?.label }}
|
||||
<nz-form-item nz-col class="flex-1" *ngFor="let item of properties">
|
||||
<ng-container *ngIf="item?.label">
|
||||
<nz-form-label nzFor="{{ item.key }}" [nzSpan]="item?.span ?? 24" [nzRequired]="item?.required" class="label font-bold">
|
||||
{{ item?.label }}
|
||||
</nz-form-label>
|
||||
</ng-container>
|
||||
|
||||
<nz-form-control nzErrorTip="{{ placeholderTips }} {{ properties[field]?.label }}" class="form-control">
|
||||
<nz-form-control nzErrorTip="{{ placeholderTips }} {{ item?.label }}" class="form-control">
|
||||
<!-- Description -->
|
||||
<div *ngIf="properties[field]?.type !== 'boolean' && properties[field]?.description" class="text-[12px] mb-[8px] text-tips">
|
||||
{{ properties[field]?.description }}
|
||||
<div *ngIf="item?.type !== 'boolean' && item?.description" class="text-[12px] mb-[8px] text-tips">
|
||||
{{ item?.description }}
|
||||
</div>
|
||||
<!-- String -->
|
||||
<ng-container *ngIf="properties[field].ui.widget === compMap.string">
|
||||
<ng-container *ngIf="item.ui.widget === compMap.string">
|
||||
<input
|
||||
type="text"
|
||||
eo-ng-input
|
||||
id="{{ field }}"
|
||||
[disabled]="properties[field]?.disabled"
|
||||
placeholder="{{ properties[field]?.placeholder ?? placeholderTips + (properties[field]?.label || '') }}"
|
||||
formControlName="{{ field }}"
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ item.key }}"
|
||||
[disabled]="item?.disabled"
|
||||
placeholder="{{ item?.placeholder ?? placeholderTips + (item?.label || '') }}"
|
||||
formControlName="{{ item.key }}"
|
||||
[(ngModel)]="model[item.key]"
|
||||
maxlength="65535"
|
||||
/>
|
||||
</ng-container>
|
||||
|
||||
<!-- String -->
|
||||
<ng-container *ngIf="properties[field].ui.widget === 'textarea'">
|
||||
<ng-container *ngIf="item.ui.widget === 'textarea'">
|
||||
<textarea
|
||||
type="text"
|
||||
eo-ng-input
|
||||
id="{{ field }}"
|
||||
[disabled]="properties[field]?.disabled"
|
||||
placeholder="{{ properties[field]?.placeholder ?? placeholderTips + (properties[field]?.label || '') }}"
|
||||
formControlName="{{ field }}"
|
||||
[rows]="properties[field].ui.rows ?? 4"
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ item.key }}"
|
||||
[disabled]="item?.disabled"
|
||||
placeholder="{{ item?.placeholder ?? placeholderTips + (item?.label || '') }}"
|
||||
formControlName="{{ item.key }}"
|
||||
[rows]="item.ui.rows ?? 4"
|
||||
[(ngModel)]="model[item.key]"
|
||||
></textarea>
|
||||
</ng-container>
|
||||
|
||||
<!-- Switch -->
|
||||
<ng-container *ngIf="properties[field].ui.widget === compMap.boolean">
|
||||
<eo-ng-switch
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ field }}"
|
||||
[nzDisabled]="properties[field]?.disabled"
|
||||
formControlName="{{ field }}"
|
||||
>
|
||||
{{ properties[field]?.description }}
|
||||
<ng-container *ngIf="item.ui.widget === compMap.boolean">
|
||||
<eo-ng-switch [(ngModel)]="model[item.key]" id="{{ item.key }}" [nzDisabled]="item?.disabled" formControlName="{{ item.key }}">
|
||||
{{ item?.description }}
|
||||
</eo-ng-switch>
|
||||
</ng-container>
|
||||
|
||||
<!-- Number -->
|
||||
<ng-container *ngIf="properties[field]?.ui.widget === compMap.number">
|
||||
<ng-container *ngIf="item?.ui.widget === compMap.number">
|
||||
<nz-input-number
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ field }}"
|
||||
[nzDisabled]="properties[field]?.disabled"
|
||||
formControlName="{{ field }}"
|
||||
[(ngModel)]="model[item.key]"
|
||||
id="{{ item.key }}"
|
||||
[nzDisabled]="item?.disabled"
|
||||
formControlName="{{ item.key }}"
|
||||
>
|
||||
{{ properties[field]?.description }}
|
||||
{{ item?.description }}
|
||||
</nz-input-number>
|
||||
</ng-container>
|
||||
|
||||
<!-- Radio -->
|
||||
<ng-container *ngIf="properties[field]?.type !== 'array' && properties[field].ui.widget === 'radio'">
|
||||
<ng-container *ngIf="item?.type !== 'array' && item.ui.widget === 'radio'">
|
||||
<eo-ng-radio-group
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ field }}"
|
||||
[nzDisabled]="properties[field]?.disabled"
|
||||
formControlName="{{ field }}"
|
||||
[(ngModel)]="model[item.key]"
|
||||
id="{{ item.key }}"
|
||||
[nzDisabled]="item?.disabled"
|
||||
formControlName="{{ item.key }}"
|
||||
>
|
||||
<label *ngFor="let item of properties[field]?.oneOf" eo-ng-radio [nzValue]="item.default ?? item.const">
|
||||
<label *ngFor="let item of item?.oneOf" eo-ng-radio [nzValue]="item.default ?? item.const">
|
||||
{{ item.title }}
|
||||
</label>
|
||||
</eo-ng-radio-group>
|
||||
</ng-container>
|
||||
|
||||
<!-- Select -->
|
||||
<ng-container *ngIf="properties[field].ui.widget === 'select'">
|
||||
<eo-ng-select
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ field }}"
|
||||
[nzDisabled]="properties[field]?.disabled"
|
||||
formControlName="{{ field }}"
|
||||
>
|
||||
<eo-ng-option *ngFor="let item of properties[field]?.enum" [nzValue]="item.value" [nzLabel]="item.label"></eo-ng-option>
|
||||
<ng-container *ngIf="item.ui.widget === 'select'">
|
||||
<eo-ng-select [(ngModel)]="model[item.key]" id="{{ item.key }}" [nzDisabled]="item?.disabled" formControlName="{{ item.key }}">
|
||||
<eo-ng-option *ngFor="let item of item?.enum" [nzValue]="item.value" [nzLabel]="item.label"></eo-ng-option>
|
||||
</eo-ng-select>
|
||||
</ng-container>
|
||||
|
||||
<!-- Checkbox -->
|
||||
<ng-container *ngIf="properties[field]?.type === 'boolean' && properties[field].ui.widget === 'checkbox'">
|
||||
<ng-container *ngIf="item?.type === 'boolean' && item.ui.widget === 'checkbox'">
|
||||
<label
|
||||
eo-ng-checkbox
|
||||
[(ngModel)]="model[field]"
|
||||
id="{{ field }}"
|
||||
[nzDisabled]="properties[field]?.disabled"
|
||||
formControlName="{{ field }}"
|
||||
>{{ properties[field]?.title }}</label
|
||||
[(ngModel)]="model[item.key]"
|
||||
id="{{ item.key }}"
|
||||
[nzDisabled]="item?.disabled"
|
||||
formControlName="{{ item.key }}"
|
||||
>{{ item?.title }}</label
|
||||
>
|
||||
</ng-container>
|
||||
</nz-form-control>
|
||||
|
@ -145,9 +131,10 @@ export class EoSchemaFormComponent implements OnChanges {
|
|||
@Output() readonly valueChanges: EventEmitter<any> = new EventEmitter<any>();
|
||||
validateForm!: FormGroup;
|
||||
objectKeys = Object.keys;
|
||||
properties = {};
|
||||
properties = [];
|
||||
compMap = compMap;
|
||||
isInited = true;
|
||||
thenMap = {};
|
||||
placeholderTips = $localize`Please enter `;
|
||||
constructor(private fb: FormBuilder) {
|
||||
this.validateForm = this.fb.group({});
|
||||
|
@ -184,16 +171,16 @@ export class EoSchemaFormComponent implements OnChanges {
|
|||
updateControls() {
|
||||
if (this.validateForm?.controls) {
|
||||
Object.keys(this.validateForm.controls).forEach(key => {
|
||||
if (!Reflect.has(this.properties, key)) {
|
||||
if (this.properties.findIndex(item => item.key === key) === -1) {
|
||||
this.validateForm.removeControl(key);
|
||||
}
|
||||
});
|
||||
}
|
||||
Object.entries<any>(this.properties).forEach(([key, value]) => {
|
||||
if (value.required) {
|
||||
this.validateForm.addControl(key, new UntypedFormControl(null, Validators.required));
|
||||
this.properties.forEach(item => {
|
||||
if (item.required) {
|
||||
this.validateForm.addControl(item.key, new UntypedFormControl(null, Validators.required));
|
||||
} else {
|
||||
this.validateForm.addControl(key, new UntypedFormControl(null));
|
||||
this.validateForm.addControl(item.key, new UntypedFormControl(null));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -208,6 +195,11 @@ export class EoSchemaFormComponent implements OnChanges {
|
|||
if (Reflect.has(value, 'const')) {
|
||||
prev[key] ??= {};
|
||||
prev[key][value.const] = curr;
|
||||
} else if (Reflect.has(value, 'enum')) {
|
||||
prev[key] ??= {};
|
||||
value.enum.forEach(ele => {
|
||||
prev[key][ele] = curr;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -221,14 +213,21 @@ export class EoSchemaFormComponent implements OnChanges {
|
|||
let __value = this.model[key];
|
||||
Object.defineProperty(this.model, key, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: () => {
|
||||
return __value;
|
||||
},
|
||||
set: val => {
|
||||
const conf = ifFields[key]?.[val]?.then;
|
||||
this.thenMap[key] = { then: conf };
|
||||
if (isInit || val !== this.model[key]) {
|
||||
if (conf?.properties) {
|
||||
this.formatProperties({ ...configuration?.properties, ...conf.properties });
|
||||
const propertiesArr: any = Object.entries(this.configuration?.properties);
|
||||
Object.entries(this.thenMap).forEach(([key, value]) => {
|
||||
const findIndex = propertiesArr.findIndex(ele => ele[0] === key);
|
||||
propertiesArr.splice(findIndex + 1, 0, ...Object.entries((value as { then: any }).then.properties));
|
||||
});
|
||||
this.formatProperties(propertiesArr);
|
||||
isInit = false;
|
||||
}
|
||||
if (conf) {
|
||||
|
@ -244,16 +243,17 @@ export class EoSchemaFormComponent implements OnChanges {
|
|||
}
|
||||
}
|
||||
|
||||
formatProperties(properties = {}) {
|
||||
this.properties = Object.entries<any>({ ...this.configuration?.properties, ...properties }).reduce((prev, [key, value]) => {
|
||||
prev[key] = value;
|
||||
// 不指定组件 则默认根据数据类型生成对应组件
|
||||
formatProperties(properties: any = []) {
|
||||
const propertiesArr = properties.length > 0 ? properties : Object.entries(this.configuration?.properties);
|
||||
// const propertiesArr = [...Object.entries(this.configuration?.properties), ...properties];
|
||||
this.properties = propertiesArr.map(([key, value]) => {
|
||||
value.ui = {
|
||||
widget: compMap[value.type],
|
||||
...value.ui
|
||||
};
|
||||
return prev;
|
||||
}, {});
|
||||
return { ...value, key: key };
|
||||
});
|
||||
this.properties2Model(this.properties);
|
||||
this.updateControls();
|
||||
}
|
||||
|
||||
|
@ -264,8 +264,8 @@ export class EoSchemaFormComponent implements OnChanges {
|
|||
*/
|
||||
private properties2Model(properties) {
|
||||
// Flat configuration object
|
||||
Object.entries<any>(properties).forEach(([fieldKey, fieldValue]) => {
|
||||
this.model[fieldKey] ??= fieldValue.default ?? fieldValue.const;
|
||||
this.properties.forEach(item => {
|
||||
this.model[item.key] ??= item.default ?? item.const;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,13 @@ export interface ExtensionInfo {
|
|||
name: string;
|
||||
version: string;
|
||||
browser: string;
|
||||
author: string | { name: 'string' };
|
||||
author: string;
|
||||
//Entry js file,webRender environment
|
||||
main: string;
|
||||
// extension description
|
||||
description: string;
|
||||
//CategoryContributionPoints
|
||||
categories: any[];
|
||||
|
||||
//* Postcat extend
|
||||
//Entry js file,node environment
|
||||
|
|
|
@ -18,7 +18,6 @@ import { NzListModule } from 'ng-zorro-antd/list';
|
|||
import { NzModalModule } from 'ng-zorro-antd/modal';
|
||||
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
||||
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
||||
import { NzSelectModule } from 'ng-zorro-antd/select';
|
||||
import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
|
||||
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
||||
import { NzTypographyModule } from 'ng-zorro-antd/typography';
|
||||
|
@ -63,7 +62,6 @@ const SHARED_UI_MODULE = [
|
|||
NzEmptyModule,
|
||||
NzModalModule,
|
||||
NzListModule,
|
||||
NzSelectModule,
|
||||
NzPopconfirmModule
|
||||
];
|
||||
const SHARED_MODULE = [CommonModule, FormsModule, RouterModule, ReactiveFormsModule];
|
||||
|
|
|
@ -205,7 +205,7 @@ export class StoreService {
|
|||
this.setPageLevel();
|
||||
}
|
||||
});
|
||||
|
||||
//TODO Only add beforeunload listeners conditionally: https://web.dev/bfcache/?utm_source=devtools#never-use-the-unload-event
|
||||
window.addEventListener('beforeunload', e => {
|
||||
this.setAppHasInitial();
|
||||
});
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
{
|
||||
"colors": {
|
||||
"primary": "#7371fc",
|
||||
"text": "#fff",
|
||||
"inputIcon": "#fff",
|
||||
"text": "#ccc",
|
||||
"inputIcon": "#ccc",
|
||||
"textSecondary": "#ccc",
|
||||
"border": "rgba(255, 255, 255, 0.05)",
|
||||
"background": "#212121",
|
||||
"barBackground": "#212121",
|
||||
"barBackground": "#2d2d2d",
|
||||
"disabledText": "#666",
|
||||
"disabledBackground": "#282828",
|
||||
"textLink": "#1890ff",
|
||||
"layoutHeaderBackground": "rgb(60, 60, 60)",
|
||||
"layoutSidebarBackground": "#2d2d2d",
|
||||
"layoutSidebarText": "rgba(255, 255, 255, 0.4)",
|
||||
"layoutFooterBackground": "rgb(60, 60, 60)",
|
||||
"layoutFooterText": "rgba(255, 255, 255, 0.4)",
|
||||
"textLinkHover": "#40a9ff",
|
||||
"textLinkActive": "#096dd9",
|
||||
"divider": "rgba(255, 255, 255, 0.05)",
|
||||
|
|
|
@ -46,27 +46,6 @@
|
|||
}
|
||||
}
|
||||
</style>
|
||||
<!-- Start of Howxm client code snippet -->
|
||||
<script>
|
||||
function _howxm() {
|
||||
_howxmQueue.push(arguments);
|
||||
}
|
||||
window._howxmQueue = window._howxmQueue || [];
|
||||
_howxm('setAppID', '98a572dc-e95d-474f-8c6f-2044d4d1b9db');
|
||||
(function () {
|
||||
var scriptId = 'howxm_script';
|
||||
if (!document.getElementById(scriptId)) {
|
||||
var e = document.createElement('script'),
|
||||
t = document.getElementsByTagName('script')[0];
|
||||
e.setAttribute('id', scriptId);
|
||||
e.type = 'text/javascript';
|
||||
e.async = !0;
|
||||
e.src = 'https://static.howxm.com/sdk.js';
|
||||
t.parentNode.insertBefore(e, t);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<!-- End of Howxm client code snippet -->
|
||||
</head>
|
||||
<!-- Angular Cli need for node modules -->
|
||||
<script>
|
||||
|
|
|
@ -162,10 +162,6 @@ p {
|
|||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.ant-input-number:focus,
|
||||
.ant-input-number-focused {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.ant-result-title,
|
||||
.ant-list-item,
|
||||
|
@ -306,6 +302,10 @@ Theme color
|
|||
border-color: var(--input-hover-border-color);
|
||||
}
|
||||
}
|
||||
.ant-input-number:focus,
|
||||
.ant-input-number-focused {
|
||||
box-shadow: none;
|
||||
}
|
||||
.ant-list-item-action li {
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
"author": "Postcat",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@grpc/grpc-js": "1.7.3",
|
||||
"@grpc/proto-loader": "0.7.3",
|
||||
"@grpc/grpc-js": "1.8.13",
|
||||
"@grpc/proto-loader": "0.7.6",
|
||||
"@koa/cors": "3.3.0",
|
||||
"axios": "1.3.4",
|
||||
"content-disposition": "^0.5.4",
|
||||
|
|
|
@ -23,21 +23,23 @@ const operateExtension = (name, version = 'latest', operate = 'install') => {
|
|||
});
|
||||
});
|
||||
};
|
||||
//TODO save version at extensionMap
|
||||
const loadExtension = async ({ name, version = 'latest' }) => {
|
||||
//* Chek latest version
|
||||
const allExtensionRes = await axios.get('https://extensions.postcat.com/list').catch(error => {});
|
||||
const extensionPkgInfo = allExtensionRes?.data?.data.find(val => val.name === name);
|
||||
if (!extensionPkgInfo) return [null, `Can't Find Extension #${name}`];
|
||||
version = extensionPkgInfo.version || version;
|
||||
|
||||
// * Is extension in Map cache ?
|
||||
//TODO save version at extensionMap
|
||||
const hasIt = extensionMap.has(`${name}:${version}`);
|
||||
|
||||
// * If true, then get the function.
|
||||
if (hasIt) {
|
||||
return [extensionMap.get(`${name}:${version}`, null)];
|
||||
}
|
||||
|
||||
//* Chek latest version
|
||||
const allExtensionRes = await axios.get('https://extensions.postcat.com/list').catch(error => {});
|
||||
const extensionPkgInfo = allExtensionRes?.data?.data.find(val => val.name === name);
|
||||
//GET version when not in electron,becasue electron may has debug extension
|
||||
if (!isElectron) {
|
||||
if (!extensionPkgInfo) return [null, `Can't Find Extension ${name}`];
|
||||
version = extensionPkgInfo.version || version;
|
||||
}
|
||||
let cache = {};
|
||||
|
||||
// * If false, then install the extension and save to map cache then get the function.
|
||||
|
|
|
@ -18,7 +18,7 @@ test('Basic Operate', async ({ page }) => {
|
|||
await page.locator('form').first().click();
|
||||
await ifTipsExist(page, 'Edited Case Name successfully');
|
||||
//Edit Case
|
||||
await page.getByPlaceholder('Enter URL or Curl text').fill('/pet1');
|
||||
await page.getByPlaceholder('Enter URL, #AI Prompt or Curl text').fill('/pet1');
|
||||
await page.getByText('REST').click();
|
||||
await page.getByText('Query').click();
|
||||
await page.getByText('Headers').click();
|
||||
|
@ -44,7 +44,7 @@ test('Add Test From API Test', async ({ page }) => {
|
|||
await page.locator('form').first().click();
|
||||
await ifTipsExist(page, 'Edited Case Name successfully');
|
||||
//Edit Case
|
||||
await page.getByPlaceholder('Enter URL or Curl text').fill('/pet1');
|
||||
await page.getByPlaceholder('Enter URL, #AI Prompt or Curl text').fill('/pet1');
|
||||
await page.getByText('REST').click();
|
||||
await page.getByText('Query').click();
|
||||
await page.getByText('Headers').click();
|
||||
|
@ -53,5 +53,6 @@ test('Add Test From API Test', async ({ page }) => {
|
|||
await ifTipsExist(page, 'Edited Case successfully');
|
||||
//Delete Case
|
||||
await clickButtonByIconName(page, 'delete');
|
||||
await page.getByRole('button', { name: 'OK' }).click();
|
||||
await ifTipsExist(page, 'Successfully deleted');
|
||||
});
|
||||
|
|
|
@ -265,3 +265,8 @@ test('Import Curl Test', async ({ page }) => {
|
|||
// const res1 = await testAndWaitForResponse(page);
|
||||
// expect(res1.body).toEqual(`form=value&f1orm2=value`);
|
||||
});
|
||||
|
||||
/**
|
||||
* Global Varibale Test
|
||||
*/
|
||||
test('Auth Request', async ({ page }) => {});
|
||||
|
|
Loading…
Reference in New Issue