diff --git a/public/newInstanceModal.js b/public/newInstanceModal.js index 664b8a975..41c2ec208 100644 --- a/public/newInstanceModal.js +++ b/public/newInstanceModal.js @@ -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;