diff --git a/src/assets/icons/edit.svg b/src/assets/icons/edit.svg new file mode 100644 index 00000000..3610dedb --- /dev/null +++ b/src/assets/icons/edit.svg @@ -0,0 +1,17 @@ + + + + diff --git a/src/graphql/fragments/profile.ts b/src/graphql/fragments/profile.ts index 90a70b22..0e6fdca8 100644 --- a/src/graphql/fragments/profile.ts +++ b/src/graphql/fragments/profile.ts @@ -124,20 +124,17 @@ export const GetProfileTaskLogs = { `, }; export const GetStrategyList = { - variable: "$serviceId: ID", + variable: "$serviceId: ID!", query: ` - strategyList: getStrategyList(serviceId: $serviceId) { - serviceId - targets { - targetType - checkItems { - type - threshold - period - count - uriList - uriRegex - } + strategyList: queryContinuousProfilingServiceTargets(serviceId: $serviceId) { + type + checkItems { + type + threshold + period + count + uriList + uriRegex } } `, diff --git a/src/graphql/query/profile.ts b/src/graphql/query/profile.ts index 2394dfa0..044ffe0f 100644 --- a/src/graphql/query/profile.ts +++ b/src/graphql/query/profile.ts @@ -37,6 +37,6 @@ export const getProfileAnalyze = `query getProfileAnalyze(${GetProfileAnalyze.va export const getProfileTaskLogs = `query profileTaskLogs(${GetProfileTaskLogs.variable}) {${GetProfileTaskLogs.query}}`; -export const getStrategyList = `query GetStrategyList(${GetStrategyList.variable}) {${GetStrategyList.query}}`; +export const getStrategyList = `query getStrategyList(${GetStrategyList.variable}) {${GetStrategyList.query}}`; -export const editStrategy = `query GetStrategyList(${EditStrategy.variable}) {${EditStrategy.query}}`; +export const editStrategy = `mutation editStrategy(${EditStrategy.variable}) {${EditStrategy.query}}`; diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 8c7cadae..cfe2d874 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -390,5 +390,6 @@ const msg = { rabbitMQ: "RabbitMQ", save: "Save", editStrategy: "Edit Policies", + policyList: "Policy List", }; export default msg; diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts index 6a8c64db..32a268d1 100644 --- a/src/locales/lang/es.ts +++ b/src/locales/lang/es.ts @@ -389,5 +389,6 @@ const msg = { rabbitMQ: "RabbitMQ", save: "Salvar", editStrategy: "Estrategia editorial", + policyList: "Lista de políticas", }; export default msg; diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 40df2545..1d2093c7 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -387,5 +387,6 @@ const msg = { rabbitMQ: "RabbitMQ", save: "保存", editStrategy: "编辑策略", + policyList: "策略列表", }; export default msg; diff --git a/src/store/data.ts b/src/store/data.ts index 04a51f52..94e6b432 100644 --- a/src/store/data.ts +++ b/src/store/data.ts @@ -38,4 +38,13 @@ export const TimeRangeConfig = { text: "text", }; -export const ControlsTypes = ["Trace", "Profile", "Log", "DemandLog", "Ebpf", "NetworkProfiling", "ThirdPartyApp"]; +export const ControlsTypes = [ + "Trace", + "Profile", + "Log", + "DemandLog", + "Ebpf", + "NetworkProfiling", + "ThirdPartyApp", + "ContinuousProfiling", +]; diff --git a/src/views/dashboard/related/continuous-profiling/components/StrategyList.vue b/src/views/dashboard/related/continuous-profiling/components/StrategyList.vue index 3d812966..4986fdcb 100644 --- a/src/views/dashboard/related/continuous-profiling/components/StrategyList.vue +++ b/src/views/dashboard/related/continuous-profiling/components/StrategyList.vue @@ -16,9 +16,9 @@ limitations under the License. -->
- {{ t("taskList") }} + {{ t("policyList") }} - +
@@ -80,7 +80,7 @@ limitations under the License. --> fetchStrategyList(); function policyItem(items: CheckItems[]) { - return items.map((d: CheckItems) => d.type).join(";"); + return items.map((d: CheckItems) => `${d.type}>=${d.threshold}`).join(";"); } async function changePolicy(item: StrategyItem) { @@ -187,6 +187,7 @@ limitations under the License. --> border-bottom: 1px solid rgba(0, 0, 0, 0.07); background: #f3f4f9; width: 100%; + font-weight: bold; } .new-task {