@@ -84,8 +81,7 @@
v-for="item in dropdownList"
:key="item.title"
ext-cls="dropdown-item"
- @click="item.click"
- >
+ @click="item.click">
{{ item.title }}
@@ -107,431 +103,439 @@
diff --git a/bcs-services/bcs-bscp/ui/src/components/layout-top-bar.vue b/bcs-services/bcs-bscp/ui/src/components/layout-top-bar.vue
index daf9fdb73c..5b051d6ec2 100644
--- a/bcs-services/bcs-bscp/ui/src/components/layout-top-bar.vue
+++ b/bcs-services/bcs-bscp/ui/src/components/layout-top-bar.vue
@@ -12,41 +12,39 @@
diff --git a/bcs-services/bcs-bscp/ui/src/components/permission-input-picker.vue b/bcs-services/bcs-bscp/ui/src/components/permission-input-picker.vue
index 51808510d5..22472c35dc 100644
--- a/bcs-services/bcs-bscp/ui/src/components/permission-input-picker.vue
+++ b/bcs-services/bcs-bscp/ui/src/components/permission-input-picker.vue
@@ -5,15 +5,13 @@
theme="light"
trigger="manual"
placement="top"
- :is-show="showPrivilegeErrorTips"
- >
+ :is-show="showPrivilegeErrorTips">
+ @blur="handleInputBlur" />
{{ t('只能输入三位 0~7 数字') }}
@@ -33,8 +31,7 @@
+ @change="handleSelect(index, $event)">
{{ t('读') }}
{{ t('写') }}
{{ t('执行') }}
@@ -47,154 +44,154 @@
diff --git a/bcs-services/bcs-bscp/ui/src/components/permission/apply-dialog.vue b/bcs-services/bcs-bscp/ui/src/components/permission/apply-dialog.vue
index 10850c83ff..a5c95745cb 100644
--- a/bcs-services/bcs-bscp/ui/src/components/permission/apply-dialog.vue
+++ b/bcs-services/bcs-bscp/ui/src/components/permission/apply-dialog.vue
@@ -6,8 +6,7 @@
:is-show="show"
:esc-close="false"
:quick-close="false"
- @closed="handleClose"
- >
+ @closed="handleClose">
diff --git a/bcs-services/bcs-bscp/ui/src/components/table/table-empty.vue b/bcs-services/bcs-bscp/ui/src/components/table/table-empty.vue
index 390fc17b3b..a83d5edf07 100644
--- a/bcs-services/bcs-bscp/ui/src/components/table/table-empty.vue
+++ b/bcs-services/bcs-bscp/ui/src/components/table/table-empty.vue
@@ -1,47 +1,43 @@
-
-
- {{ t('可以尝试 调整关键词 或') }} {{ t('清空筛选条件') }}
-
+
+
+
+ {{ t('可以尝试 调整关键词 或') }}
+ {{ t('清空筛选条件') }}
+
+
diff --git a/bcs-services/bcs-bscp/ui/src/components/version-log.vue b/bcs-services/bcs-bscp/ui/src/components/version-log.vue
index 2e3e5dc932..73aa7afa76 100644
--- a/bcs-services/bcs-bscp/ui/src/components/version-log.vue
+++ b/bcs-services/bcs-bscp/ui/src/components/version-log.vue
@@ -1,13 +1,15 @@
+ @closed="emits('update:isShow', false)"
+ ext-cls="version-dialog">
@@ -34,99 +36,99 @@
diff --git a/bcs-services/bcs-bscp/ui/src/constants/config.ts b/bcs-services/bcs-bscp/ui/src/constants/config.ts
index f5b6a53d61..014d12cc39 100644
--- a/bcs-services/bcs-bscp/ui/src/constants/config.ts
+++ b/bcs-services/bcs-bscp/ui/src/constants/config.ts
@@ -1,5 +1,5 @@
import { IConfigVersion } from '../../types/config';
-import { localT } from '../i18n';
+import { localT } from '../i18n';
// kv类型的配置项包含的子类型
export const CONFIG_KV_TYPE = [
{ id: 'string', name: 'String' },
diff --git a/bcs-services/bcs-bscp/ui/src/constants/group.ts b/bcs-services/bcs-bscp/ui/src/constants/group.ts
index 3af6ea5517..6ea6e0b092 100644
--- a/bcs-services/bcs-bscp/ui/src/constants/group.ts
+++ b/bcs-services/bcs-bscp/ui/src/constants/group.ts
@@ -1,4 +1,4 @@
-export default [
+export default [
{ id: 'eq', name: '=' },
{ id: 'ne', name: '!=' },
{ id: 'gt', name: '>' },
diff --git a/bcs-services/bcs-bscp/ui/src/css/common.scss b/bcs-services/bcs-bscp/ui/src/css/common.scss
index 4703571dea..b440e23c6b 100644
--- a/bcs-services/bcs-bscp/ui/src/css/common.scss
+++ b/bcs-services/bcs-bscp/ui/src/css/common.scss
@@ -33,4 +33,4 @@
.info-box-style .bk-modal-content {
min-height: auto !important;
-}
\ No newline at end of file
+}
diff --git a/bcs-services/bcs-bscp/ui/src/css/font.css b/bcs-services/bcs-bscp/ui/src/css/font.css
index 1a7366b1b2..45389bf184 100644
--- a/bcs-services/bcs-bscp/ui/src/css/font.css
+++ b/bcs-services/bcs-bscp/ui/src/css/font.css
@@ -1,95 +1,97 @@
@font-face {
- font-family: "bk-bscp";
- src: url("../assets/fonts/iconcool.svg#iconcool") format("svg"),
- url("../assets/fonts/iconcool.ttf") format("truetype"),
- url("../assets/fonts/iconcool.woff") format("woff"),
- url("../assets/fonts/iconcool.eot?#iefix") format("embedded-opentype");
- src: url("../assets/fonts/iconcool.svg#iconcool") format("svg"),
- url("../assets/fonts/iconcool.ttf") format("truetype"),
- url("../assets/fonts/iconcool.woff") format("woff"),
- url("../assets/fonts/iconcool.eot?#iefix") format("embedded-opentype");
- font-weight: normal;
- font-style: normal;
+ font-family: 'bk-bscp';
+ src:
+ url('../assets/fonts/iconcool.svg#iconcool') format('svg'),
+ url('../assets/fonts/iconcool.ttf') format('truetype'),
+ url('../assets/fonts/iconcool.woff') format('woff'),
+ url('../assets/fonts/iconcool.eot?#iefix') format('embedded-opentype');
+ src:
+ url('../assets/fonts/iconcool.svg#iconcool') format('svg'),
+ url('../assets/fonts/iconcool.ttf') format('truetype'),
+ url('../assets/fonts/iconcool.woff') format('woff'),
+ url('../assets/fonts/iconcool.eot?#iefix') format('embedded-opentype');
+ font-weight: normal;
+ font-style: normal;
}
.bk-bscp-icon {
- /* use !important to prevent issues with browser extensions that change fonts */
- font-family: 'bk-bscp' !important;
- speak: none;
- font-style: normal;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
- line-height: 1;
- text-align: center;
- /* Better Font Rendering =========== */
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
+ /* use !important to prevent issues with browser extensions that change fonts */
+ font-family: 'bk-bscp' !important;
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ text-align: center;
+ /* Better Font Rendering =========== */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
}
.icon-help-fill:before {
- content: "\e107";
+ content: '\e107';
}
.icon-help:before {
- content: "\e106";
+ content: '\e106';
}
.icon-help-document-fill:before {
- content: "\e105";
+ content: '\e105';
}
.icon-edit-small:before {
- content: "\e104";
+ content: '\e104';
}
.icon-configuration-line:before {
- content: "\e101";
+ content: '\e101';
}
.icon-time-2:before {
- content: "\e102";
+ content: '\e102';
}
.icon-reduce:before {
- content: "\e108";
+ content: '\e108';
}
.icon-add:before {
- content: "\e109";
+ content: '\e109';
}
.icon-app-store:before {
- content: "\e10a";
+ content: '\e10a';
}
.icon-revoke:before {
- content: "\e10b";
+ content: '\e10b';
}
.icon-tags:before {
- content: "\e10c";
+ content: '\e10c';
}
.icon-block-shape:before {
- content: "\e10d";
+ content: '\e10d';
}
.icon-empty:before {
- content: "\e10e";
+ content: '\e10e';
}
.icon-folder:before {
- content: "\e10f";
+ content: '\e10f';
}
.icon-setting:before {
- content: "\e110";
+ content: '\e110';
}
.icon-separator:before {
- content: "\e111";
+ content: '\e111';
}
.icon-resources-fill:before {
- content: "\e112";
+ content: '\e112';
}
.icon-file-line:before {
- content: "\e113";
+ content: '\e113';
}
.icon-kv:before {
- content: "\e114";
+ content: '\e114';
}
.icon-resources:before {
- content: "\e115";
+ content: '\e115';
}
.icon-lang-en:before {
- content: "\e116";
+ content: '\e116';
}
.icon-lang-cn:before {
- content: "\e117";
+ content: '\e117';
}
diff --git a/bcs-services/bcs-bscp/ui/src/css/markdown.scss b/bcs-services/bcs-bscp/ui/src/css/markdown.scss
index c38135a0a1..abfd6f3cc1 100644
--- a/bcs-services/bcs-bscp/ui/src/css/markdown.scss
+++ b/bcs-services/bcs-bscp/ui/src/css/markdown.scss
@@ -7,43 +7,42 @@
h3,
h4,
h5 {
- height: auto;
- margin: 10px 0;
- font:
- normal 14px/1.5
- "Helvetica Neue",
- Helvetica,
- Arial,
- "Lantinghei SC",
- "Hiragino Sans GB",
- "Microsoft Yahei",
- sans-serif;
- font-weight: bold;
- color: #34383e;
+ height: auto;
+ margin: 10px 0;
+ font:
+ normal 14px/1.5 'Helvetica Neue',
+ Helvetica,
+ Arial,
+ 'Lantinghei SC',
+ 'Hiragino Sans GB',
+ 'Microsoft Yahei',
+ sans-serif;
+ font-weight: bold;
+ color: #34383e;
}
h1 {
- font-size: 30px;
+ font-size: 30px;
}
h2 {
- font-size: 24px;
+ font-size: 24px;
}
h3 {
- font-size: 18px;
+ font-size: 18px;
}
h4 {
- font-size: 16px;
+ font-size: 16px;
}
h5 {
- font-size: 14px;
+ font-size: 14px;
}
em {
- font-style: italic;
+ font-style: italic;
}
div,
@@ -51,116 +50,116 @@
font,
span,
li {
- line-height: 1.3;
+ line-height: 1.3;
}
p {
- margin: 0 0 1em;
+ margin: 0 0 1em;
}
table,
table p {
- margin: 0;
+ margin: 0;
}
ul,
ol {
- padding-left: 40px;
- margin: 10px 0 10px;
- text-indent: 0;
+ padding-left: 40px;
+ margin: 10px 0 10px;
+ text-indent: 0;
}
ul {
+ list-style: disc;
+ & > li {
+ line-height: 1.8;
+ white-space: normal;
list-style: disc;
- & > li {
- line-height: 1.8;
- white-space: normal;
- list-style: disc;
- }
+ }
}
ol {
+ list-style: decimal;
+ & > li {
+ line-height: 1.8;
+ white-space: normal;
list-style: decimal;
- & > li {
- line-height: 1.8;
- white-space: normal;
- list-style: decimal;
- }
+ }
}
li > ul {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
li ol {
- padding-left: 20px !important;
+ padding-left: 20px !important;
}
ul ul,
ul ol,
ol ol,
ol ul {
- margin-bottom: 0;
- margin-left: 20px;
+ margin-bottom: 0;
+ margin-left: 20px;
}
pre,
code {
- width: 95%;
- padding: 0 3px 2px;
- font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
- font-size: 14px;
- color: #333;
- border-radius: 3px;
+ width: 95%;
+ padding: 0 3px 2px;
+ font-family: Monaco, Menlo, Consolas, 'Courier New', monospace;
+ font-size: 14px;
+ color: #333;
+ border-radius: 3px;
}
code {
- padding: 2px 4px;
- font-family: Consolas, monospace, tahoma, Arial;
- color: #d14;
- border: 1px solid #e1e1e8;
+ padding: 2px 4px;
+ font-family: Consolas, monospace, tahoma, Arial;
+ color: #d14;
+ border: 1px solid #e1e1e8;
}
pre {
- display: block;
- padding: 9.5px;
- margin: 0 0 10px;
- font-family: Consolas, monospace, tahoma, Arial;
- font-size: 13px;
- word-break: break-all;
- word-wrap: break-word;
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-family: Consolas, monospace, tahoma, Arial;
+ font-size: 13px;
+ word-break: break-all;
+ word-wrap: break-word;
+ white-space: pre-wrap;
+ background-color: #f6f6f6;
+ border: 1px solid #ddd;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ border-radius: 2px;
+ code {
+ padding: 0;
white-space: pre-wrap;
- background-color: #f6f6f6;
- border: 1px solid #ddd;
- border: 1px solid rgba(0,0,0,0.15);
- border-radius: 2px;
- code {
- padding: 0;
- white-space: pre-wrap;
- border: 0;
- }
+ border: 0;
+ }
}
blockquote {
- padding: 0 0 0 14px;
- margin: 0 0 20px;
- border-left: 5px solid #dfdfdf;
- ::before,
- ::after {
- content: "";
- }
- p {
- margin-bottom: 0;
- font-size: 14px;
- font-weight: 300;
- line-height: 25px;
- }
- small {
- display: block;
- line-height: 20px;
- color: #999;
- ::before {
- content: "\2014 \00A0";
- }
+ padding: 0 0 0 14px;
+ margin: 0 0 20px;
+ border-left: 5px solid #dfdfdf;
+ ::before,
+ ::after {
+ content: '';
+ }
+ p {
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 25px;
+ }
+ small {
+ display: block;
+ line-height: 20px;
+ color: #999;
+ ::before {
+ content: '\2014 \00A0';
}
+ }
}
-}
\ No newline at end of file
+}
diff --git a/bcs-services/bcs-bscp/ui/src/css/style.css b/bcs-services/bcs-bscp/ui/src/css/style.css
index 585e6c655f..8fe978b9ed 100644
--- a/bcs-services/bcs-bscp/ui/src/css/style.css
+++ b/bcs-services/bcs-bscp/ui/src/css/style.css
@@ -1,7 +1,14 @@
@import './font.css';
:root {
- font-family: -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft YaHei, Helvetica Neue, Arial, sans-serif;
+ font-family:
+ -apple-system,
+ BlinkMacSystemFont,
+ PingFang SC,
+ Microsoft YaHei,
+ Helvetica Neue,
+ Arial,
+ sans-serif;
font-size: 14px;
font-weight: 400;
color-scheme: light dark;
@@ -29,18 +36,19 @@ h1 {
line-height: 1.1;
}
-ul, ol {
+ul,
+ol {
list-style: none;
padding: 0;
margin: 0;
}
li {
-list-style: none;
+ list-style: none;
}
a {
- color: #3A84FF;
+ color: #3a84ff;
text-decoration: none;
}
textarea {
@@ -76,4 +84,4 @@ textarea {
.bk-textarea.resizable {
resize: vertical;
-}
\ No newline at end of file
+}
diff --git a/bcs-services/bcs-bscp/ui/src/css/style.scss b/bcs-services/bcs-bscp/ui/src/css/style.scss
index 7ac76203ae..ddf7d559e0 100644
--- a/bcs-services/bcs-bscp/ui/src/css/style.scss
+++ b/bcs-services/bcs-bscp/ui/src/css/style.scss
@@ -1,2 +1,2 @@
@import './common.scss';
-@import './markdown.scss';
\ No newline at end of file
+@import './markdown.scss';
diff --git a/bcs-services/bcs-bscp/ui/src/i18n/index.ts b/bcs-services/bcs-bscp/ui/src/i18n/index.ts
index 43634a39e7..fcc388a9c3 100644
--- a/bcs-services/bcs-bscp/ui/src/i18n/index.ts
+++ b/bcs-services/bcs-bscp/ui/src/i18n/index.ts
@@ -10,6 +10,5 @@ const i18n = createI18n({
},
});
-
export const localT = i18n.global.t;
export default i18n;
diff --git a/bcs-services/bcs-bscp/ui/src/main.ts b/bcs-services/bcs-bscp/ui/src/main.ts
index 2d938a9998..17d18133f8 100644
--- a/bcs-services/bcs-bscp/ui/src/main.ts
+++ b/bcs-services/bcs-bscp/ui/src/main.ts
@@ -18,8 +18,5 @@ auth().then(() => {
app.directive('overflowTitle', overflowTitle);
app.directive('cursor', cursor);
- app.use(pinia).use(i18n)
- .use(router)
- .use(bkui)
- .mount('#app');
+ app.use(pinia).use(i18n).use(router).use(bkui).mount('#app');
});
diff --git a/bcs-services/bcs-bscp/ui/src/request/axios.d.ts b/bcs-services/bcs-bscp/ui/src/request/axios.d.ts
index ef800ab5b7..ca694d6716 100644
--- a/bcs-services/bcs-bscp/ui/src/request/axios.d.ts
+++ b/bcs-services/bcs-bscp/ui/src/request/axios.d.ts
@@ -2,6 +2,6 @@
import * as axios from 'axios';
declare module 'axios' {
- type AxiosInstance = (config: AxiosRequestConfig) => Promise
+ type AxiosInstance = (config: AxiosRequestConfig) => Promise;
}
/* eslint-enable */
diff --git a/bcs-services/bcs-bscp/ui/src/request/index.ts b/bcs-services/bcs-bscp/ui/src/request/index.ts
index 3ebb4c1595..7d2fd69266 100644
--- a/bcs-services/bcs-bscp/ui/src/request/index.ts
+++ b/bcs-services/bcs-bscp/ui/src/request/index.ts
@@ -1,6 +1,6 @@
import axios from 'axios';
import BkMessage from 'bkui-vue/lib/message';
-import pinia from '../store/index';
+import pinia from '../store/index';
import useUserStore from '../store/user';
import useGlobalStore from '../store/global';
@@ -32,18 +32,22 @@ http.interceptors.response.use(
if (response.status === 401) {
userStore.$patch((state) => {
- state.loginUrl = `${response.data.error.data.login_plain_url + window.location.origin}/web/login_success.html`;
+ state.loginUrl = `${
+ response.data.error.data.login_plain_url + window.location.origin
+ }/web/login_success.html`;
state.showLoginModal = true;
});
return;
- } else if (response.status === 403) {
+ }
+ if (response.status === 403) {
globalStore.$patch((state) => {
state.showPermApplyPage = true;
state.applyPermUrl = response.data.error.data.apply_url;
state.applyPermResource = response.data.error.data.resources;
});
return response.data.error;
- } else if (response.status === 404) {
+ }
+ if (response.status === 404) {
return Promise.reject(error);
}
diff --git a/bcs-services/bcs-bscp/ui/src/store/global.ts b/bcs-services/bcs-bscp/ui/src/store/global.ts
index 15b49a9bdd..44479260f5 100644
--- a/bcs-services/bcs-bscp/ui/src/store/global.ts
+++ b/bcs-services/bcs-bscp/ui/src/store/global.ts
@@ -6,7 +6,7 @@ import { ISpaceDetail, IPermissionResource, IPermissionQueryResourceItem } from
export default defineStore('global', () => {
const bscpVersion = ref(''); // 产品版本号
const spaceId = ref(''); // 空间id
- const spaceFeatureFlags = ref<{ [key: string]: boolean; }>({}); // 空间的配置开关
+ const spaceFeatureFlags = ref<{ [key: string]: boolean }>({}); // 空间的配置开关
const spaceList = ref([]);
// @ts-ignore
const showNotice = ref(window.ENABLE_BK_NOTICE === 'true'); // 是否展示消息通知
diff --git a/bcs-services/bcs-bscp/ui/src/store/user.ts b/bcs-services/bcs-bscp/ui/src/store/user.ts
index d45dcc65cf..a079065824 100644
--- a/bcs-services/bcs-bscp/ui/src/store/user.ts
+++ b/bcs-services/bcs-bscp/ui/src/store/user.ts
@@ -15,9 +15,10 @@ export default defineStore('user', () => {
username: '',
});
- const getUserInfo = () => http.get('/auth/user/info').then((res) => {
- userInfo.value = res.data as IUserInfo;
- });
+ const getUserInfo = () =>
+ http.get('/auth/user/info').then((res) => {
+ userInfo.value = res.data as IUserInfo;
+ });
return { loginUrl, showLoginModal, userInfo, getUserInfo };
});
diff --git a/bcs-services/bcs-bscp/ui/src/types.ts b/bcs-services/bcs-bscp/ui/src/types.ts
index eb9fac3881..31c9d90ef8 100644
--- a/bcs-services/bcs-bscp/ui/src/types.ts
+++ b/bcs-services/bcs-bscp/ui/src/types.ts
@@ -1,12 +1,12 @@
export type IPageFilter = {
- count: Boolean,
- start: number,
- limit: number
-}
+ count: Boolean;
+ start: number;
+ limit: number;
+};
export const enum FilterOp {
AND = 'and',
- OR = 'or'
+ OR = 'or',
}
export const enum RuleOp {
@@ -17,16 +17,16 @@ export const enum RuleOp {
lt = 'lt',
lte = 'lte',
in = 'in',
- nin = 'nin'
+ nin = 'nin',
}
export type IRequestFilter = {
- op: FilterOp,
- rules: IRequestFilterRule[],
-}
+ op: FilterOp;
+ rules: IRequestFilterRule[];
+};
export type IRequestFilterRule = {
- field: string,
- op: RuleOp,
- value: any
-}
+ field: string;
+ op: RuleOp;
+ value: any;
+};
diff --git a/bcs-services/bcs-bscp/ui/src/utils/config.ts b/bcs-services/bcs-bscp/ui/src/utils/config.ts
index 6989119559..9f78c332e7 100644
--- a/bcs-services/bcs-bscp/ui/src/utils/config.ts
+++ b/bcs-services/bcs-bscp/ui/src/utils/config.ts
@@ -2,7 +2,7 @@ import { CONFIG_FILE_TYPE } from '../constants/config';
// 查询配置文件类型名称
export const getConfigTypeName = (type: string) => {
- const fileType = CONFIG_FILE_TYPE.find(item => item.id === type);
+ const fileType = CONFIG_FILE_TYPE.find((item) => item.id === type);
return fileType ? fileType.name : '未知格式';
};
diff --git a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-delete-template-configs.ts b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-delete-template-configs.ts
index 1d83712957..6b27d54050 100644
--- a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-delete-template-configs.ts
+++ b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-delete-template-configs.ts
@@ -6,12 +6,16 @@ const useDeleteTemplateConfigs = (space_id: string, current_template_space: numb
if (!configs || configs.length === 0) return;
return new Promise((resolve) => {
InfoBox({
- title: `${localT('确认彻底删除')}${configs.length > 1 ? `${configs.length}${localT('条配置文件')}` : `${localT('配置文件')}【${configs[0].spec.name}】`}?`,
+ title: `${localT('确认彻底删除')}${
+ configs.length > 1
+ ? `${configs.length}${localT('条配置文件')}`
+ : `${localT('配置文件')}【${configs[0].spec.name}】`
+ }?`,
subTitle: localT('删除后不可找回,请谨慎操作。'),
confirmText: localT('确认删除'),
infoType: 'warning',
onConfirm: async () => {
- const ids = configs.map(config => config.id);
+ const ids = configs.map((config) => config.id);
return deleteTemplate(space_id, current_template_space, ids);
},
onClosed: () => resolve(false),
diff --git a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-diff-editor-variable-replace.ts b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-diff-editor-variable-replace.ts
index cd8d6eb874..2976a5c7fd 100644
--- a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-diff-editor-variable-replace.ts
+++ b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-diff-editor-variable-replace.ts
@@ -25,7 +25,7 @@ class VariableReplace {
public currentReplacedList: IReplacedVariableItem[] = [];
public baseReplacedList: IReplacedVariableItem[] = [];
- public constructor(
+ public constructor(
editor: monaco.editor.IStandaloneDiffEditor,
currentVariables: IVariableEditParams[],
baseVariables: IVariableEditParams[],
@@ -103,7 +103,7 @@ class VariableReplace {
}
public highlightVariables(editor: monaco.editor.ICodeEditor, replacedList: IReplacedVariableItem[]) {
- const configs = replacedList.map(variable => ({
+ const configs = replacedList.map((variable) => ({
range: variable.range,
options: {
inlineClassName: 'template-variable-item',
@@ -133,8 +133,9 @@ class VariableReplace {
}
public getProviderConfig(replacedList: IReplacedVariableItem[] = [], lineNumber: number, column: number) {
- const variable = replacedList.find(v => v.range.startLineNumber === lineNumber
- && v.range.startColumn <= column && column <= v.range.endColumn);
+ const variable = replacedList.find(
+ (v) => v.range.startLineNumber === lineNumber && v.range.startColumn <= column && column <= v.range.endColumn,
+ );
if (variable) {
return {
range: variable.range,
diff --git a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-editor-variable-replace.ts b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-editor-variable-replace.ts
index 55df023757..1a4ed64f1b 100644
--- a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-editor-variable-replace.ts
+++ b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-editor-variable-replace.ts
@@ -73,7 +73,7 @@ class VariableReplace {
}
public highlightVariables() {
- const configs = this.replacedList.map(variable => ({
+ const configs = this.replacedList.map((variable) => ({
range: variable.range,
options: {
inlineClassName: 'template-variable-item',
@@ -90,8 +90,9 @@ class VariableReplace {
VariableReplace.hoverProvider = monaco.languages.registerHoverProvider('*', {
provideHover(model, position) {
const { lineNumber, column } = position;
- const variable = self.replacedList.find(v => v.range.startLineNumber === lineNumber
- && v.range.startColumn <= column && column <= v.range.endColumn);
+ const variable = self.replacedList.find(
+ (v) => v.range.startLineNumber === lineNumber && v.range.startColumn <= column && column <= v.range.endColumn,
+ );
if (variable) {
return {
range: variable.range,
diff --git a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-modal-close-confirmation.ts b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-modal-close-confirmation.ts
index dcf9f413d6..5a2acb2a55 100644
--- a/bcs-services/bcs-bscp/ui/src/utils/hooks/use-modal-close-confirmation.ts
+++ b/bcs-services/bcs-bscp/ui/src/utils/hooks/use-modal-close-confirmation.ts
@@ -1,18 +1,19 @@
import { InfoBox } from 'bkui-vue';
import { localT } from '../../i18n';
-const useModalCloseConfirmation = (title?: string, subTitle?: string) => new Promise((resolve) => {
- InfoBox({
- title: title || localT('确认离开当前页?'),
- subTitle: subTitle || localT('离开会导致未保存信息丢失'),
- confirmText: localT('离开'),
- 'ext-cls': 'info-box-style',
- onConfirm: () => {
- resolve(true);
- },
- onClosed: () => {
- resolve(false);
- },
+const useModalCloseConfirmation = (title?: string, subTitle?: string) =>
+ new Promise((resolve) => {
+ InfoBox({
+ title: title || localT('确认离开当前页?'),
+ subTitle: subTitle || localT('离开会导致未保存信息丢失'),
+ confirmText: localT('离开'),
+ 'ext-cls': 'info-box-style',
+ onConfirm: () => {
+ resolve(true);
+ },
+ onClosed: () => {
+ resolve(false);
+ },
+ });
});
-});
export default useModalCloseConfirmation;
diff --git a/bcs-services/bcs-bscp/ui/src/utils/index.ts b/bcs-services/bcs-bscp/ui/src/utils/index.ts
index d59dbc395e..c77946ace4 100644
--- a/bcs-services/bcs-bscp/ui/src/utils/index.ts
+++ b/bcs-services/bcs-bscp/ui/src/utils/index.ts
@@ -4,11 +4,14 @@ import dayjs from 'dayjs';
export const byteUnitConverse = (size: number): string => {
if (0 <= size && size < 1024) {
return `${size}B`;
- } if (1024 <= size && size < 1024 * 1024) {
+ }
+ if (1024 <= size && size < 1024 * 1024) {
return `${Math.ceil(size / 1024)}KB`;
- } if (1024 * 1024 <= size && size < 1024 * 1024 * 1024) {
+ }
+ if (1024 * 1024 <= size && size < 1024 * 1024 * 1024) {
return `${(size / (1024 * 1024)).toFixed(1)}MB`;
- } if (1024 * 1024 * 1024 <= size) {
+ }
+ if (1024 * 1024 * 1024 <= size) {
return `${(size / (1024 * 1024 * 1024)).toFixed(1)}GB`;
}
return '';
@@ -16,7 +19,7 @@ export const byteUnitConverse = (size: number): string => {
// 字符串内容的字节大小
// @notice:edge 79版本才开始支持,发布时间2020-01-15 https://developer.mozilla.org/zh-CN/docs/Web/API/TextEncode
-export const stringLengthInBytes = (content: string) => (new TextEncoder().encode(content)).length;
+export const stringLengthInBytes = (content: string) => new TextEncoder().encode(content).length;
export const copyToClipBoard = (content: string) => {
if (navigator.clipboard) {
@@ -41,9 +44,11 @@ export const datetimeFormat = (str: string): string => dayjs(str).format('YYYY-M
export const getDiffType = (base: string, current: string) => {
if (base === '' && current !== '') {
return 'add';
- } if (base !== '' && current === '') {
+ }
+ if (base !== '' && current === '') {
return 'delete';
- } if (base !== '' && current !== '' && base !== current) {
+ }
+ if (base !== '' && current !== '' && base !== current) {
return 'modify';
}
return '';
diff --git a/bcs-services/bcs-bscp/ui/src/views/404.vue b/bcs-services/bcs-bscp/ui/src/views/404.vue
index 4c16b87e54..eada914c75 100644
--- a/bcs-services/bcs-bscp/ui/src/views/404.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/404.vue
@@ -1,11 +1,7 @@
-
-
+
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/apply-perm-page.vue b/bcs-services/bcs-bscp/ui/src/views/space/apply-perm-page.vue
index 6a15e8337b..0ca1cf186e 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/apply-perm-page.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/apply-perm-page.vue
@@ -12,43 +12,46 @@
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue b/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue
index a3a35f961c..aea381894a 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/credentials/associate-config-items/index.vue
@@ -4,8 +4,7 @@
width="400"
:is-show="props.show"
:before-close="handleBeforeClose"
- @closed="handleClose"
- >
+ @closed="handleClose">
+ @form-change="isFormChange = true" />
@@ -17,11 +17,16 @@
:max-data="1"
:list="tagsData"
:allow-create="true"
- trigger="focus"
- />
+ trigger="focus" />
-
+
@@ -32,8 +37,7 @@
v-for="item in SCRIPT_TYPE"
:key="item.id"
:class="['tab', { actived: formData.type === item.id }]"
- @click="formData.type = item.id"
- >
+ @click="formData.type = item.id">
{{ item.name }}
@@ -53,141 +57,142 @@
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-cited.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-cited.vue
index b92170c1af..59feeb06e3 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-cited.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-cited.vue
@@ -11,8 +11,7 @@
:remote-pagination="true"
:pagination="pagination"
@page-limit-change="handlePageLimitChange"
- @page-value-change="refreshList"
- >
+ @page-value-change="refreshList">
{{
@@ -21,7 +20,7 @@
- {{ row.type === 'pre_hook' ? t('前置脚本'):t('后置脚本') }}
+ {{ row.type === 'pre_hook' ? t('前置脚本') : t('后置脚本') }}
@@ -42,119 +41,122 @@
- {{t('关闭')}}
+ {{ t('关闭') }}
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-list.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-list.vue
index f2b19c995a..b34b3df57c 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-list.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/list/script-list.vue
@@ -14,8 +14,7 @@
v-for="(item, index) in tagsData"
:key="index"
:class="['group-item', { actived: selectedTag === item.tag }]"
- @click="handleSelectTag(item.tag)"
- >
+ @click="handleSelectTag(item.tag)">
{{ item.tag }}
{{ item.counts }}
@@ -24,15 +23,17 @@
-
{{ t('新建脚本') }}
+
+
+ {{ t('新建脚本') }}
+
+ @input="handleNameInputChange">
@@ -45,20 +46,16 @@
:remote-pagination="true"
:pagination="pagination"
@page-limit-change="handlePageLimitChange"
- @page-value-change="handlePageCurrentChange"
- >
+ @page-value-change="handlePageCurrentChange">
-
+
{{ row.hook.spec.name }}
-
+
+
{{ row.hook.spec.tag || '--' }}
@@ -85,9 +82,9 @@
{{ t('版本管理') }}
+ @click="router.push({ name: 'script-version-manage', params: { spaceId, scriptId: row.hook.id } })">
+ {{ t('版本管理') }}
+
{{ t('删除') }}
@@ -104,12 +101,13 @@
+ @confirm="handleDeleteScriptConfirm">
{{ t('脚本') }}: {{ deleteScriptItem?.hook.spec.name }}
- {{ t('一旦删除,该操作将无法撤销,以下服务配置的未命名版本中引用该脚本也将清除') }}
+
+ {{ t('一旦删除,该操作将无法撤销,以下服务配置的未命名版本中引用该脚本也将清除') }}
+
@@ -127,333 +125,334 @@
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/create-version.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/create-version.vue
index 30f2d9a646..b7753acce6 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/create-version.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/create-version.vue
@@ -6,8 +6,7 @@
placement="bottom-start"
:disabled="props.creatable"
:is-show="popoverShow"
- @after-hidden="closePopover"
- >
+ @after-hidden="closePopover">
{{ t('新建版本') }}
@@ -31,8 +30,7 @@
:is-loading="listLoading"
@value-change="afterDialogShow"
@confirm="handleLoadScript"
- @closed="dialogShow = false"
- >
+ @closed="dialogShow = false">
+ :input-search="false">
+ :label="option.name">
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/index.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/index.vue
index 82f3591ee0..dcbb037b99 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/index.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/index.vue
@@ -8,8 +8,7 @@
:disabled="createBtnDisabled"
:creatable="!unPublishVersion"
@create="handleCreateVersionClick"
- @edit="handleEditVersionClick"
- />
+ @edit="handleEditVersionClick" />
+ @change="handleSearchInputChange">
@@ -35,32 +33,32 @@
@view="handleViewVersionClick"
@page-change="refreshList"
@page-limit-change="handlePageLimitChange"
- @clear-str="clearStr"
- >
+ @clear-str="clearStr">
{{ t('上线') }}
+ @click="handlePublishClick(data.hook_revision)">
+ {{ t('上线') }}
+
{{ t('编辑') }}
- {{ t('版本对比') }}
+ @click="handleEditVersionClick">
+ {{ t('编辑') }}
+
+
+ {{ t('版本对比') }}
+
+ @click="handleCreateVersionClick(data.hook_revision.spec.content)">
{{ t('复制并新建') }}
{{ t('删除') }}
+ @click="handleDelClick(data)">
+ {{ t('删除') }}
+
@@ -84,8 +82,7 @@
:list="versionList"
:pagination="pagination"
@select="handleSelectVersion"
- @page-change="refreshList"
- />
+ @page-change="refreshList" />
@@ -95,8 +92,7 @@
:script-id="scriptId"
:editable="versionEditData.editable"
@submitted="handleVersionEditSubmitted"
- @close="versionEditData.panelOpen = false"
- />
+ @close="versionEditData.panelOpen = false" />
@@ -108,345 +104,346 @@
:type="scriptDetail.spec.type"
:crt-version="crtVersion as IScriptVersion"
:space-id="spaceId"
- :script-id="scriptId"
- />
+ :script-id="scriptId" />
-
- {{ t('脚本名称') }}:
{{ deleteScriptVersionItem?.hook_revision.spec.name }}
+ @confirm="handleDeleteScriptVersionConfirm">
+
+ {{ t('脚本名称') }}:
+
+ {{ deleteScriptVersionItem?.hook_revision.spec.name }}
+
{{ t('一旦删除,该操作将无法撤销,请谨慎操作') }}
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/script-version-diff.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/script-version-diff.vue
index b8f52893a1..91ad3319be 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/script-version-diff.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/script-version-diff.vue
@@ -10,8 +10,7 @@
:clearable="false"
:filterable="true"
@change="handleSelectVersion"
- :show-on-init="true"
- >
+ :show-on-init="true">
@@ -23,8 +22,7 @@
:current="crtVersion.spec.content"
:current-language="props.type"
:base="baseContent"
- :base-language="props.type"
- />
+ :base-language="props.type" />
@@ -33,103 +31,103 @@
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-edit.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-edit.vue
index 052f38b583..332dfbfcaf 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-edit.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-edit.vue
@@ -4,8 +4,7 @@
v-model="localVal.content"
:language="props.type"
:editable="props.editable"
- :upload-icon="props.editable"
- >
+ :upload-icon="props.editable">
{{ title }}
@@ -13,7 +12,7 @@
-
+
@@ -26,194 +25,197 @@
{{ props.versionData.id ? t('保存') : t('提交') }}
- {{t('取消')}}
+ {{ t('取消') }}
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-full-table.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-full-table.vue
index 8d16a20f05..a3f79cf452 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-full-table.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-full-table.vue
@@ -5,8 +5,7 @@
:remote-pagination="true"
:pagination="pagination"
@page-limit-change="emits('pageLimitChange', $event)"
- @page-value-change="emits('pageChange', $event)"
- >
+ @page-value-change="emits('pageChange', $event)">
@@ -53,63 +52,63 @@
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-simple-table.vue b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-simple-table.vue
index 15f6ca1026..b8b66e9c2e 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-simple-table.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/scripts/version-manage/version-list-simple-table.vue
@@ -18,79 +18,78 @@
:limit="props.pagination.limit"
:show-limit="false"
:show-total-count="false"
- @change="emits('pageChange', $event)"
- />
+ @change="emits('pageChange', $event)" />
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/client/index.vue b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/client/index.vue
index 0067db69c6..b9ae7aae0f 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/client/index.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/client/index.vue
@@ -1,5 +1,4 @@
客户端统计
-
+
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/create-version-slider.vue b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/create-version-slider.vue
index 2d70a2a161..f37154f0c0 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/create-version-slider.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/create-version-slider.vue
@@ -1,27 +1,42 @@
-
-
+
+
{{ t('确定') }}
@@ -30,188 +45,188 @@
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/index.vue b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/index.vue
index e3b6fe7fa6..be0508bbd1 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/index.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/create-version/index.vue
@@ -5,9 +5,8 @@
theme="primary"
:class="['trigger-button', { 'bk-button-with-no-perm': !props.hasPerm }]"
:disabled="(props.hasPerm && allConfigCount === 0) || props.permCheckLoading"
- @click="handleBtnClick"
- >
- {{t('生成版本')}}
+ @click="handleBtnClick">
+ {{ t('生成版本') }}
+ @created="handleCreated" />
diff --git a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/detail-header.vue b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/detail-header.vue
index 16d46b5224..050a79b2e0 100644
--- a/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/detail-header.vue
+++ b/bcs-services/bcs-bscp/ui/src/views/space/service/detail/components/detail-header.vue
@@ -1,7 +1,7 @@