update cofig

This commit is contained in:
Qiuxia Fan 2022-03-26 12:29:29 +08:00
parent 1f483a5f69
commit 87e6cb7e84
4 changed files with 15 additions and 7 deletions

View File

@ -335,6 +335,5 @@ function aggregation(val: number, config: any): number | string {
break;
}
console.log(data);
return data;
}

View File

@ -85,7 +85,7 @@ import { Option } from "@/types/app";
import graphs from "../graphs";
import configs from "./widget/graph-styles";
import WidgetOptions from "./widget/WidgetOptions.vue";
import MetricOptions from "./widget/metric/Options.vue";
import MetricOptions from "./widget/metric/Index.vue";
export default defineComponent({
name: "WidgetEdit",

View File

@ -49,13 +49,18 @@ limitations under the License. -->
@change="changeMetricType(index, $event)"
class="selectors"
/>
<el-popover placement="top" :width="400" :visible="showConfig">
<el-popover placement="top" :width="400" trigger="click">
<template #reference>
<span @click="setMetricConfig(index)">
<Icon class="cp mr-5" iconName="mode_edit" size="middle" />
</span>
</template>
<Standard @update="queryMetrics" @close="showConfig = false" />
<Standard
@update="queryMetrics"
@close="showConfig = false"
:currentMetricConfig="currentMetricConfig"
:index="index"
/>
</el-popover>
<span
v-show="states.isList || states.metricTypes[0] === 'readMetricsValues'"
@ -402,6 +407,7 @@ function deleteMetric(index: number) {
...{ metricTypes: states.metricTypes, metrics: states.metrics },
metricConfig,
});
console.log(dashboardStore.selectedGrid);
}
function setMetricTypeList(type: string) {
if (type !== MetricsType.REGULAR_VALUE) {

View File

@ -267,8 +267,11 @@ export const TextColors: { [key: string]: string } = {
export const CalculationOpts = [
{ label: "Percentage", value: "percentage" },
{ label: "ByteToKB", value: "byteToKB" },
{ label: "ConvertMilliseconds", value: "convertMilliseconds" },
{ label: "ConvertSeconds", value: "convertSeconds" },
{ label: "Byte to KB", value: "byteToKB" },
{ label: "Apdex", value: "apdex" },
{
label: "Convert milliseconds to YYYY-MM-DD HH:mm:ss",
value: "convertMilliseconds",
},
{ label: "Convert seconds to YYYY-MM-DD HH:mm:ss", value: "convertSeconds" },
];