mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 10:00:17 -04:00
39 lines
2.1 KiB
HTML
39 lines
2.1 KiB
HTML
<form name="dataSourceForm">
|
|
<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">
|
|
<label for="dataSourceName">Name</label>
|
|
<input type="string" class="form-control" name="dataSourceName" ng-model="target.name" required>
|
|
</div>
|
|
<div class="form-group" ng-class='{"has-error": !inner.input.$valid}' ng-form="inner" ng-repeat="field in fields">
|
|
<label ng-if="field.property.type !== 'checkbox'">{{field.property.title || field.name | capitalize}}</label>
|
|
<input name="input" type="{{field.property.type}}" class="form-control" ng-model="target.options[field.name]" ng-required="field.property.required"
|
|
ng-if="field.property.type !== 'file' && field.property.type !== 'checkbox'" accesskey="tab" placeholder="{{field.property.default}}">
|
|
|
|
<label ng-if="field.property.type=='checkbox'">
|
|
<input name="input" type="{{field.property.type}}" ng-model="target.options[field.name]" ng-required="field.property.required"
|
|
ng-if="field.property.type !== 'file'" accesskey="tab" placeholder="{{field.property.default}}">
|
|
{{field.property.title || field.name | capitalize}}
|
|
</label>
|
|
|
|
<input name="input" type="file" class="form-control" ng-model="files[field.name]" ng-required="field.property.required && !target.options[field.name]"
|
|
base-sixty-four-input
|
|
ng-if="field.property.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>
|