@@ -53,27 +53,23 @@
-
+
+
@@ -84,9 +80,11 @@
@@ -98,7 +96,7 @@
diff --git a/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateViewController.js b/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateViewController.js
index e0971784a..97b5aca90 100644
--- a/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateViewController.js
+++ b/app/portainer/views/custom-templates/create-custom-template-view/createCustomTemplateViewController.js
@@ -171,8 +171,7 @@ class CreateCustomTemplateViewController {
return this.CustomTemplateService.createCustomTemplateFromGitRepository(this.formValues);
}
- editorUpdate(cm) {
- const value = cm.getValue();
+ editorUpdate(value) {
this.formValues.FileContent = value;
this.state.isEditorDirty = true;
this.parseTemplate(value);
diff --git a/app/portainer/views/custom-templates/custom-templates-view/customTemplatesView.html b/app/portainer/views/custom-templates/custom-templates-view/customTemplatesView.html
index 98ae467d0..e99aeb03c 100644
--- a/app/portainer/views/custom-templates/custom-templates-view/customTemplatesView.html
+++ b/app/portainer/views/custom-templates/custom-templates-view/customTemplatesView.html
@@ -20,37 +20,33 @@
-
+
+
+
diff --git a/app/portainer/views/custom-templates/custom-templates-view/customTemplatesViewController.js b/app/portainer/views/custom-templates/custom-templates-view/customTemplatesViewController.js
index 48ee28352..560f00fd1 100644
--- a/app/portainer/views/custom-templates/custom-templates-view/customTemplatesViewController.js
+++ b/app/portainer/views/custom-templates/custom-templates-view/customTemplatesViewController.js
@@ -259,8 +259,8 @@ class CustomTemplatesViewController {
}
}
- editorUpdate(cm) {
- this.formValues.fileContent = cm.getValue();
+ editorUpdate(value) {
+ this.formValues.fileContent = value;
}
isDeployable(endpoint, templateType) {
diff --git a/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateView.html b/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateView.html
index 329abfec4..b285f093a 100644
--- a/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateView.html
+++ b/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateView.html
@@ -8,31 +8,28 @@
-
Web editor
-
-
+
+
+
+ You can get more information about Compose file format in the
+ official documentation
+ .
+
+
+
diff --git a/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateViewController.js b/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateViewController.js
index 829afe54a..5cf31592d 100644
--- a/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateViewController.js
+++ b/app/portainer/views/custom-templates/edit-custom-template-view/editCustomTemplateViewController.js
@@ -120,8 +120,7 @@ class EditCustomTemplateViewController {
}
}
- editorUpdate(cm) {
- const value = cm.getValue();
+ editorUpdate(value) {
if (this.formValues.FileContent.replace(/(\r\n|\n|\r)/gm, '') !== value.replace(/(\r\n|\n|\r)/gm, '')) {
this.formValues.FileContent = value;
this.parseTemplate(value);
diff --git a/app/react/components/buttons/AddButton.tsx b/app/react/components/buttons/AddButton.tsx
index d94ae2446..51f6024d7 100644
--- a/app/react/components/buttons/AddButton.tsx
+++ b/app/react/components/buttons/AddButton.tsx
@@ -1,5 +1,7 @@
import clsx from 'clsx';
+import { Icon } from '@/react/components/Icon';
+
import styles from './AddButton.module.css';
export interface Props {
@@ -17,13 +19,15 @@ export function AddButton({ label, onClick, className, disabled }: Props) {
'label',
'label-default',
'interactive',
+ 'vertical-center',
styles.addButton
)}
type="button"
onClick={onClick}
disabled={disabled}
>
-
{label}
+
+ {label}
);
}
diff --git a/app/react/components/form-components/InputList/InputList.tsx b/app/react/components/form-components/InputList/InputList.tsx
index f76e2a9b7..246b6af64 100644
--- a/app/react/components/form-components/InputList/InputList.tsx
+++ b/app/react/components/form-components/InputList/InputList.tsx
@@ -3,6 +3,7 @@ import clsx from 'clsx';
import { FormikErrors } from 'formik';
import { AddButton, Button } from '@@/buttons';
+import { Icon } from '@@/Icon';
import { Tooltip } from '@@/Tip/Tooltip';
import { TextTip } from '@@/Tip/TextTip';
@@ -131,7 +132,7 @@ export function InputList
({
disabled={disabled || index === 0}
onClick={() => handleMoveUp(index)}
>
-
+
>
)}