Skip to content

Commit 918a943

Browse files
Merge pull request #1842 from MetRonnie/cat-log
Log view: display any errors in listing the log files
2 parents 23cd418 + ba67a71 commit 918a943

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/views/Log.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ import ViewToolbar from '@/components/cylc/ViewToolbar.vue'
198198
import DeltasCallback from '@/services/callbacks'
199199
import { debounce } from 'lodash-es'
200200
import CopyBtn from '@/components/core/CopyBtn.vue'
201+
import { Alert } from '@/model/Alert.model'
201202
import { getJobLogFileFromState } from '@/model/JobState.model'
202203
203204
/**
@@ -558,7 +559,7 @@ export default {
558559
})
559560
} catch (err) {
560561
// the query failed
561-
console.warn(err)
562+
this.handleLogFileListingErr(err)
562563
this.handleNoLogFiles()
563564
return
564565
}
@@ -576,6 +577,9 @@ export default {
576577
this.fileDisabled = false
577578
this.logFiles = logFiles
578579
} else {
580+
if (result.errors?.length) {
581+
this.handleLogFileListingErr(result.errors[0].message)
582+
}
579583
this.handleNoLogFiles()
580584
}
581585
},
@@ -603,6 +607,9 @@ export default {
603607
this.fileDisabled = true
604608
this.logFiles = []
605609
},
610+
handleLogFileListingErr (err) {
611+
this.$store.dispatch('setAlert', new Alert(err, 'error'))
612+
},
606613
},
607614
608615
watch: {

0 commit comments

Comments
 (0)