From a95d734c34cba8a2e554d879b685d0eeee01008e Mon Sep 17 00:00:00 2001 From: Rex Wang <109048808+RexWangPT@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:31:56 +0800 Subject: [PATCH] EE-3487 update ui of docker/configs (#7370) --- .../views/configs/create/createConfigController.js | 4 ++-- app/docker/views/configs/create/createconfig.html | 4 ++-- app/docker/views/configs/edit/config.html | 8 ++++---- .../components/form-components/web-editor-form/index.js | 1 + .../form-components/web-editor-form/web-editor-form.html | 9 ++++++++- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/docker/views/configs/create/createConfigController.js b/app/docker/views/configs/create/createConfigController.js index 968a2279a..c17ea179c 100644 --- a/app/docker/views/configs/create/createConfigController.js +++ b/app/docker/views/configs/create/createConfigController.js @@ -147,8 +147,8 @@ class CreateConfigController { } } - editorUpdate(cm) { - this.formValues.ConfigContent = cm.getValue(); + editorUpdate(value) { + this.formValues.ConfigContent = value; this.state.isEditorDirty = true; } } diff --git a/app/docker/views/configs/create/createconfig.html b/app/docker/views/configs/create/createconfig.html index df2808e3d..ecc693989 100644 --- a/app/docker/views/configs/create/createconfig.html +++ b/app/docker/views/configs/create/createconfig.html @@ -16,13 +16,13 @@
- + >
diff --git a/app/docker/views/configs/edit/config.html b/app/docker/views/configs/edit/config.html index e4d822568..a3b45cbe9 100644 --- a/app/docker/views/configs/edit/config.html +++ b/app/docker/views/configs/edit/config.html @@ -15,11 +15,11 @@ ID {{ config.Id }} - Delete this config - Clone config diff --git a/app/portainer/components/form-components/web-editor-form/index.js b/app/portainer/components/form-components/web-editor-form/index.js index ab3c06417..8dc4beffc 100644 --- a/app/portainer/components/form-components/web-editor-form/index.js +++ b/app/portainer/components/form-components/web-editor-form/index.js @@ -9,6 +9,7 @@ export const webEditorForm = { placeholder: '@', yml: '<', value: '<', + readOnly: '<', onChange: '<', }, diff --git a/app/portainer/components/form-components/web-editor-form/web-editor-form.html b/app/portainer/components/form-components/web-editor-form/web-editor-form.html index 0222e3ec2..ef4e93461 100644 --- a/app/portainer/components/form-components/web-editor-form/web-editor-form.html +++ b/app/portainer/components/form-components/web-editor-form/web-editor-form.html @@ -6,7 +6,14 @@
- +