mirror of
https://github.com/getredash/redash.git
synced 2026-05-13 06:00:53 -04:00
Addressing comments
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<label>Global</label>
|
||||
<input type="checkbox" class="form-inline" ng-model="$ctrl.parameter.global">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group" ng-if="$ctrl.parameter.type === 'enum'">
|
||||
<label>Values (newline delimited)</label>
|
||||
<textarea class="form-control" rows="3" ng-model="$ctl.parameter.enumOptions">
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<input ng-switch-when="date" type="date" class="form-control" ng-model="param.ngModel">
|
||||
<span ns-switch-when="enum">
|
||||
<select ns-model="param.value" class="form-control">
|
||||
<option ng-repeat="option in param.enumOptions.split('\n')" value="{{option}}">{{option}}</option>
|
||||
<option ng-repeat="option in extractEnumOptions(param.enumOptions)" value="{{option}}">{{option}}</option>
|
||||
</select>
|
||||
</span>
|
||||
<input ng-switch-default type="{{param.type}}" class="form-control" ng-model="param.ngModel">
|
||||
|
||||
@@ -40,7 +40,11 @@ function ParametersDirective($location, $uibModal) {
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
||||
scope.extractEnumOptions = (enumOptions) => {
|
||||
// These are input as newline delimited values,
|
||||
// so we split them here.
|
||||
return enumOptions.split('\n');
|
||||
};
|
||||
scope.showParameterSettings = (param) => {
|
||||
$uibModal.open({
|
||||
component: 'parameterSettings',
|
||||
|
||||
Reference in New Issue
Block a user