-
-
@@ -16,7 +14,6 @@
@click="$emit('openTestReviewRelevanceDialog')"/>
-
@@ -176,7 +173,6 @@
:is-read-only="isReadOnly"
@refreshTable="search"/>
-
@@ -472,6 +468,8 @@ export default {
diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack
index 4c33b9c3b1..b2571e06e8 160000
--- a/frontend/src/business/components/xpack
+++ b/frontend/src/business/components/xpack
@@ -1 +1 @@
-Subproject commit 4c33b9c3b12a83da6d9bd2740262c6c8baaab819
+Subproject commit b2571e06e8b211821409115cc2c4a7c52cbac1db
diff --git a/frontend/src/business/store.js b/frontend/src/business/store.js
index c536ea0d38..4fbb5d7f17 100644
--- a/frontend/src/business/store.js
+++ b/frontend/src/business/store.js
@@ -50,11 +50,23 @@ const IsReadOnly = {
}
}
+const Theme = {
+ state: {
+ theme: undefined
+ },
+ mutations: {
+ setTheme(state, value) {
+ state.theme = value;
+ }
+ }
+}
+
export default new Vuex.Store({
modules: {
api: API,
common: Common,
switch: Switch,
isReadOnly: IsReadOnly,
+ theme: Theme
}
})
diff --git a/frontend/src/common/css/main.css b/frontend/src/common/css/main.css
index 34a336f689..2595486214 100644
--- a/frontend/src/common/css/main.css
+++ b/frontend/src/common/css/main.css
@@ -17,6 +17,7 @@ body {
/*--color: #2c2a48;*/
/*--color_shallow: #595591;*/
--color: '';
+ --primary_color: '';
--color_shallow: '';
--count_number: '';
--count_number_shallow: '';
diff --git a/frontend/src/common/js/constants.js b/frontend/src/common/js/constants.js
index cbaf36f974..e8c6de79f3 100644
--- a/frontend/src/common/js/constants.js
+++ b/frontend/src/common/js/constants.js
@@ -173,3 +173,4 @@ export const ORIGIN_COLOR = '#2c2a48';
export const ORIGIN_COLOR_SHALLOW = '#595591';
export const COUNT_NUMBER = '#6C317C';
export const COUNT_NUMBER_SHALLOW = '#CDB9D2';
+export const PRIMARY_COLOR = '#783887';
diff --git a/frontend/src/common/js/utils.js b/frontend/src/common/js/utils.js
index 02822ea8e6..2463cec636 100644
--- a/frontend/src/common/js/utils.js
+++ b/frontend/src/common/js/utils.js
@@ -1,17 +1,17 @@
import {
- COUNT_NUMBER,
- COUNT_NUMBER_SHALLOW,
- LicenseKey,
- ORIGIN_COLOR,
- ORIGIN_COLOR_SHALLOW,
- PROJECT_ID,
- REFRESH_SESSION_USER_URL,
- ROLE_ADMIN,
- ROLE_ORG_ADMIN,
- ROLE_TEST_MANAGER,
- ROLE_TEST_USER,
- ROLE_TEST_VIEWER,
- TokenKey
+ COUNT_NUMBER,
+ COUNT_NUMBER_SHALLOW,
+ LicenseKey,
+ ORIGIN_COLOR,
+ ORIGIN_COLOR_SHALLOW, PRIMARY_COLOR,
+ PROJECT_ID,
+ REFRESH_SESSION_USER_URL,
+ ROLE_ADMIN,
+ ROLE_ORG_ADMIN,
+ ROLE_TEST_MANAGER,
+ ROLE_TEST_USER,
+ ROLE_TEST_VIEWER,
+ TokenKey
} from "./constants";
import axios from "axios";
import {jsPDF} from "jspdf";
@@ -354,19 +354,19 @@ export function objToStrMap(obj) {
return strMap;
}
-export function getColor() {
- return localStorage.getItem('color');
-}
-
-export function setColor(a, b, c, d) {
+export function setColor(a, b, c, d, e) {
+ // 顶部菜单背景色
document.body.style.setProperty('--color', a);
document.body.style.setProperty('--color_shallow', b);
+ // 首页颜色
document.body.style.setProperty('--count_number', c);
document.body.style.setProperty('--count_number_shallow', d);
+ // 主颜色
+ document.body.style.setProperty('--primary_color', e);
}
-export function setOriginColor() {
- setColor(ORIGIN_COLOR, ORIGIN_COLOR_SHALLOW, COUNT_NUMBER, COUNT_NUMBER_SHALLOW);
+export function setDefaultTheme() {
+ setColor(ORIGIN_COLOR, ORIGIN_COLOR_SHALLOW, COUNT_NUMBER, COUNT_NUMBER_SHALLOW, PRIMARY_COLOR);
}
export function publicKeyEncrypt(input, publicKey) {
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 91e69c74ce..663306aef7 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -481,7 +481,7 @@ export default {
delete_file: "The file already exists, please delete the file with the same name first!",
thread_num: 'Concurrent users:',
input_thread_num: 'Please enter the number of threads',
- duration: 'Duration time (seconds)',
+ duration: 'Duration time',
granularity: 'Aggregation time (seconds)',
input_duration: 'Please enter a duration',
rps_limit: 'RPS Limit:',
@@ -1029,6 +1029,7 @@ export default {
},
scenario_schedule: "Scenario",
test_plan_schedule: "Test plan",
+ swagger_schedule: "swagger",
confirm: {
close_title: "Do you want to close this scheduled task?",
}
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index db08f19989..7786e7e492 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -478,14 +478,14 @@ export default {
delete_file: "文件已存在,请先删除同名文件!",
thread_num: '并发用户数:',
input_thread_num: '请输入线程数',
- duration: '压测时长(秒)',
+ duration: '压测时长',
granularity: '聚合时间(秒)',
input_duration: '请输入时长',
rps_limit: 'RPS上限:',
input_rps_limit: '请输入限制',
ramp_up_time_within: '在',
- ramp_up_time_minutes: '秒内,分',
- ramp_up_time_seconds: '秒内增加并发用户',
+ ramp_up_time_minutes: '{0}内,分',
+ ramp_up_time_seconds: '{0}内增加并发用户',
iterate_num: '迭代次数 (次): ',
by_iteration: '按迭代次数',
by_duration: '按持续时间',
@@ -1033,6 +1033,7 @@ export default {
},
scenario_schedule: "场景",
test_plan_schedule: "测试计划",
+ swagger_schedule: "swagger",
confirm: {
close_title: "要关闭这条定时任务吗?",
}
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index ccbc5805d6..0707e7a6fa 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -478,7 +478,7 @@ export default {
delete_file: "文件已存在,請先刪除同名文件!",
thread_num: '並發用戶數:',
input_thread_num: '請輸入線程數',
- duration: '壓測時長(秒)',
+ duration: '壓測時長',
granularity: '聚合時間(秒)',
input_duration: '請輸入時長',
rps_limit: 'RPS上限:',
@@ -1031,6 +1031,7 @@ export default {
},
scenario_schedule: "場景",
test_plan_schedule: "測試計畫",
+ swagger_schedule: "swagger",
confirm: {
close_title: "要關閉這條定時任務嗎?",
}
diff --git a/frontend/src/login/Login.vue b/frontend/src/login/Login.vue
index 8ca8bc7da5..4ef3406a7b 100644
--- a/frontend/src/login/Login.vue
+++ b/frontend/src/login/Login.vue
@@ -56,7 +56,7 @@