mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 00:08:56 +00:00
feat: update policy list
This commit is contained in:
parent
e876010975
commit
b4bf447a51
@ -388,5 +388,7 @@ const msg = {
|
|||||||
elasticsearch: "Elasticsearch",
|
elasticsearch: "Elasticsearch",
|
||||||
mq: "MQ",
|
mq: "MQ",
|
||||||
rabbitMQ: "RabbitMQ",
|
rabbitMQ: "RabbitMQ",
|
||||||
|
save: "Save",
|
||||||
|
editStrategy: "Edit Policies",
|
||||||
};
|
};
|
||||||
export default msg;
|
export default msg;
|
||||||
|
@ -387,5 +387,7 @@ const msg = {
|
|||||||
elasticsearch: "Elasticsearch",
|
elasticsearch: "Elasticsearch",
|
||||||
mq: "MQ",
|
mq: "MQ",
|
||||||
rabbitMQ: "RabbitMQ",
|
rabbitMQ: "RabbitMQ",
|
||||||
|
save: "Salvar",
|
||||||
|
editStrategy: "Estrategia editorial",
|
||||||
};
|
};
|
||||||
export default msg;
|
export default msg;
|
||||||
|
@ -385,5 +385,7 @@ const msg = {
|
|||||||
elasticsearch: "Elasticsearch",
|
elasticsearch: "Elasticsearch",
|
||||||
mq: "消息队列",
|
mq: "消息队列",
|
||||||
rabbitMQ: "RabbitMQ",
|
rabbitMQ: "RabbitMQ",
|
||||||
|
save: "保存",
|
||||||
|
editStrategy: "编辑策略",
|
||||||
};
|
};
|
||||||
export default msg;
|
export default msg;
|
||||||
|
@ -140,9 +140,13 @@ export const continousProfilingStore = defineStore({
|
|||||||
if (res.data.errors) {
|
if (res.data.errors) {
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
this.strategyList = res.data.data.queryEBPFTasks || [];
|
this.strategyList = (res.data.data.strategyList || []).map((d: StrategyItem, index: number) => {
|
||||||
this.selectedStrategyTask = this.strategyList[0] || {};
|
return {
|
||||||
this.setSelectedStrategyTask(this.selectedStrategyTask);
|
...d,
|
||||||
|
id: index,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
this.setSelectedStrategyTask(this.strategyList[0] || {});
|
||||||
if (!this.strategyList.length) {
|
if (!this.strategyList.length) {
|
||||||
this.nodes = [];
|
this.nodes = [];
|
||||||
this.calls = [];
|
this.calls = [];
|
||||||
|
@ -15,7 +15,7 @@ limitations under the License. -->
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex-h content">
|
<div class="flex-h content">
|
||||||
<div class="list flex-v">
|
<div class="list flex-v">
|
||||||
<div>strategies</div>
|
<StrategyList />
|
||||||
<div>tasks</div>
|
<div>tasks</div>
|
||||||
</div>
|
</div>
|
||||||
<div>graph</div>
|
<div>graph</div>
|
||||||
@ -24,6 +24,7 @@ limitations under the License. -->
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import StrategyList from "./components/StrategyList.vue";
|
||||||
/*global defineProps */
|
/*global defineProps */
|
||||||
defineProps({
|
defineProps({
|
||||||
config: {
|
config: {
|
||||||
|
@ -25,13 +25,36 @@ limitations under the License. -->
|
|||||||
<div class="no-data" v-show="!continousProfilingStore.strategyList.length">
|
<div class="no-data" v-show="!continousProfilingStore.strategyList.length">
|
||||||
{{ t("noData") }}
|
{{ t("noData") }}
|
||||||
</div>
|
</div>
|
||||||
<div>data</div>
|
<table class="profile-t">
|
||||||
|
<tr
|
||||||
|
class="profile-tr cp"
|
||||||
|
v-for="(i, index) in continousProfilingStore.strategyList"
|
||||||
|
@click="changePolicy(i)"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<td
|
||||||
|
class="profile-td"
|
||||||
|
:class="{
|
||||||
|
selected: continousProfilingStore.selectedStrategyTask.id === i.id,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div class="ell">
|
||||||
|
<span class="mr-10 sm">
|
||||||
|
{{ i.type }}
|
||||||
|
</span>
|
||||||
|
<span class="mr-10 sm">
|
||||||
|
{{ policyItem(i.checkItems) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="updateStrategies"
|
v-model="updateStrategies"
|
||||||
:title="t('editStrategies')"
|
:title="t('editStrategy')"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
fullscreen
|
fullscreen
|
||||||
@closed="updateStrategies = false"
|
@closed="updateStrategies = false"
|
||||||
@ -56,8 +79,12 @@ limitations under the License. -->
|
|||||||
|
|
||||||
fetchStrategyList();
|
fetchStrategyList();
|
||||||
|
|
||||||
async function changeStrategy(item: StrategyItem) {
|
function policyItem(items: CheckItems[]) {
|
||||||
continousProfilingStore.setSelectedNetworkTask(item);
|
return items.map((d: CheckItems) => d.type).join(";");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function changePolicy(item: StrategyItem) {
|
||||||
|
continousProfilingStore.setSelectedStrategyTask(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setStrategies() {
|
function setStrategies() {
|
||||||
|
Loading…
Reference in New Issue
Block a user