update config

This commit is contained in:
Fine 2022-11-02 11:23:43 +08:00
parent 6e15317835
commit 8e7702b09b
4 changed files with 50 additions and 4 deletions

View File

@ -60,9 +60,11 @@ const msg = {
max: "Max",
min: "Min",
plus: "Plus",
mean: "Mean",
minus: "Minus",
multiply: "Multiply",
divide: "Divide",
total: "Total",
convertToMilliseconds: "Convert Unix Timestamp(milliseconds)",
convertToSeconds: "Convert Unix Timestamp(seconds)",
smooth: "Smooth",
@ -171,6 +173,7 @@ const msg = {
showLegend: "Show Legend",
asTable: "As Table",
toTheRight: "To The Right",
legendValues: "Legend Values",
seconds: "Seconds",
hourTip: "Select Hour",
minuteTip: "Select Minute",

View File

@ -59,9 +59,11 @@ const msg = {
standardOptions: "Opciones estandar",
max: "Máx",
min: "Mín",
mean: "Promedio",
plus: "Más",
minus: "Menoss",
multiply: "Multiplcar",
total: "Todo",
divide: "Dividir",
convertToMilliseconds: "Convertir Unix Timestamp(milisegundos)",
convertToSeconds: "Convertir Unix Timestamp(segundos)",
@ -160,6 +162,7 @@ const msg = {
queryOrder: "Orden de consulta",
latency: "Retraso",
metricValues: "Valor métrico",
legendValues: "Valor de la leyenda",
seconds: "Segundos",
hourTip: "Seleccione Hora",
minuteTip: "Seleccione Minuto",

View File

@ -56,10 +56,12 @@ const msg = {
standardOptions: "标准选项",
max: "最大值",
min: "最小值",
mean: "平均值",
plus: "加法",
minus: "减法",
multiply: "乘法",
divide: "除法",
total: "总计",
convertToMilliseconds: "转换Unix时间戳毫秒",
convertToSeconds: "转换Unix时间戳",
smooth: "光滑的",
@ -168,6 +170,7 @@ const msg = {
showLegend: "显示图例",
asTable: "作为表格",
toTheRight: "在右边",
legendValues: "图例值",
seconds: "秒",
hourTip: "选择小时",
minuteTip: "选择分钟",

View File

@ -15,28 +15,28 @@ limitations under the License. -->
<template>
<div class="legend">
<span class="label">{{ t("legendOptions") }}</span>
<span class="label">{{ t("showLegend") }}</span>
<span class="title">{{ t("showLegend") }}</span>
<el-switch
v-model="legend.showLegend"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ showLegend: legend.showLegend })"
/>
<span class="label">{{ t("asTable") }}</span>
<span class="title">{{ t("asTable") }}</span>
<el-switch
v-model="legend.asTable"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ asTable: legend.asTable })"
/>
<span class="label">{{ t("toTheRight") }}</span>
<span class="title">{{ t("toTheRight") }}</span>
<el-switch
v-model="legend.toTheRight"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ toTheRight: legend.toTheRight })"
/>
<span class="label">{{ t("width") }}</span>
<span class="title">{{ t("width") }}</span>
<el-input
v-model="legend.width"
class="input"
@ -44,6 +44,35 @@ limitations under the License. -->
placeholder="Please input the width"
@change="updateLegendConfig({ toTheRight: legend.width })"
/>
<span class="label">{{ t("legendValues") }}</span>
<span class="title">{{ t("min") }}</span>
<el-switch
v-model="legend.min"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ min: legend.min })"
/>
<span class="title">{{ t("max") }}</span>
<el-switch
v-model="legend.max"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ max: legend.max })"
/>
<span class="title">{{ t("mean") }}</span>
<el-switch
v-model="legend.mean"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ avg: legend.mean })"
/>
<span class="title">{{ t("total") }}</span>
<el-switch
v-model="legend.total"
active-text="Yes"
inactive-text="No"
@change="updateLegendConfig({ avg: legend.total })"
/>
</div>
<div>
<span class="label">{{ t("showXAxis") }}</span>
@ -130,4 +159,12 @@ function updateLegendConfig(param: { [key: string]: unknown }) {
margin-top: 5px;
margin-bottom: -5px;
}
.title {
font-size: 12px;
}
.legend {
margin-bottom: 10px;
}
</style>