mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
fix: update tooltips and controls (#49)
This commit is contained in:
@@ -43,8 +43,8 @@ limitations under the License. -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(metric, index) in config.metrics"
|
||||
:label="`${metric} ${getUnit(index)}`"
|
||||
v-for="(metric, index) in colMetrics"
|
||||
:label="`${metric} ${decodeURIComponent(getUnit(index))}`"
|
||||
:key="metric + index"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -103,7 +103,7 @@ limitations under the License. -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { ElMessage } from "element-plus";
|
||||
import type { PropType } from "vue";
|
||||
@@ -149,6 +149,7 @@ const chartLoading = ref<boolean>(false);
|
||||
const instances = ref<Instance[]>([]); // current instances
|
||||
const pageSize = 10;
|
||||
const searchText = ref<string>("");
|
||||
const colMetrics = computed(() => props.config.metrics.map((d: string) => d));
|
||||
|
||||
queryInstance();
|
||||
async function queryInstance() {
|
||||
@@ -238,9 +239,9 @@ function getUnit(index: number) {
|
||||
props.config.metricConfig[index].unit) ||
|
||||
"";
|
||||
if (u) {
|
||||
return `(${u})`;
|
||||
return `(${encodeURIComponent(u)})`;
|
||||
}
|
||||
return u;
|
||||
return encodeURIComponent("");
|
||||
}
|
||||
|
||||
watch(
|
||||
|
Reference in New Issue
Block a user