mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 13:35:24 +00:00
update standard
This commit is contained in:
parent
e9b9f51061
commit
e3779d2a06
@ -318,11 +318,11 @@ function aggregation(val: number, standard: any): number | string {
|
||||
data = val - Number(standard.plus);
|
||||
return data;
|
||||
}
|
||||
if (!isNaN(standard.multiply)) {
|
||||
if (!isNaN(standard.multiply) && standard.divide !== 0) {
|
||||
data = val * Number(standard.multiply);
|
||||
return data;
|
||||
}
|
||||
if (!isNaN(standard.divide)) {
|
||||
if (!isNaN(standard.divide) && standard.divide !== 0) {
|
||||
data = val / Number(standard.divide);
|
||||
return data;
|
||||
}
|
||||
|
@ -214,9 +214,9 @@ function exportTemplates() {
|
||||
});
|
||||
const name = `dashboards.json`;
|
||||
saveFile(templates, name);
|
||||
setTimeout(() => {
|
||||
multipleTableRef.value!.clearSelection();
|
||||
}, 2000);
|
||||
// setTimeout(() => {
|
||||
// multipleTableRef.value!.clearSelection();
|
||||
// }, 2000);
|
||||
}
|
||||
function handleEdit(row: DashboardItem) {
|
||||
dashboardStore.setMode(true);
|
||||
|
@ -55,61 +55,67 @@ limitations under the License. -->
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("plus") }}</span>
|
||||
<el-input
|
||||
<el-input-number
|
||||
class="input"
|
||||
v-model="selectedGrid.standard.plus"
|
||||
:min="0"
|
||||
size="small"
|
||||
placeholder="none"
|
||||
placeholder="Please input"
|
||||
@change="changeStandardOpt"
|
||||
/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("minus") }}</span>
|
||||
<el-input
|
||||
<el-input-number
|
||||
class="input"
|
||||
v-model="selectedGrid.standard.minus"
|
||||
:min="0"
|
||||
size="small"
|
||||
placeholder="none"
|
||||
placeholder="Please input"
|
||||
@change="changeStandardOpt"
|
||||
/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("multiply") }}</span>
|
||||
<el-input
|
||||
<el-input-number
|
||||
class="input"
|
||||
v-model="selectedGrid.standard.multiply"
|
||||
:min="1"
|
||||
size="small"
|
||||
placeholder="none"
|
||||
placeholder="Please input"
|
||||
@change="changeStandardOpt"
|
||||
/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("divide") }}</span>
|
||||
<el-input
|
||||
<el-input-number
|
||||
class="input"
|
||||
v-model="selectedGrid.standard.divide"
|
||||
size="small"
|
||||
placeholder="none"
|
||||
placeholder="Please input"
|
||||
:min="1"
|
||||
@change="changeStandardOpt"
|
||||
/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("convertToMilliseconds") }}</span>
|
||||
<el-input
|
||||
<el-input-number
|
||||
class="input"
|
||||
:min="0"
|
||||
v-model="selectedGrid.standard.milliseconds"
|
||||
size="small"
|
||||
placeholder="none"
|
||||
placeholder="Please input"
|
||||
@change="changeStandardOpt"
|
||||
/>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">{{ t("convertToSeconds") }}</span>
|
||||
<el-input
|
||||
<el-input-number
|
||||
class="input"
|
||||
:min="0"
|
||||
v-model="selectedGrid.standard.seconds"
|
||||
size="small"
|
||||
placeholder="none"
|
||||
placeholder="Please input"
|
||||
@change="changeStandardOpt"
|
||||
/>
|
||||
</div>
|
||||
|
@ -44,15 +44,16 @@ limitations under the License. -->
|
||||
</el-table-column>
|
||||
<el-table-column label="Service Instances">
|
||||
<template #default="scope">
|
||||
<div class="attributes">
|
||||
<div class="attributes" v-if="scope.row.attributes.length">
|
||||
<div
|
||||
v-for="(attr, index) in scope.row.attributes"
|
||||
:key="attr.name + index"
|
||||
:style="{ fontSize: `${config.fontSize}px` }"
|
||||
>
|
||||
{{ attr.name }}: {{ attr.value }}
|
||||
{{ attr.name }}: {{ attr.value || null }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>No Data</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -330,6 +330,10 @@ function changeMode() {
|
||||
}
|
||||
|
||||
function clickIcons(t: { id: string; content: string; name: string }) {
|
||||
if (t.id === "apply") {
|
||||
applyDashboard();
|
||||
return;
|
||||
}
|
||||
if (
|
||||
dashboardStore.selectedGrid &&
|
||||
dashboardStore.selectedGrid.type === "Tab"
|
||||
@ -361,9 +365,6 @@ function setTabControls(id: string) {
|
||||
case "addTopology":
|
||||
dashboardStore.addTabControls("Topology");
|
||||
break;
|
||||
case "apply":
|
||||
applyDashboard();
|
||||
break;
|
||||
default:
|
||||
ElMessage.info("Don't support this control");
|
||||
break;
|
||||
@ -390,9 +391,6 @@ function setControls(id: string) {
|
||||
case "addTopology":
|
||||
dashboardStore.addControl("Topology");
|
||||
break;
|
||||
case "apply":
|
||||
applyDashboard();
|
||||
break;
|
||||
default:
|
||||
dashboardStore.addControl("Widget");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user