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