shwstppr commented on a change in pull request #3454: Add support for new 
heuristics based VM Deployement for admins
URL: https://github.com/apache/cloudstack/pull/3454#discussion_r302943043
 
 

 ##########
 File path: ui/scripts/ui-custom/instanceWizard.js
 ##########
 @@ -277,6 +277,66 @@
                             }).click();
                         };
 
+                        if (isAdmin()) {
+                            $step.find('.select-deployment 
.podid').parent().show();
+                            $step.find('.select-deployment 
.clusterid').parent().show();
+                            $step.find('.select-deployment 
.hostid').parent().show();
+
+
+                            var updateFieldOptions = function(fieldClass, 
wizardField) {
+                                return function(data) {
+                                    var fieldSelect = 
$step.find('.select-deployment .' + fieldClass);
+                                    fieldSelect.find('option').remove().end();
+                                    $(data).each(function() {
+                                        fieldSelect.append(
+                                            $('<option>')
+                                            .attr({
+                                                value: this.id,
+                                                'wizard-field': wizardField,
+                                                'parentId': this.parentId
+                                            })
+                                            .html(this.description)
+                                            .data('json-obj', this)
+                                        );
+                                    });
+                                }
+                            };                        
 
 Review comment:
   Some trailing spaces warning from js files,
   ```
   /home/shwstppr/Desktop/pull.patch:799: trailing whitespace.
                       if (isAdmin()) {                       
   /home/shwstppr/Desktop/pull.patch:872: trailing whitespace.
                       } 
   /home/shwstppr/Desktop/pull.patch:1170: trailing whitespace.
                               };                        
   /home/shwstppr/Desktop/pull.patch:1182: trailing whitespace.
                               
   warning: 4 lines applied after fixing whitespace errors.
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to