2017-11-06 08:47:31 +00:00
|
|
|
<rd-header>
|
2018-06-06 16:12:35 +00:00
|
|
|
<rd-header-title title-text="Create config"></rd-header-title>
|
2020-04-10 21:54:53 +00:00
|
|
|
<rd-header-content> <a ui-sref="docker.configs">Configs</a> > Add config </rd-header-content>
|
2017-11-06 08:47:31 +00:00
|
|
|
</rd-header>
|
|
|
|
|
|
|
|
<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">
|
2018-02-27 07:19:21 +00:00
|
|
|
<code-editor
|
|
|
|
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"
|
2018-02-27 07:19:21 +00:00
|
|
|
></code-editor>
|
2017-11-06 08:47:31 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- !config-data -->
|
|
|
|
<!-- labels -->
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-sm-12" style="margin-top: 5px;">
|
|
|
|
<label class="control-label text-left">Labels</label>
|
2019-03-21 05:46:49 +00:00
|
|
|
<span class="label label-default interactive" style="margin-left: 10px;" ng-click="ctrl.addLabel()">
|
2017-11-06 08:47:31 +00:00
|
|
|
<i class="fa fa-plus-circle" aria-hidden="true"></i> add label
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<!-- labels-input-list -->
|
|
|
|
<div class="col-sm-12 form-inline" style="margin-top: 10px;">
|
2019-03-21 05:46:49 +00:00
|
|
|
<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>
|
2019-03-21 05:46:49 +00:00
|
|
|
<button class="btn btn-sm btn-danger" type="button" ng-click="ctrl.removeLabel($index)">
|
2017-11-06 08:47:31 +00:00
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
|
|
|
</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 -->
|
|
|
|
<div class="col-sm-12 form-section-title">
|
|
|
|
Actions
|
|
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<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>
|