From 3eaa5c864d45c28ada6322ef5d333b8588260a95 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 8 Aug 2024 13:57:01 +0200 Subject: [PATCH] refs #7355 account fixes --- src/components/ui/VnFilterPanel.vue | 8 ++-- src/pages/Account/AccountAcls.vue | 26 ++++++++-- src/pages/Account/Card/AccountCard.vue | 5 +- .../Account/Card/AccountDescriptorMenu.vue | 48 +++++++++++++++++++ src/pages/Account/Card/AccountPrivileges.vue | 9 +--- src/pages/Account/Role/AccountRoles.vue | 17 ++++++- src/pages/Account/Role/Card/RoleBasicData.vue | 5 -- src/router/modules/account.js | 18 +++---- 8 files changed, 102 insertions(+), 34 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 430383e40..ebae673a2 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -37,7 +37,7 @@ const $props = defineProps({ }, hiddenTags: { type: Array, - default: () => ['filter'], + default: () => ['filter', 'search', 'or', 'and'], }, customTags: { type: Array, @@ -195,8 +195,10 @@ function formatValue(value) { function sanitizer(params) { for (const [key, value] of Object.entries(params)) { - if (typeof value == 'object') - params[key] = Object.values(value)[0].replaceAll('%', ''); + if (typeof value == 'object') { + const param = Object.values(value)[0]; + if (typeof param == 'string') params[key] = param.replaceAll('%', ''); + } } return params; } diff --git a/src/pages/Account/AccountAcls.vue b/src/pages/Account/AccountAcls.vue index ad8600786..3a6679956 100644 --- a/src/pages/Account/AccountAcls.vue +++ b/src/pages/Account/AccountAcls.vue @@ -41,14 +41,12 @@ const columns = computed(() => [ name: 'id', label: t('id'), isId: true, - field: 'id', cardVisible: true, }, { align: 'left', name: 'model', label: t('model'), - field: 'model', cardVisible: true, create: true, }, @@ -56,15 +54,19 @@ const columns = computed(() => [ align: 'left', name: 'principalId', label: t('principalId'), - field: 'principalId', cardVisible: true, + component: 'select', + attrs: { + url: 'VnRoles', + optionLabel: 'name', + optionValue: 'name', + }, create: true, }, { align: 'left', name: 'property', label: t('property'), - field: 'property', cardVisible: true, create: true, }, @@ -72,7 +74,10 @@ const columns = computed(() => [ align: 'left', name: 'accessType', label: t('accessType'), - field: 'accessType', + component: 'select', + attrs: { + options: ['READ', 'WRITE', '*'], + }, cardVisible: true, create: true, }, @@ -162,4 +167,15 @@ es: Are you sure you want to continue?: ¿Seguro que quieres continuar? Remove ACL: Eliminar Acl Do you want to remove this ACL?: ¿Quieres eliminar este ACL? + principalId: Rol + model: Modelo +en: + New ACL: New ACL + ACL removed: ACL removed + ACL will be removed: ACL will be removed + Are you sure you want to continue?: Are you sure you want to continue? + Remove ACL: Remove ACL + Do you want to remove this ACL?: Do you want to remove this ACL? + principalId: Rol + model: Models diff --git a/src/pages/Account/Card/AccountCard.vue b/src/pages/Account/Card/AccountCard.vue index e4db3ee2b..555ce0866 100644 --- a/src/pages/Account/Card/AccountCard.vue +++ b/src/pages/Account/Card/AccountCard.vue @@ -25,9 +25,8 @@ const searchBarDataKeys = { diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue index 05576b145..f67cc0c6b 100644 --- a/src/pages/Account/Card/AccountDescriptorMenu.vue +++ b/src/pages/Account/Card/AccountDescriptorMenu.vue @@ -82,6 +82,54 @@ const removeAccount = async () => { }; diff --git a/src/router/modules/account.js b/src/router/modules/account.js index 3faa00fbc..cfec2b95d 100644 --- a/src/router/modules/account.js +++ b/src/router/modules/account.js @@ -65,13 +65,13 @@ export default { component: () => import('src/pages/Account/AccountAliasList.vue'), }, { - path: 'connections', - name: 'AccountConnections', + path: 'acls', + name: 'AccountAcls', meta: { - title: 'connections', + title: 'acls', icon: 'check', }, - component: () => import('src/pages/Account/AccountConnections.vue'), + component: () => import('src/pages/Account/AccountAcls.vue'), }, { path: 'accounts', @@ -104,13 +104,13 @@ export default { component: () => import('src/pages/Account/AccountSamba.vue'), }, { - path: 'acls', - name: 'AccountAcls', + path: 'connections', + name: 'AccountConnections', meta: { - title: 'acls', - icon: 'check', + title: 'connections', + icon: 'share', }, - component: () => import('src/pages/Account/AccountAcls.vue'), + component: () => import('src/pages/Account/AccountConnections.vue'), }, { path: 'acl-form',