add Snapshot

This commit is contained in:
Fine 2025-01-02 16:46:25 +08:00
parent 134067e623
commit af0af466ce
8 changed files with 38 additions and 1 deletions

View File

@ -141,7 +141,6 @@ export async function useDashboardQueryProcessor(configList: Indexable[]) {
}
}
}
return { source, tips, typesOfMQE };
}
async function fetchMetrics(configArr: any) {

View File

@ -395,5 +395,6 @@ const msg = {
profilingEvents: "Async Profiling Events",
execArgs: "Exec Args",
instances: "Instances",
snapshot: "Snapshot",
};
export default msg;

View File

@ -395,5 +395,6 @@ const msg = {
profilingEvents: "Async Profiling Events",
execArgs: "Exec Args",
instances: "Instances",
snapshot: "Snapshot",
};
export default msg;

View File

@ -393,5 +393,6 @@ const msg = {
profilingEvents: "异步分析事件",
execArgs: "String任务扩展",
instances: "实例",
snapshot: "快照",
};
export default msg;

View File

@ -27,6 +27,7 @@ export interface Alarm {
scope: string;
tags: Array<{ key: string; value: string }>;
events: Event[];
snapshot: Indexable;
}
export interface Event {

View File

@ -75,6 +75,9 @@ limitations under the License. -->
</ul>
</div>
</span>
<span v-else-if="item.label === 'snapshot'">
<Snapshot :snapshot="currentDetail.snapshot" />
</span>
<span v-else>{{ currentDetail[item.label] }}</span>
</div>
</el-dialog>
@ -117,6 +120,7 @@ limitations under the License. -->
import { useAlarmStore } from "@/store/modules/alarm";
import { EventsDetailHeaders, AlarmDetailCol, EventsDetailKeys } from "./data";
import { dateFormat } from "@/utils/dateFormat";
import Snapshot from "./components/Snapshot.vue";
const { t } = useI18n();
const alarmStore = useAlarmStore();

View File

@ -0,0 +1,26 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="snapshot flex-v"> Line Charts </div>
</template>
<script lang="ts" setup>
/*global defineProps */
const props = defineProps({
snapshot: { type: Object, default: () => {} },
});
console.log(props.snapshot);
</script>
<style lang="scss" scoped></style>

View File

@ -52,6 +52,10 @@ export const AlarmDetailCol = [
label: "events",
value: "eventDetail",
},
{
label: "snapshot",
value: "snapshot",
},
];
export const EventsDetailKeys = [