mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Make it work
This commit is contained in:
parent
4ecc8da398
commit
0046cfa3ee
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<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">
|
||||
<textarea class="form-control" rows="3" ng-model="$ctrl.parameter.enumOptions">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,8 +6,8 @@
|
||||
<input ng-switch-when="datetime-with-seconds" type="datetime-local" step="1" class="form-control" ng-model="param.ngModel">
|
||||
<input ng-switch-when="datetime-local" type="datetime-local" class="form-control" ng-model="param.ngModel">
|
||||
<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">
|
||||
<span ng-switch-when="enum">
|
||||
<select ng-model="param.value" class="form-control">
|
||||
<option ng-repeat="option in extractEnumOptions(param.enumOptions)" value="{{option}}">{{option}}</option>
|
||||
</select>
|
||||
</span>
|
||||
|
@ -40,10 +40,13 @@ function ParametersDirective($location, $uibModal) {
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
// These are input as newline delimited values,
|
||||
// so we split them here.
|
||||
scope.extractEnumOptions = (enumOptions) => {
|
||||
// These are input as newline delimited values,
|
||||
// so we split them here.
|
||||
return enumOptions.split('\n');
|
||||
if (enumOptions) {
|
||||
return enumOptions.split('\n');
|
||||
}
|
||||
return [];
|
||||
};
|
||||
scope.showParameterSettings = (param) => {
|
||||
$uibModal.open({
|
||||
|
Loading…
Reference in New Issue
Block a user