From 057a33e8bfbe766fbe617fcb503f95ed689260f1 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 24 Mar 2023 13:49:50 +0100 Subject: [PATCH 1/3] AppInfo: send config panel `args` only if not empty --- app/src/views/app/AppInfo.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/views/app/AppInfo.vue b/app/src/views/app/AppInfo.vue index 23c9618a..66a5d66c 100644 --- a/app/src/views/app/AppInfo.vue +++ b/app/src/views/app/AppInfo.vue @@ -265,6 +265,7 @@ import api, { objectToParams } from '@/api' import { readableDate } from '@/helpers/filters/date' import { humanPermissionName } from '@/helpers/filters/human' import { required } from '@/helpers/validators' +import { isEmptyValue } from '@/helpers/commons' import { formatFormData, formatI18nField, @@ -438,7 +439,7 @@ export default { action ? `apps/${this.id}/actions/${action}` : `apps/${this.id}/config/${id}`, - { args: objectToParams(args) }, + isEmptyValue(args) ? {} : { args: objectToParams(args) }, { key: `apps.${action ? 'action' : 'update'}_config`, id, name: this.id } ).then(() => { this.$refs.view.fetchQueries({ triggerLoading: true }) From 3fbf4cfdeba7fe89aeb35f71771c435a513e6932 Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 24 Mar 2023 14:45:59 +0100 Subject: [PATCH 2/3] AppInfo: properly display config panel init error without blocking the app info page --- app/src/components/globals/YunoAlert.vue | 1 + app/src/i18n/locales/en.json | 3 +- app/src/views/app/AppInfo.vue | 41 +++++++++++++++++------- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/app/src/components/globals/YunoAlert.vue b/app/src/components/globals/YunoAlert.vue index 421835f5..c3a6d42c 100644 --- a/app/src/components/globals/YunoAlert.vue +++ b/app/src/components/globals/YunoAlert.vue @@ -28,6 +28,7 @@ export default { computed: { _icon () { + if (this.icon) return this.icon return DEFAULT_STATUS_ICON[this.variant] } } diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index eaf563df..cb1652a3 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -75,7 +75,8 @@ }, "info": { "forum": "Search or ask the forum!", - "problem": "A problem with this app?" + "problem": "A problem with this app?", + "config_panel_error": "An error prevents the configuration panel from being displayed:" }, "install": { "license": "License: {license}", diff --git a/app/src/views/app/AppInfo.vue b/app/src/views/app/AppInfo.vue index 66a5d66c..b1c314d2 100644 --- a/app/src/views/app/AppInfo.vue +++ b/app/src/views/app/AppInfo.vue @@ -1,5 +1,8 @@