mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-16 13:19:29 +00:00
use i18n
This commit is contained in:
@@ -15,7 +15,7 @@ limitations under the License. -->
|
|||||||
<template>
|
<template>
|
||||||
<div class="graph" :class="isRight ? 'flex-h' : 'flex-v'">
|
<div class="graph" :class="isRight ? 'flex-h' : 'flex-v'">
|
||||||
<Graph :option="option" @select="clickEvent" :filters="config.filters" />
|
<Graph :option="option" @select="clickEvent" :filters="config.filters" />
|
||||||
<Legend :config="config.legend" :data="data" />
|
<Legend :config="config.legend" :data="data" :intervalTime="intervalTime" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@@ -36,8 +36,8 @@ limitations under the License. -->
|
|||||||
</template>
|
</template>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<span>Key</span>
|
<span>{{ t("key") }}</span>
|
||||||
<span>Value</span>
|
<span>{{ t("value") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="value" v-for="(d, index) in item.topN" :key="index">
|
<div class="value" v-for="(d, index) in item.topN" :key="index">
|
||||||
<span>{{ d.key }}</span>
|
<span>{{ d.key }}</span>
|
||||||
@@ -56,6 +56,7 @@ limitations under the License. -->
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { useI18n } from "vue-i18n";
|
||||||
import { LegendOptions } from "@/types/dashboard";
|
import { LegendOptions } from "@/types/dashboard";
|
||||||
import useLegendProcess from "@/hooks/useLegendProcessor";
|
import useLegendProcess from "@/hooks/useLegendProcessor";
|
||||||
|
|
||||||
@@ -71,7 +72,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
intervalTime: { type: Array as PropType<string[]>, default: () => [] },
|
intervalTime: { type: Array as PropType<string[]>, default: () => [] },
|
||||||
});
|
});
|
||||||
|
const { t } = useI18n();
|
||||||
const tableData: any = computed(() => {
|
const tableData: any = computed(() => {
|
||||||
const { aggregations } = useLegendProcess(props.config);
|
const { aggregations } = useLegendProcess(props.config);
|
||||||
return aggregations(props.data, props.intervalTime).source;
|
return aggregations(props.data, props.intervalTime).source;
|
||||||
|
Reference in New Issue
Block a user