Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log view: display any errors in listing the log files #1842

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/views/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
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.
Expand Down Expand Up @@ -507,7 +508,7 @@
})
} catch (err) {
// the query failed
console.warn(err)
this.handleLogFileListingErr(err)

Check warning on line 511 in src/views/Log.vue

View check run for this annotation

Codecov / codecov/patch

src/views/Log.vue#L511

Added line #L511 was not covered by tests
this.handleNoLogFiles()
return
}
Expand Down Expand Up @@ -536,6 +537,9 @@
this.fileDisabled = false
this.logFiles = logFiles
} else {
if (result.errors?.length) {
this.handleLogFileListingErr(result.errors[0].message)

Check warning on line 541 in src/views/Log.vue

View check run for this annotation

Codecov / codecov/patch

src/views/Log.vue#L541

Added line #L541 was not covered by tests
}
this.handleNoLogFiles()
}
},
Expand All @@ -544,6 +548,9 @@
this.fileDisabled = true
this.logFiles = []
},
handleLogFileListingErr (err) {
this.$store.dispatch('setAlert', new Alert(err, 'error'))

Check warning on line 552 in src/views/Log.vue

View check run for this annotation

Codecov / codecov/patch

src/views/Log.vue#L552

Added line #L552 was not covered by tests
},
},

watch: {
Expand Down
Loading