diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts
index ce1674d1..241297de 100644
--- a/src/store/modules/log.ts
+++ b/src/store/modules/log.ts
@@ -53,6 +53,12 @@ export const logStore = defineStore({
setLogCondition(data: any) {
this.conditions = { ...this.conditions, ...data };
},
+ resetCondition() {
+ this.conditions = {
+ queryDuration: useAppStoreWithOut().durationTime,
+ paging: { pageNum: 1, pageSize: 15 },
+ };
+ },
async getServices(layer: string) {
const res: AxiosResponse = await graphql.query("queryServices").params({
layer,
diff --git a/src/views/dashboard/controls/Ebpf.vue b/src/views/dashboard/controls/Ebpf.vue
index 78f67ef7..2f4f53e2 100644
--- a/src/views/dashboard/controls/Ebpf.vue
+++ b/src/views/dashboard/controls/Ebpf.vue
@@ -29,7 +29,7 @@ limitations under the License. -->
{{ t("delete") }}
-
+
@@ -47,6 +47,7 @@ const props = defineProps({
default: () => ({ graph: {} }),
},
activeIndex: { type: String, default: "" },
+ needQuery: { type: Boolean, default: true },
});
const { t } = useI18n();
const dashboardStore = useDashboardStore();
diff --git a/src/views/dashboard/controls/Log.vue b/src/views/dashboard/controls/Log.vue
index ea80a786..0d6708ef 100644
--- a/src/views/dashboard/controls/Log.vue
+++ b/src/views/dashboard/controls/Log.vue
@@ -30,7 +30,7 @@ limitations under the License. -->
@@ -50,6 +50,7 @@ const props = defineProps({
default: () => ({}),
},
activeIndex: { type: String, default: "" },
+ needQuery: { type: Boolean, default: true },
});
const { t } = useI18n();
const dashboardStore = useDashboardStore();
diff --git a/src/views/dashboard/controls/Profile.vue b/src/views/dashboard/controls/Profile.vue
index 1faca451..8a1aa366 100644
--- a/src/views/dashboard/controls/Profile.vue
+++ b/src/views/dashboard/controls/Profile.vue
@@ -29,7 +29,7 @@ limitations under the License. -->
{{ t("delete") }}
-
+
@@ -47,6 +47,7 @@ const props = defineProps({
default: () => ({ graph: {} }),
},
activeIndex: { type: String, default: "" },
+ needQuery: { type: Boolean, default: true },
});
const { t } = useI18n();
const dashboardStore = useDashboardStore();
diff --git a/src/views/dashboard/controls/Trace.vue b/src/views/dashboard/controls/Trace.vue
index f740453d..724b57f3 100644
--- a/src/views/dashboard/controls/Trace.vue
+++ b/src/views/dashboard/controls/Trace.vue
@@ -30,7 +30,7 @@ limitations under the License. -->
@@ -53,6 +53,7 @@ const props = defineProps({
default: () => ({ graph: {} }),
},
activeIndex: { type: String, default: "" },
+ needQuery: { type: Boolean, default: true },
});
const { t } = useI18n();
const dashboardStore = useDashboardStore();
diff --git a/src/views/dashboard/graphs/EndpointList.vue b/src/views/dashboard/graphs/EndpointList.vue
index 5ab1b95f..b8d7aa22 100644
--- a/src/views/dashboard/graphs/EndpointList.vue
+++ b/src/views/dashboard/graphs/EndpointList.vue
@@ -46,6 +46,7 @@ limitations under the License. -->
:intervalTime="intervalTime"
:colMetrics="colMetrics"
:config="config"
+ v-if="colMetrics.length"
/>
@@ -96,7 +97,9 @@ const dashboardStore = useDashboardStore();
const chartLoading = ref(false);
const endpoints = ref([]);
const searchText = ref("");
-const colMetrics = computed(() => props.config.metrics.map((d: string) => d));
+const colMetrics = computed(() =>
+ (props.config.metrics || []).filter((d: string) => d)
+);
if (props.needQuery) {
queryEndpoints();
@@ -119,7 +122,7 @@ async function queryEndpointMetrics(currentPods: Endpoint[]) {
if (!currentPods.length) {
return;
}
- const metrics = (props.config.metrics || []).filter((d: string) => d);
+ const metrics = props.config.metrics || [];
const metricTypes = props.config.metricTypes || [];
if (metrics.length && metrics[0] && metricTypes.length && metricTypes[0]) {
const params = await useQueryPodsMetrics(
diff --git a/src/views/dashboard/graphs/InstanceList.vue b/src/views/dashboard/graphs/InstanceList.vue
index 794b8804..bceeb910 100644
--- a/src/views/dashboard/graphs/InstanceList.vue
+++ b/src/views/dashboard/graphs/InstanceList.vue
@@ -43,6 +43,7 @@ limitations under the License. -->
(false);
const instances = ref([]); // current instances
const pageSize = 10;
const searchText = ref("");
-const colMetrics = computed(() => props.config.metrics.map((d: string) => d));
+const colMetrics = computed(() =>
+ (props.config.metrics || []).filter((d: string) => d)
+);
if (props.needQuery) {
queryInstance();
}
@@ -151,7 +154,8 @@ async function queryInstanceMetrics(currentInstances: Instance[]) {
if (!currentInstances.length) {
return;
}
- const { metrics, metricTypes } = props.config;
+ const metrics = props.config.metrics || [];
+ const metricTypes = props.config.metricTypes || [];
if (metrics.length && metrics[0] && metricTypes.length && metricTypes[0]) {
const params = await useQueryPodsMetrics(
diff --git a/src/views/dashboard/graphs/ServiceList.vue b/src/views/dashboard/graphs/ServiceList.vue
index c0b393fa..0a4678d2 100644
--- a/src/views/dashboard/graphs/ServiceList.vue
+++ b/src/views/dashboard/graphs/ServiceList.vue
@@ -58,6 +58,7 @@ limitations under the License. -->
:intervalTime="intervalTime"
:colMetrics="colMetrics"
:config="config"
+ v-if="colMetrics.length"
/>
@@ -117,7 +118,7 @@ const searchText = ref("");
const groups = ref({});
const sortServices = ref<(Service & { merge: boolean })[]>([]);
const colMetrics = computed(() =>
- props.config.metrics.filter((d: string) => d)
+ (props.config.metrics || []).filter((d: string) => d)
);
queryServices();
@@ -195,7 +196,8 @@ async function queryServiceMetrics(currentServices: Service[]) {
if (!currentServices.length) {
return;
}
- const { metrics, metricTypes } = props.config;
+ const metrics = props.config.metrics || [];
+ const metricTypes = props.config.metricTypes || [];
if (metrics.length && metrics[0] && metricTypes.length && metricTypes[0]) {
const params = await useQueryPodsMetrics(
diff --git a/src/views/dashboard/related/components/LogTable/Index.vue b/src/views/dashboard/related/components/LogTable/Index.vue
index 4d4f75e7..f1658ee4 100644
--- a/src/views/dashboard/related/components/LogTable/Index.vue
+++ b/src/views/dashboard/related/components/LogTable/Index.vue
@@ -15,20 +15,19 @@ limitations under the License. -->
-