mirror of
https://github.com/getredash/redash.git
synced 2026-05-09 12:01:08 -04:00
38 lines
2.0 KiB
HTML
38 lines
2.0 KiB
HTML
<form name="dataSourceForm">
|
|
<div class="form-group">
|
|
<label for="dataSourceName">Name</label>
|
|
<input type="string" class="form-control" name="dataSourceName" ng-model="target.name" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="type">Type</label>
|
|
<select name="type" class="form-control" ng-options="type.type as type.name for type in types" ng-model="target.type"></select>
|
|
</div>
|
|
<div class="form-group" ng-class='{"has-error": !inner.input.$valid}' ng-form="inner" ng-repeat="(name, input) in type.configuration_schema.properties">
|
|
<label ng-if="input.type !== 'checkbox'">{{input.title || name | capitalize}}</label>
|
|
<input name="input" type="{{input.type}}" class="form-control" ng-model="target.options[name]" ng-required="input.required"
|
|
ng-if="input.type !== 'file' && input.type !== 'checkbox'" accesskey="tab" placeholder="{{input.default}}">
|
|
|
|
<label ng-if="input.type=='checkbox'">
|
|
<input name="input" type="{{input.type}}" ng-model="target.options[name]" ng-required="input.required"
|
|
ng-if="input.type !== 'file'" accesskey="tab" placeholder="{{input.default}}">
|
|
{{input.title || name | capitalize}}
|
|
</label>
|
|
|
|
<input name="input" type="file" class="form-control" ng-model="files[name]" ng-required="input.required && !target.options[name]"
|
|
base-sixty-four-input
|
|
ng-if="input.type === 'file'">
|
|
</div>
|
|
<button class="btn btn-primary" ng-disabled="!dataSourceForm.$valid" ng-click="saveChanges()">Save</button>
|
|
<span ng-repeat="action in actions">
|
|
<button class="btn"
|
|
ng-class="action.class"
|
|
ng-if="target.id"
|
|
ng-disabled="(action.disableWhenDirty && dataSourceForm.$dirty) || inProgressActions[action.name]"
|
|
ng-click="action.callback()" ng-bind-html="action.name"></button>
|
|
</span>
|
|
|
|
<span ng-transclude>
|
|
|
|
</span>
|
|
</form>
|