From a639c18310dfa7e182405bc731721a5e67fa1090 Mon Sep 17 00:00:00 2001 From: Remko Date: Wed, 2 Oct 2024 17:02:02 +0200 Subject: [PATCH 1/2] Added view log --- src/modals/Log/ViewLog.vue | 170 +++++++++++++++++++++++++++++ src/modals/Modals.vue | 4 +- src/store/modules/log.js | 10 ++ src/views/Source/SourceDetails.vue | 39 +++++-- 4 files changed, 213 insertions(+), 10 deletions(-) create mode 100644 src/modals/Log/ViewLog.vue diff --git a/src/modals/Log/ViewLog.vue b/src/modals/Log/ViewLog.vue new file mode 100644 index 0000000..4b5a5e1 --- /dev/null +++ b/src/modals/Log/ViewLog.vue @@ -0,0 +1,170 @@ + + + + + + diff --git a/src/modals/Modals.vue b/src/modals/Modals.vue index 6b3c182..7b42f82 100644 --- a/src/modals/Modals.vue +++ b/src/modals/Modals.vue @@ -16,6 +16,7 @@ + @@ -37,7 +38,7 @@ import EditJobArgument from './JobArgument/EditJobArgument.vue' import DeleteJobArgument from './JobArgument/DeleteJobArgument.vue' import EditSourceConfiguration from './SourceConfiguration/EditSourceConfiguration.vue' import DeleteSourceConfiguration from './SourceConfiguration/DeleteSourceConfiguration.vue' - +import ViewLog from './Log/ViewLog.vue' export default { name: 'Modals', components: { @@ -57,6 +58,7 @@ export default { DeleteJobArgument, EditSourceConfiguration, DeleteSourceConfiguration, + ViewLog, }, setup() { return { diff --git a/src/store/modules/log.js b/src/store/modules/log.js index fc3603b..7c17f3d 100644 --- a/src/store/modules/log.js +++ b/src/store/modules/log.js @@ -7,6 +7,8 @@ export const useLogStore = defineStore( state: () => ({ logItem: false, logList: [], + activeLogKey: null, + viewLogItem: null, }), actions: { setLogItem(logItem) { @@ -19,6 +21,14 @@ export const useLogStore = defineStore( ) console.log('Log list set to ' + logList.length + ' items') }, + setViewLogItem(logItem) { + this.viewLogItem = logItem + console.log('Active log item set to ' + logItem) + }, + setActiveLogKey(activeLogKey) { + this.activeLogKey = activeLogKey + console.log('Active log key set to ' + activeLogKey) + }, /* istanbul ignore next */ // ignore this for Jest until moved into a service async refreshLogList(search = null) { // @todo this might belong in a service? diff --git a/src/views/Source/SourceDetails.vue b/src/views/Source/SourceDetails.vue index e653fdd..50e1862 100644 --- a/src/views/Source/SourceDetails.vue +++ b/src/views/Source/SourceDetails.vue @@ -1,5 +1,5 @@