mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 22:24:25 +00:00
fix: polish (#390)
This commit is contained in:
parent
7f6e4d09c0
commit
731d652a7d
@ -235,12 +235,10 @@ limitations under the License. -->
|
|||||||
.no-data {
|
.no-data {
|
||||||
font-size: $font-size-smaller;
|
font-size: $font-size-smaller;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
align-items: center;
|
||||||
display: -webkit-box;
|
justify-content: center;
|
||||||
-webkit-box-orient: horizontal;
|
display: flex;
|
||||||
-webkit-box-pack: center;
|
color: var(--text-color-placeholder);
|
||||||
-webkit-box-align: center;
|
|
||||||
color: #666;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart {
|
.chart {
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License. -->
|
limitations under the License. -->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="chart-table">
|
<div class="chart-table" v-if="dataKeys.length">
|
||||||
<div class="row header flex-h">
|
<div class="row header flex-h">
|
||||||
<div
|
<div
|
||||||
v-for="key in dataKeys[0]"
|
v-for="key in dataKeys[0]"
|
||||||
@ -41,6 +41,7 @@ limitations under the License. -->
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="no-data" v-else>No Data</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
@ -131,4 +132,13 @@ limitations under the License. -->
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
|
font-size: $font-size-smaller;
|
||||||
|
height: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
display: flex;
|
||||||
|
color: var(--text-color-placeholder);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -125,11 +125,13 @@ limitations under the License. -->
|
|||||||
const html = exprssions.map((m: string, index: number) => {
|
const html = exprssions.map((m: string, index: number) => {
|
||||||
const metric =
|
const metric =
|
||||||
topologyStore.hierarchyInstanceNodeMetrics[data.layer || ""][m].values.find(
|
topologyStore.hierarchyInstanceNodeMetrics[data.layer || ""][m].values.find(
|
||||||
(val: { id: string; value: unknown }) => val.id === data.id,
|
(val: { id: string; value: string }) => val.id === data.id,
|
||||||
) || {};
|
) || {};
|
||||||
const opt: MetricConfigOpt = nodeMetricConfig[index] || {};
|
const opt: MetricConfigOpt = nodeMetricConfig[index] || {};
|
||||||
|
|
||||||
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value} ${opt.unit || ""}</div>`;
|
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value || NaN} ${
|
||||||
|
opt.unit || ""
|
||||||
|
}</div>`;
|
||||||
});
|
});
|
||||||
const tipHtml = [
|
const tipHtml = [
|
||||||
`<div class="mb-5"><span class="grey">name: </span>${data.name}</div><div class="mb-5"><span class="grey">layer: </span>${data.layer}</div>`,
|
`<div class="mb-5"><span class="grey">name: </span>${data.name}</div><div class="mb-5"><span class="grey">layer: </span>${data.layer}</div>`,
|
||||||
|
@ -133,10 +133,12 @@ limitations under the License. -->
|
|||||||
const html = exprssions.map((m: string, index: number) => {
|
const html = exprssions.map((m: string, index: number) => {
|
||||||
const metric =
|
const metric =
|
||||||
topologyStore.hierarchyNodeMetrics[data.layer || ""][m].values.find(
|
topologyStore.hierarchyNodeMetrics[data.layer || ""][m].values.find(
|
||||||
(val: { id: string; value: unknown }) => val.id === data.id,
|
(val: { id: string; value: string }) => val.id === data.id,
|
||||||
) || {};
|
) || {};
|
||||||
const opt: MetricConfigOpt = nodeMetricConfig[index] || {};
|
const opt: MetricConfigOpt = nodeMetricConfig[index] || {};
|
||||||
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value} ${opt.unit || ""}</div>`;
|
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value || NaN} ${
|
||||||
|
opt.unit || ""
|
||||||
|
}</div>`;
|
||||||
});
|
});
|
||||||
const tipHtml = [
|
const tipHtml = [
|
||||||
`<div class="mb-5"><span class="grey">name: </span>${data.name}</div><div class="mb-5"><span class="grey">layer: </span>${data.layer}</div>`,
|
`<div class="mb-5"><span class="grey">name: </span>${data.name}</div><div class="mb-5"><span class="grey">layer: </span>${data.layer}</div>`,
|
||||||
|
@ -314,7 +314,7 @@ limitations under the License. -->
|
|||||||
const html = nodeMetrics.map((m, index) => {
|
const html = nodeMetrics.map((m, index) => {
|
||||||
const metric =
|
const metric =
|
||||||
(topologyStore.nodeMetricValue[m] &&
|
(topologyStore.nodeMetricValue[m] &&
|
||||||
topologyStore.nodeMetricValue[m].values.find((val: { id: string; value: unknown }) => val.id === data.id)) ||
|
topologyStore.nodeMetricValue[m].values.find((val: { id: string; value: string }) => val.id === data.id)) ||
|
||||||
{};
|
{};
|
||||||
const opt: MetricConfigOpt = nodeMetricConfig[index] || {};
|
const opt: MetricConfigOpt = nodeMetricConfig[index] || {};
|
||||||
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value || NaN} ${
|
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value || NaN} ${
|
||||||
@ -344,7 +344,7 @@ limitations under the License. -->
|
|||||||
);
|
);
|
||||||
if (metric) {
|
if (metric) {
|
||||||
const opt: MetricConfigOpt = linkServerMetricConfig[index] || {};
|
const opt: MetricConfigOpt = linkServerMetricConfig[index] || {};
|
||||||
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value} ${
|
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value || NaN} ${
|
||||||
opt.unit || ""
|
opt.unit || ""
|
||||||
}</div>`;
|
}</div>`;
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ limitations under the License. -->
|
|||||||
(val: { id: string; value: unknown }) => val.id === data.id,
|
(val: { id: string; value: unknown }) => val.id === data.id,
|
||||||
);
|
);
|
||||||
if (metric) {
|
if (metric) {
|
||||||
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value} ${
|
return ` <div class="mb-5"><span class="grey">${opt.label || m}: </span>${metric.value || NaN} ${
|
||||||
opt.unit || ""
|
opt.unit || ""
|
||||||
}</div>`;
|
}</div>`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user