From 59439c66bf107b654281e9369a1d7e5575343320 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:55:04 +0100 Subject: [PATCH] Log view: display any errors in listing the log files --- src/views/Log.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/views/Log.vue b/src/views/Log.vue index 7243eba6a..677170f6c 100644 --- a/src/views/Log.vue +++ b/src/views/Log.vue @@ -198,6 +198,7 @@ import gql from 'graphql-tag' import ViewToolbar from '@/components/cylc/ViewToolbar.vue' import DeltasCallback from '@/services/callbacks' import debounce from 'lodash/debounce' +import { Alert } from '@/model/Alert.model' /** * Query used to retrieve data for the Log view. @@ -507,7 +508,7 @@ export default { }) } catch (err) { // the query failed - console.warn(err) + this.handleLogFileListingErr(err) this.handleNoLogFiles() return } @@ -536,6 +537,9 @@ export default { this.fileDisabled = false this.logFiles = logFiles } else { + if (result.errors?.length) { + this.handleLogFileListingErr(result.errors[0].message) + } this.handleNoLogFiles() } }, @@ -544,6 +548,9 @@ export default { this.fileDisabled = true this.logFiles = [] }, + handleLogFileListingErr (err) { + this.$store.dispatch('setAlert', new Alert(err, 'error')) + }, }, watch: {