mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:45:25 +00:00
update metric types
This commit is contained in:
parent
15615a74cf
commit
d111c167d8
@ -30,7 +30,7 @@ limitations under the License. -->
|
|||||||
@change="changeConfigs(index, { unit: currentMetricConfig.unit })"
|
@change="changeConfigs(index, { unit: currentMetricConfig.unit })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="item mb-10">
|
<div class="item mb-10" v-show="metricType === 'readLabeledMetricsValues'">
|
||||||
<span class="label">{{ t("labels") }}</span>
|
<span class="label">{{ t("labels") }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
class="input"
|
class="input"
|
||||||
@ -40,7 +40,7 @@ limitations under the License. -->
|
|||||||
@change="changeConfigs(index, { label: currentMetricConfig.label })"
|
@change="changeConfigs(index, { label: currentMetricConfig.label })"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="item mb-10">
|
<div class="item mb-10" v-show="metricType === 'readLabeledMetricsValues'">
|
||||||
<span class="label">{{ t("labelsIndex") }}</span>
|
<span class="label">{{ t("labelsIndex") }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
class="input"
|
class="input"
|
||||||
@ -64,7 +64,10 @@ limitations under the License. -->
|
|||||||
:clearable="true"
|
:clearable="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div
|
||||||
|
class="item"
|
||||||
|
v-show="['sortMetrics', 'readLabeledMetricsValues'].includes(metricType)"
|
||||||
|
>
|
||||||
<span class="label">{{ t("sortOrder") }}</span>
|
<span class="label">{{ t("sortOrder") }}</span>
|
||||||
<Selector
|
<Selector
|
||||||
:value="currentMetric.sortOrder || 'DES'"
|
:value="currentMetric.sortOrder || 'DES'"
|
||||||
@ -97,6 +100,9 @@ const { t } = useI18n();
|
|||||||
const emit = defineEmits(["update", "close"]);
|
const emit = defineEmits(["update", "close"]);
|
||||||
const dashboardStore = useDashboardStore();
|
const dashboardStore = useDashboardStore();
|
||||||
const currentMetric = ref<MetricConfigOpt>(props.currentMetricConfig);
|
const currentMetric = ref<MetricConfigOpt>(props.currentMetricConfig);
|
||||||
|
const metricType = ref<string>(
|
||||||
|
dashboardStore.selectedGrid.metricTypes[props.index]
|
||||||
|
);
|
||||||
|
|
||||||
function changeConfigs(index: number, param: { [key: string]: string }) {
|
function changeConfigs(index: number, param: { [key: string]: string }) {
|
||||||
const metricConfig = dashboardStore.selectedGrid.metricConfig || [];
|
const metricConfig = dashboardStore.selectedGrid.metricConfig || [];
|
||||||
|
Loading…
Reference in New Issue
Block a user