diff --git a/src/assets/icons/demand.svg b/src/assets/icons/demand.svg
index e9fc97fa..4b1b60db 100644
--- a/src/assets/icons/demand.svg
+++ b/src/assets/icons/demand.svg
@@ -12,4 +12,5 @@ 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. -->
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/src/store/modules/demand-log.ts b/src/store/modules/demand-log.ts
index 9b067896..0eaf7d1e 100644
--- a/src/store/modules/demand-log.ts
+++ b/src/store/modules/demand-log.ts
@@ -1,3 +1,4 @@
+import { ElMessage } from "element-plus";
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -30,6 +31,7 @@ interface DemandLogState {
selectorStore: any;
logs: Log[];
loadLogs: boolean;
+ message: string;
}
export const demandLogStore = defineStore({
@@ -45,11 +47,16 @@ export const demandLogStore = defineStore({
selectorStore: useSelectorStore(),
logs: [],
loadLogs: false,
+ message: "",
}),
actions: {
setLogCondition(data: Conditions) {
this.conditions = { ...this.conditions, ...data };
},
+ setLogs(logs: Log[], message?: string) {
+ this.logs = logs;
+ this.message = message || "";
+ },
async getInstances(id: string) {
const serviceId = this.selectorStore.currentService
? this.selectorStore.currentService.id
@@ -82,6 +89,7 @@ export const demandLogStore = defineStore({
return res.data;
}
if (res.data.data.containers.errorReason) {
+ this.containers = [{ label: "", value: "" }];
return res.data;
}
this.containers = res.data.data.containers.containers.map((d: string) => {
@@ -98,8 +106,14 @@ export const demandLogStore = defineStore({
if (res.data.errors) {
return res.data;
}
-
- this.logs = res.data.data.logs.logs.map((d: Log) => d.content).join("\n");
+ if (res.data.data.logs.errorReason) {
+ this.setLogs("", res.data.data.logs.errorReason);
+ return res.data;
+ }
+ const logs = res.data.data.logs.logs
+ .map((d: Log) => d.content)
+ .join("\n");
+ this.setLogs(logs);
return res.data;
},
},
diff --git a/src/views/dashboard/related/demand-log/Content.vue b/src/views/dashboard/related/demand-log/Content.vue
index a053ae7c..b8a32d85 100644
--- a/src/views/dashboard/related/demand-log/Content.vue
+++ b/src/views/dashboard/related/demand-log/Content.vue
@@ -14,10 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. -->
+ style="width: calc(100% - 10px); height: calc(100% - 140px)"
+ >
+ {{ demandLogStore.message }}
+