From 849b0b537baf330b4a7c2bee827860d47dbf620f Mon Sep 17 00:00:00 2001 From: Alex Rekachynskyi Date: Tue, 14 Oct 2025 15:26:47 +0200 Subject: [PATCH 1/2] auth is showing at the right place --- src/modals/Source/ViewSource.vue | 6 +++--- src/views/Source/SourcesIndex.vue | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/modals/Source/ViewSource.vue b/src/modals/Source/ViewSource.vue index 3f2893e2..8023429e 100644 --- a/src/modals/Source/ViewSource.vue +++ b/src/modals/Source/ViewSource.vue @@ -289,9 +289,9 @@ export default { if (source.jwt) authData.JWT = source.jwt if (source.secret) authData.Secret = source.secret if (source.authorizationHeader) authData['Authorization Header'] = source.authorizationHeader - if (source.authenticationConfig && source.authenticationConfig.length > 0) { - source.authenticationConfig.forEach((config, index) => { - authData[`Auth Config ${index + 1}`] = typeof config === 'object' ? JSON.stringify(config) : config + if (source.configuration?.authentication && typeof source.configuration.authentication === 'object') { + Object.entries(source.configuration.authentication).forEach(([key, value]) => { + authData[key] = typeof value === 'object' ? JSON.stringify(value) : value }) } diff --git a/src/views/Source/SourcesIndex.vue b/src/views/Source/SourcesIndex.vue index fa4b0bcd..582b55eb 100644 --- a/src/views/Source/SourcesIndex.vue +++ b/src/views/Source/SourcesIndex.vue @@ -237,7 +237,7 @@ - + {{ key }} {{ value }} @@ -444,7 +444,7 @@ - + {{ t('openconnector', 'Auth Config {index}', { index: index + 1 }) }} {{ typeof config === 'object' ? JSON.stringify(config) : config }} @@ -713,6 +713,10 @@ export default { this.sourceStore.refreshSourceList() }, methods: { + filteredConfiguration(source) { + const { authentication, ...configWithoutAuth } = source.configuration || {} + return configWithoutAuth + }, setViewMode(mode) { if (mode === 'cards' || mode === 'table') { this.sourceStore.setViewMode(mode) @@ -752,8 +756,8 @@ export default { if (source.jwt) count++ if (source.secret) count++ if (source.authorizationHeader) count++ - if (source.authenticationConfig && source.authenticationConfig.length > 0) { - count += source.authenticationConfig.length + if (source.configuration.authentication && Object.keys(source.configuration.authentication).length > 0) { + count += Object.keys(source.configuration.authentication).length } return count }, @@ -775,7 +779,7 @@ export default { hasAuthenticationData(source) { return !!(source.auth || source.username || source.apikey || source.jwt || source.secret || source.authorizationHeader - || (source.authenticationConfig && source.authenticationConfig.length > 0)) + || (source.configuration.authentication && Object.keys(source.configuration.authentication).length > 0)) }, /** From d16cffc9671789dd601961e2f284cbee0206dad5 Mon Sep 17 00:00:00 2001 From: Alex Rekachynskyi Date: Tue, 14 Oct 2025 15:34:04 +0200 Subject: [PATCH 2/2] table wrapper --- css/main.css | 20 ++ src/modals/Source/ViewSource.vue | 98 +++--- src/views/Source/SourcesIndex.vue | 558 +++++++++++++++--------------- 3 files changed, 352 insertions(+), 324 deletions(-) diff --git a/css/main.css b/css/main.css index 5adcff1e..a66067c7 100644 --- a/css/main.css +++ b/css/main.css @@ -673,6 +673,26 @@ padding-left: 24px; } +/* Table wrapper for modals to prevent expansion */ +.modal-table-wrapper { + max-width: 100%; + overflow-x: auto; + border-radius: var(--border-radius); + border: 1px solid var(--color-border); +} + +.modal-table-wrapper .statisticsTable { + min-width: 300px; + margin: 0; +} + +.modal-table-wrapper .statisticsTable td.truncatedText { + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + /* Table styling variations */ .tableOfContents thead th { background-color: var(--color-primary-light); diff --git a/src/modals/Source/ViewSource.vue b/src/modals/Source/ViewSource.vue index 8023429e..e3ca4cf5 100644 --- a/src/modals/Source/ViewSource.vue +++ b/src/modals/Source/ViewSource.vue @@ -14,55 +14,57 @@ import { sourceStore, navigationStore, logStore, synchronizationStore } from '..
- - - - - - - - - - - - - - - - - - - - - - - - - - - - +
{{ t('openconnector', 'Property') }}{{ t('openconnector', 'Value') }}
{{ t('openconnector', 'Status') }}{{ sourceStore.sourceItem?.status || 'Unknown' }}
{{ t('openconnector', 'Enabled') }}{{ sourceStore.sourceItem?.isEnabled ? 'Enabled' : 'Disabled' }}
{{ t('openconnector', 'Type') }}{{ sourceStore.sourceItem?.type || 'Unknown' }}
{{ t('openconnector', 'Location') }} - {{ sourceStore.sourceItem.location }} -
{{ t('openconnector', 'Version') }}{{ sourceStore.sourceItem.version }}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - -
{{ t('openconnector', 'Property') }}{{ t('openconnector', 'Value') }}
{{ t('openconnector', 'Status') }}{{ sourceStore.sourceItem?.status || 'Unknown' }}
{{ t('openconnector', 'Enabled') }}{{ sourceStore.sourceItem?.isEnabled ? 'Enabled' : 'Disabled' }}
{{ t('openconnector', 'Type') }}{{ sourceStore.sourceItem?.type || 'Unknown' }}
{{ t('openconnector', 'Location') }} + {{ sourceStore.sourceItem.location }} +
{{ t('openconnector', 'Version') }}{{ sourceStore.sourceItem.version }}
{{ t('openconnector', 'Last Call') }}{{ new Date(sourceStore.sourceItem.lastCall).toLocaleDateString() + ', ' + new Date(sourceStore.sourceItem.lastCall).toLocaleTimeString() }}
{{ t('openconnector', 'Last Sync') }}{{ new Date(sourceStore.sourceItem.lastSync).toLocaleDateString() + ', ' + new Date(sourceStore.sourceItem.lastSync).toLocaleTimeString() }}
{{ t('openconnector', 'Created') }}{{ sourceStore.sourceItem?.dateCreated ? new Date(sourceStore.sourceItem.dateCreated).toLocaleDateString() : '-' }}
{{ t('openconnector', 'Updated') }}{{ sourceStore.sourceItem?.dateModified ? new Date(sourceStore.sourceItem.dateModified).toLocaleDateString() : '-' }}
+ + {{ t('openconnector', 'Last Call') }} + {{ new Date(sourceStore.sourceItem.lastCall).toLocaleDateString() + ', ' + new Date(sourceStore.sourceItem.lastCall).toLocaleTimeString() }} + + + {{ t('openconnector', 'Last Sync') }} + {{ new Date(sourceStore.sourceItem.lastSync).toLocaleDateString() + ', ' + new Date(sourceStore.sourceItem.lastSync).toLocaleTimeString() }} + + + {{ t('openconnector', 'Created') }} + {{ sourceStore.sourceItem?.dateCreated ? new Date(sourceStore.sourceItem.dateCreated).toLocaleDateString() : '-' }} + + + {{ t('openconnector', 'Updated') }} + {{ sourceStore.sourceItem?.dateModified ? new Date(sourceStore.sourceItem.dateModified).toLocaleDateString() : '-' }} + + + +
diff --git a/src/views/Source/SourcesIndex.vue b/src/views/Source/SourcesIndex.vue index 582b55eb..6d2eb553 100644 --- a/src/views/Source/SourcesIndex.vue +++ b/src/views/Source/SourcesIndex.vue @@ -150,126 +150,130 @@

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ t('openconnector', 'Property') }}{{ t('openconnector', 'Value') }}
{{ t('openconnector', 'Status') }}{{ source.status || 'Unknown' }}
{{ t('openconnector', 'Enabled') }} - {{ source.isEnabled ? 'Enabled' : 'Disabled' }} -
{{ t('openconnector', 'Type') }}{{ source.type || 'Unknown' }}
{{ t('openconnector', 'Location') }} - {{ source.location }} -
{{ t('openconnector', 'Version') }}{{ source.version }}
{{ t('openconnector', 'Configurations') }} - {{ getConfigurationCount(source) }} - - - Show - -
{{ t('openconnector', 'Authentication') }} - {{ getAuthenticationCount(source) }} - - - Show - -
{{ t('openconnector', 'Last Call') }}{{ new Date(source.lastCall).toLocaleDateString() + ', ' + new Date(source.lastCall).toLocaleTimeString() }}
{{ t('openconnector', 'Last Sync') }}{{ new Date(source.lastSync).toLocaleDateString() + ', ' + new Date(source.lastSync).toLocaleTimeString() }}
{{ t('openconnector', 'Created') }}{{ source.dateCreated ? new Date(source.dateCreated).toLocaleDateString() : '-' }}
{{ t('openconnector', 'Updated') }}{{ source.dateModified ? new Date(source.dateModified).toLocaleDateString() : '-' }}
-
- -
-
+ +
+ +
+
+ +