mirror of https://github.com/portainer/portainer
36 lines
1.7 KiB
HTML
36 lines
1.7 KiB
HTML
<ng-form class="form-horizontal environment-variables-panel" name="$ctrl.envVarsForm">
|
|
<div class="form-group">
|
|
<div class="col-sm-12 form-section-title" style="margin-top: 10px; margin-left: 15px; width: 98%"> Environment variables </div>
|
|
<div class="col-sm-12 environment-variables-panel--explanation">
|
|
{{::$ctrl.explanation}}
|
|
</div>
|
|
|
|
<environment-variables-simple-mode
|
|
ng-if="$ctrl.mode == 'simple'"
|
|
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">
|
|
<div class="col-sm-12 text-clickable">
|
|
<button type="button" class="btn btn-link btn-sm vertical-center !ml-0 p-0 hover:no-underline" ng-click="$ctrl.switchEnvMode()">
|
|
<pr-icon icon="'list'"></pr-icon> Simple mode
|
|
</button>
|
|
</div>
|
|
<div class="col-sm-12 small text-muted">
|
|
<pr-icon icon="'alert-circle'" mode="'primary'"></pr-icon>
|
|
Switch to simple mode to define variables line by line, or load from .env file
|
|
</div>
|
|
<div class="col-sm-12">
|
|
<code-editor identifier="environment-variables-editor" placeholder="e.g. key=value" value="$ctrl.editorText" on-change="($ctrl.editorUpdate)"></code-editor>
|
|
</div>
|
|
<div class="col-sm-12 small text-muted" ng-if="$ctrl.showHelpMessage">
|
|
<pr-icon icon="'alert-circle'" mode="'primary'"></pr-icon>
|
|
Environment changes will not take effect until redeployment occurs manually or via webhook.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ng-form>
|