mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
remove mini chart
This commit is contained in:
parent
a4144ea4f9
commit
a607b6710d
@ -38,27 +38,7 @@ export function useSnapshot(metrics: { name: string; results: MetricsResults[] }
|
|||||||
return sources;
|
return sources;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMetricsMap() {
|
|
||||||
const metricsMap: { [key: string]: number[] } = {};
|
|
||||||
for (const metric of metrics) {
|
|
||||||
for (const item of metric.results) {
|
|
||||||
const arr = item.values.map((v: { value: string }) => Number(v.value));
|
|
||||||
if (!item.metric.labels.length) {
|
|
||||||
metricsMap[metric.name] = arr;
|
|
||||||
} else {
|
|
||||||
const name = item.metric.labels
|
|
||||||
.map((label: { key: string; value: string }) => `${label.key}=${label.value}`)
|
|
||||||
.join(",");
|
|
||||||
metricsMap[name] = arr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return metricsMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
processResults,
|
processResults,
|
||||||
getMetricsMap,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -122,9 +122,7 @@ limitations under the License. -->
|
|||||||
import { useAlarmStore } from "@/store/modules/alarm";
|
import { useAlarmStore } from "@/store/modules/alarm";
|
||||||
import { EventsDetailHeaders, AlarmDetailCol, EventsDetailKeys } from "./data";
|
import { EventsDetailHeaders, AlarmDetailCol, EventsDetailKeys } from "./data";
|
||||||
import { dateFormat } from "@/utils/dateFormat";
|
import { dateFormat } from "@/utils/dateFormat";
|
||||||
import { useSnapshot } from "@/hooks/useSnapshot";
|
|
||||||
import Snapshot from "./components/Snapshot.vue";
|
import Snapshot from "./components/Snapshot.vue";
|
||||||
import type { MetricsResults } from "@/types/dashboard";
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const alarmStore = useAlarmStore();
|
const alarmStore = useAlarmStore();
|
||||||
@ -148,14 +146,6 @@ limitations under the License. -->
|
|||||||
currentEvent.value = event;
|
currentEvent.value = event;
|
||||||
showEventDetails.value = true;
|
showEventDetails.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMetrics(snapshot: { metrics: { name: string; results: MetricsResults[] }[] }) {
|
|
||||||
const { getMetricsMap } = useSnapshot(snapshot.metrics);
|
|
||||||
const metrics = getMetricsMap();
|
|
||||||
const keys = Object.keys(metrics);
|
|
||||||
|
|
||||||
return { [keys[0]]: metrics[keys[0]] };
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.timeline-table {
|
.timeline-table {
|
||||||
|
Loading…
Reference in New Issue
Block a user