dnet-applications/apps/dnet-is-application/src/main/resources/static/html/dsm_add_api.html

61 lines
2.0 KiB
HTML

<h1 class="ml-3 mb-4 mt-3">Datasource Manager: Add API</h1>
<div class="container-fluid">
<div class="row mt-5">
<div class="col">
<form>
<form-textfield-static label="Datasource" value="dsName"></form-textfield-static>
<form-textfield-with-prefix label="API Id" prefix="{{prefix}}" value="api.id"></form-textfield-with-prefix>
<div class="form-group row">
<label class="col-sm-2 col-form-label col-form-label-sm">Compatibility level</label>
<div class="col-sm-10">
<select class="custom-select custom-select-sm" ng-model="api.compliance">
<option ng-repeat="v in compatibilityLevels">{{v}}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label col-form-label-sm">Content description</label>
<div class="col-sm-10">
<select class="custom-select custom-select-sm" ng-model="api.contentdescription">
<option ng-repeat="v in contentDescTypes">{{v}}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label col-form-label-sm">Protocol</label>
<div class="col-sm-10">
<select class="custom-select custom-select-sm" ng-model="api.protocol" ng-change="updateSelProtParams()">
<option ng-repeat="prot in protocols">{{prot.id}}</option>
</select>
</div>
</div>
<form-textfield label="BaseURL" value="api.baseUrl" regex="^(http|https|ftp|file|sftp|jar|mongodb):\/\/"></form-textfield>
<div ng-show="api.protocol" ng-repeat="p in selProtParams">
<div class="form-group row">
<label class="col-sm-2 col-form-label col-form-label-sm">Parameter: {{p.label}}</label>
<div class="col-sm-10">
<input type="text" class="form-control form-control-sm" ng-model="api.apiParams[p.name]"/>
</div>
</div>
</div>
{{api}}<br />
<button type="submit" class="btn btn-sm btn-primary">Add API</button>
</form>
</div>
</div>
</div>