Skip to content

Commit

Permalink
#66 show parameter values of old templates correctly
Browse files Browse the repository at this point in the history
fixes #66
  • Loading branch information
FRosner committed Sep 1, 2016
1 parent 6053d5c commit dce5cf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/newInstanceModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ angular.module('broccoli')
.controller('NewInstanceCtrl', function ($scope, $uibModalInstance, template, instance) {
var vm = this;
vm.templateId = template.id;
vm.parameters = template.parameters;

if (instance == null) {
vm.panelTitle = "New " + template.id + " (" + template.version.substring(0, 8) + ")";
vm.okText = "Create instance";
vm.paramsToValue = {};
vm.parameters = template.parameters;
} else {
vm.panelTitle = "Edit " + instance.id + " (" + template.id + ", " + instance.template.version.substring(0, 8) + ")";
vm.okText = "Edit instance";
vm.paramsToValue = instance.parameterValues;
vm.parameters = Object.keys(instance.parameterValues);
}
vm.ok = ok;
vm.cancel = cancel;
Expand Down

0 comments on commit dce5cf2

Please sign in to comment.