mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 00:05:24 +00:00
update
This commit is contained in:
parent
4d09ae6bd0
commit
d2a17bbfae
@ -386,6 +386,6 @@ const msg = {
|
||||
tabExpressions: "Tab Expressions",
|
||||
hierarchyNodeMetrics: "Metrics for Hierarchy Graph Node",
|
||||
hierarchyNodeDashboard: "As dashboard for Hierarchy Graph Node",
|
||||
contentDecorations: "Content Decorations",
|
||||
valueMappings: "Value Mappings",
|
||||
};
|
||||
export default msg;
|
||||
|
@ -386,6 +386,6 @@ const msg = {
|
||||
tabExpressions: "Tab Expressions",
|
||||
hierarchyNodeMetrics: "Metrics for Hierarchy Graph Node",
|
||||
hierarchyNodeDashboard: "As dashboard for Hierarchy Graph Node",
|
||||
contentDecorations: "Content Decorations",
|
||||
valueMappings: "Value Mappings",
|
||||
};
|
||||
export default msg;
|
||||
|
@ -384,6 +384,6 @@ const msg = {
|
||||
tabExpressions: "Tab表达式",
|
||||
hierarchyNodeMetrics: "层次图节点的指标",
|
||||
hierarchyNodeDashboard: "作为层次图节点的dashboard",
|
||||
contentDecorations: "内容装饰",
|
||||
valueMappings: "值映射",
|
||||
};
|
||||
export default msg;
|
||||
|
@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License. -->
|
||||
<template>
|
||||
<div>
|
||||
<span class="label">{{ t("contentDecorations") }}</span>
|
||||
<content-decorations />
|
||||
<span class="label">{{ t("valueMappings") }}</span>
|
||||
<value-mappings />
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">{{ t("fontSize") }}</span>
|
||||
@ -39,7 +39,7 @@ limitations under the License. -->
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import ContentDecorations from "./components/ContentDecorations.vue";
|
||||
import ValueMappings from "./components/ValueMappings.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
|
@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License. -->
|
||||
<template>
|
||||
<div>
|
||||
<span class="label">{{ t("contentDecorations") }}</span>
|
||||
<content-decorations />
|
||||
<span class="label">{{ t("valueMappings") }}</span>
|
||||
<value-mappings />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("showValues") }}</span>
|
||||
@ -41,7 +41,7 @@ limitations under the License. -->
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import ContentDecorations from "./components/ContentDecorations.vue";
|
||||
import ValueMappings from "./components/ValueMappings.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
|
@ -39,8 +39,8 @@ limitations under the License. -->
|
||||
|
||||
const dashboardStore = useDashboardStore();
|
||||
const graph = dashboardStore.selectedGrid.graph;
|
||||
const decorations = ref<{ [key: string]: string }>(graph?.decorations || {});
|
||||
const keys = ref<string[]>(graph.decorations ? Object.keys(decorations.value) : [""]);
|
||||
const decorations = ref<{ [key: string]: string }>(graph?.valueMappings || {});
|
||||
const keys = ref<string[]>(graph.valueMappings ? Object.keys(decorations.value) : [""]);
|
||||
|
||||
function changeKeys(event: any, index: number) {
|
||||
const params = event.target.textContent || "";
|
||||
@ -50,12 +50,12 @@ limitations under the License. -->
|
||||
}
|
||||
delete decorations.value[list[index]];
|
||||
keys.value = Object.keys(decorations.value);
|
||||
updateConfig({ decorations: decorations.value });
|
||||
updateConfig();
|
||||
}
|
||||
|
||||
function changeValues(event: any, key: string) {
|
||||
decorations.value[key] = event.target.textContent || "";
|
||||
updateConfig({ decorations: decorations.value });
|
||||
updateConfig();
|
||||
}
|
||||
|
||||
function addDecoration() {
|
||||
@ -68,13 +68,13 @@ limitations under the License. -->
|
||||
}
|
||||
delete decorations.value[keys.value[index]];
|
||||
keys.value.splice(index, 1);
|
||||
updateConfig({ decorations: decorations.value });
|
||||
updateConfig();
|
||||
}
|
||||
|
||||
function updateConfig(param: { [key: string]: unknown }) {
|
||||
function updateConfig() {
|
||||
const graph = {
|
||||
...dashboardStore.selectedGrid.graph,
|
||||
...param,
|
||||
valueMappings: decorations.value,
|
||||
};
|
||||
dashboardStore.selectWidget({ ...dashboardStore.selectedGrid, graph });
|
||||
}
|
Loading…
Reference in New Issue
Block a user