feat(stack): added ui label in env var section (#7010)

* feat(stack): added ui label in env var section

* feat(stack): added ui label in env var advanced section

* feat(stack): added showHelpMessage flag

* feat(stack): show help message when stack created from web editor.
pull/7149/head^2
fhanportainer 2 years ago committed by GitHub
parent d9be6d1724
commit de59ea030a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,6 +10,7 @@
ng-model="$ctrl.ngModel"
on-change="($ctrl.handleSimpleChange)"
on-switch-mode-click="($ctrl.switchEnvMode)"
show-help-message="$ctrl.showHelpMessage"
></environment-variables-simple-mode>
<div ng-if="$ctrl.mode == 'advanced'" class="environment-variables-panel--advanced">
@ -23,6 +24,10 @@
<div class="form-group" style="margin-left: 1px">
<code-editor identifier="environment-variables-editor" placeholder="e.g. key=value" value="$ctrl.editorText" yml="false" on-change="($ctrl.editorUpdate)"></code-editor>
</div>
<div class="col-sm-12 small text-muted" ng-if="$ctrl.showHelpMessage">
<i class="fa fa-info-circle blue-icon space-right" aria-hidden="true"></i>
Environment changes will not take effect until redeployment occurs manually or via webhook.
</div>
</div>
</div>
</ng-form>

@ -10,7 +10,7 @@
}
.env-items-list {
margin-top: 10px;
margin: 10px 0;
}
.env-items-list > * + * {

@ -33,4 +33,8 @@
on-remove="($ctrl.remove)"
></environment-variables-simple-mode-item>
</div>
<div class="col-sm-12 small text-muted" ng-if="$ctrl.ngModel.length > 0 && $ctrl.showHelpMessage">
<i class="fa fa-info-circle blue-icon space-right" aria-hidden="true"></i>
Environment changes will not take effect until redeployment occurs manually or via webhook.
</div>
</div>

@ -11,5 +11,6 @@ angular.module('portainer.app').component('environmentVariablesSimpleMode', {
ngModel: '<',
onSwitchModeClick: '<',
onChange: '<',
showHelpMessage: '<',
},
});

@ -11,5 +11,6 @@ angular.module('portainer.app').component('environmentVariablesPanel', {
ngModel: '<',
explanation: '@',
onChange: '<',
showHelpMessage: '<',
},
});

@ -35,6 +35,7 @@
ng-model="$ctrl.formValues.Env"
explanation="These values will be used as substitutions in the stack file"
on-change="($ctrl.onChangeEnvVar)"
show-help-message="true"
></environment-variables-panel>
<option-panel ng-if="$ctrl.stack.Type === 1 && $ctrl.endpoint.apiVersion >= 1.27" ng-model="$ctrl.formValues.Option" on-change="($ctrl.onChangeOption)"></option-panel>
<button

@ -180,6 +180,7 @@
ng-model="formValues.Env"
explanation="These values will be used as substitutions in the stack file"
on-change="(handleEnvVarChange)"
show-help-message="true"
></environment-variables-panel>
</div>
<!-- !environment-variables -->

Loading…
Cancel
Save