From 66fd0399334884a9fb877a7960c567f6cc2c1e53 Mon Sep 17 00:00:00 2001 From: Rex Wang <109048808+RexWangPT@users.noreply.github.com> Date: Wed, 5 Oct 2022 09:20:00 +0800 Subject: [PATCH] EE-2681 fix(docker): fix message format (#7784) --- app/docker/views/images/build/buildimage.html | 8 +++++--- .../git-form-compose-path-field.html | 13 ++++++++----- .../git-form-compose-path-field/index.js | 1 + .../forms/git-form/git-form.controller.js | 3 ++- .../components/forms/git-form/git-form.html | 1 + app/portainer/views/users/users.html | 6 ++++-- app/react/components/Tip/TextTip/TextTip.tsx | 16 +++++++++------- 7 files changed, 30 insertions(+), 18 deletions(-) diff --git a/app/docker/views/images/build/buildimage.html b/app/docker/views/images/build/buildimage.html index 5d0df3357..3e3dea2f8 100644 --- a/app/docker/views/images/build/buildimage.html +++ b/app/docker/views/images/build/buildimage.html @@ -183,10 +183,12 @@
URL
- + - Specify the URL to a Dockerfile, a tarball or a public Git repository (suffixed by .git). When using a Git repository URL, build contexts can be - specified as in the Docker documentation. + Specify the URL to a Dockerfile, a tarball or a public Git repository (suffixed by .git). When using a Git repository URL, build contexts can be + specified as in the Docker documentation.
diff --git a/app/portainer/components/forms/git-form/git-form-compose-path-field/git-form-compose-path-field.html b/app/portainer/components/forms/git-form/git-form-compose-path-field/git-form-compose-path-field.html index 4f672f7f8..e91ec016d 100644 --- a/app/portainer/components/forms/git-form/git-form-compose-path-field/git-form-compose-path-field.html +++ b/app/portainer/components/forms/git-form/git-form-compose-path-field/git-form-compose-path-field.html @@ -1,11 +1,14 @@
- Indicate the path to the {{ $ctrl.deployMethod == 'compose' ? 'Compose' : 'Manifest' }} file from the root - of your repository. To enable rebuilding of an image if already present on Docker standalone environments, includepull_policy: buildin your compose file as perDocker documentation. + + Indicate the path to the {{ $ctrl.deployMethod == 'compose' ? 'Compose' : 'Manifest' }} file from the root of your repository. + + To enable rebuilding of an image if already present on Docker standalone environments, includepull_policy: buildin your compose file as per + Docker documentation.
diff --git a/app/portainer/components/forms/git-form/git-form-compose-path-field/index.js b/app/portainer/components/forms/git-form/git-form-compose-path-field/index.js index 1bc29c67d..0073b6813 100644 --- a/app/portainer/components/forms/git-form/git-form-compose-path-field/index.js +++ b/app/portainer/components/forms/git-form/git-form-compose-path-field/index.js @@ -4,5 +4,6 @@ export const gitFormComposePathField = { deployMethod: '@', value: '<', onChange: '<', + isDockerStandalone: '<', }, }; diff --git a/app/portainer/components/forms/git-form/git-form.controller.js b/app/portainer/components/forms/git-form/git-form.controller.js index 1a0476224..9e5db9055 100644 --- a/app/portainer/components/forms/git-form/git-form.controller.js +++ b/app/portainer/components/forms/git-form/git-form.controller.js @@ -1,10 +1,11 @@ export default class GitFormController { /* @ngInject */ - constructor() { + constructor(StateManager) { this.onChangeField = this.onChangeField.bind(this); this.onChangeURL = this.onChangeField('RepositoryURL'); this.onChangeRefName = this.onChangeField('RepositoryReferenceName'); this.onChangeComposePath = this.onChangeField('ComposeFilePathInRepository'); + this.isDockerStandalone = StateManager.getState().endpoint.mode.provider === 'DOCKER_STANDALONE'; } onChangeField(field) { diff --git a/app/portainer/components/forms/git-form/git-form.html b/app/portainer/components/forms/git-form/git-form.html index 00d2c2d1e..9aba316f8 100644 --- a/app/portainer/components/forms/git-form/git-form.html +++ b/app/portainer/components/forms/git-form/git-form.html @@ -10,6 +10,7 @@ value="$ctrl.model.ComposeFilePathInRepository" on-change="($ctrl.onChangeComposePath)" deploy-method="{{ $ctrl.deployMethod }}" + is-docker-standalone="$ctrl.isDockerStandalone" > diff --git a/app/portainer/views/users/users.html b/app/portainer/views/users/users.html index 69d8b6b22..97422fd2c 100644 --- a/app/portainer/views/users/users.html +++ b/app/portainer/views/users/users.html @@ -126,8 +126,10 @@
- Note: non-administrator users who aren't in a team don't have access to any environments by default. Head over to the - Environments view to manage their accesses. + Note: non-administrator users who aren't in a team don't have access to any environments by default. Head over to the + Environments view to manage their accesses.
diff --git a/app/react/components/Tip/TextTip/TextTip.tsx b/app/react/components/Tip/TextTip/TextTip.tsx index 964dc6f76..ba46e4d51 100644 --- a/app/react/components/Tip/TextTip/TextTip.tsx +++ b/app/react/components/Tip/TextTip/TextTip.tsx @@ -27,13 +27,15 @@ export function TextTip({ } return ( -

- - {children} +

+ + + + {children}

); }