This commit is contained in:
Levko Kravets 2018-02-18 14:08:44 +02:00
parent 927599cf00
commit 9647c37285
2 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,7 @@
<label class="control-label">Visualization Type</label>
<select required ng-model="$ctrl.visualization.type"
ng-disabled="!$ctrl.canChangeType"
ng-options="type.type as type.name for type in $ctrl.visTypes" class="form-control"
ng-change="$ctrl.typeChanged('{{$ctrl.visualization.type}}')"></select>
</div>

View File

@ -19,6 +19,9 @@ const EditVisualizationDialog = {
this.visualization = copy(this.originalVisualization);
this.visTypes = Visualization.visualizationTypes;
// Don't allow to change type after creating visualization
this.canChangeType = !(this.visualization && this.visualization.id);
this.newVisualization = () =>
({
type: Visualization.defaultVisualization.type,