2022-07-06 06:08:45 +00:00
|
|
|
<page-header title="'Create config'" breadcrumbs="[{label:'Configs', link:'docker.configs'}, 'Add config']"> </page-header>
|
2017-11-06 08:47:31 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
|
|
<rd-widget>
|
|
|
|
<rd-widget-body>
|
|
|
|
<form class="form-horizontal">
|
|
|
|
<!-- name-input -->
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_name" class="col-sm-1 control-label text-left">Name</label>
|
|
|
|
<div class="col-sm-11">
|
2020-04-10 21:54:53 +00:00
|
|
|
<input type="text" class="form-control" ng-model="ctrl.formValues.Name" id="config_name" placeholder="e.g. myConfig" />
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- !name-input -->
|
|
|
|
<!-- config-data -->
|
|
|
|
<div class="form-group">
|
2019-03-21 05:46:49 +00:00
|
|
|
<div class="col-sm-12" ng-if="ctrl.formValues.displayCodeEditor">
|
2022-08-01 12:31:56 +00:00
|
|
|
<web-editor-form
|
2018-02-27 07:19:21 +00:00
|
|
|
identifier="config-creation-editor"
|
|
|
|
placeholder="Define or paste the content of your config here"
|
|
|
|
yml="false"
|
2020-04-10 21:54:53 +00:00
|
|
|
on-change="(ctrl.editorUpdate)"
|
2019-03-21 05:46:49 +00:00
|
|
|
value="ctrl.formValues.Data"
|
2022-08-01 12:31:56 +00:00
|
|
|
></web-editor-form>
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- !config-data -->
|
|
|
|
<!-- labels -->
|
|
|
|
<div class="form-group">
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12" style="margin-top: 5px">
|
2017-11-06 08:47:31 +00:00
|
|
|
<label class="control-label text-left">Labels</label>
|
2022-01-17 05:53:32 +00:00
|
|
|
<span class="label label-default interactive" style="margin-left: 10px" ng-click="ctrl.addLabel()">
|
2022-07-26 23:20:21 +00:00
|
|
|
<pr-icon icon="'plus'" mode="'alt'" feather="true"></pr-icon> add label
|
2017-11-06 08:47:31 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<!-- labels-input-list -->
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-inline" style="margin-top: 10px">
|
|
|
|
<div ng-repeat="label in ctrl.formValues.Labels" style="margin-top: 2px">
|
2017-11-06 08:47:31 +00:00
|
|
|
<div class="input-group col-sm-5 input-group-sm">
|
|
|
|
<span class="input-group-addon">name</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input type="text" class="form-control" ng-model="label.name" placeholder="e.g. com.example.foo" />
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
|
|
|
<div class="input-group col-sm-5 input-group-sm">
|
|
|
|
<span class="input-group-addon">value</span>
|
2020-04-10 21:54:53 +00:00
|
|
|
<input type="text" class="form-control" ng-model="label.value" placeholder="e.g. bar" />
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
2022-07-26 23:18:06 +00:00
|
|
|
<button class="btn btn-light" type="button" ng-click="ctrl.removeLabel($index)">
|
|
|
|
<pr-icon icon="'trash'" feather="true" class-name="'icon-secondary icon-md'"></pr-icon>
|
2017-11-06 08:47:31 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- !labels-input-list -->
|
|
|
|
</div>
|
|
|
|
<!-- !labels-->
|
|
|
|
<!-- access-control -->
|
2020-06-09 09:55:36 +00:00
|
|
|
<por-access-control-form form-data="ctrl.formValues.AccessControlData"></por-access-control-form>
|
2017-11-06 08:47:31 +00:00
|
|
|
<!-- !access-control -->
|
|
|
|
<!-- actions -->
|
2022-01-17 05:53:32 +00:00
|
|
|
<div class="col-sm-12 form-section-title"> Actions </div>
|
2017-11-06 08:47:31 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12">
|
2019-03-21 05:46:49 +00:00
|
|
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="!ctrl.formValues.Name" ng-click="ctrl.create()">Create config</button>
|
2022-01-17 05:53:32 +00:00
|
|
|
<span class="text-danger" ng-if="ctrl.state.formValidationError" style="margin-left: 5px">{{ ctrl.state.formValidationError }}</span>
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- !actions -->
|
|
|
|
</form>
|
|
|
|
</rd-widget-body>
|
|
|
|
</rd-widget>
|
|
|
|
</div>
|
|
|
|
</div>
|