|
14 | 14 | // KIND, either express or implied. See the License for the |
15 | 15 | // specific language governing permissions and limitations |
16 | 16 | // under the License. |
17 | | - |
18 | 17 | (function($, cloudStack) { |
19 | 18 | var elems = { |
20 | 19 | vpcConfigureTooltip: function(args) { |
|
463 | 462 | }; |
464 | 463 |
|
465 | 464 | switch(actionID) { |
466 | | - case 'addVM': |
467 | | - action({ |
468 | | - context: context, |
469 | | - complete: function(args) { |
470 | | - var pendingVMs = $tier.data('vpc-tier-pending-vms'); |
471 | | - |
472 | | - pendingVMs = pendingVMs ? pendingVMs + 1 : 1; |
473 | | - $tier.addClass('loading'); |
474 | | - $tier.data('vpc-tier-pending-vms', pendingVMs); |
475 | | - success(args); |
476 | | - } |
477 | | - }); |
478 | | - break; |
479 | | - case 'remove': |
480 | | - $loading.appendTo($tier); |
481 | | - action({ |
482 | | - context: context, |
483 | | - response: { |
484 | | - success: function(args) { |
485 | | - success($.extend(args, { |
486 | | - remove: true |
487 | | - })); |
488 | | - } |
| 465 | + case 'addVM': |
| 466 | + action({ |
| 467 | + context: context, |
| 468 | + complete: function(args) { |
| 469 | + var pendingVMs = $tier.data('vpc-tier-pending-vms'); |
| 470 | + |
| 471 | + pendingVMs = pendingVMs ? pendingVMs + 1 : 1; |
| 472 | + $tier.addClass('loading'); |
| 473 | + $tier.data('vpc-tier-pending-vms', pendingVMs); |
| 474 | + success(args); |
| 475 | + } |
| 476 | + }); |
| 477 | + break; |
| 478 | + case 'remove': |
| 479 | + $loading.appendTo($tier); |
| 480 | + action({ |
| 481 | + context: context, |
| 482 | + response: { |
| 483 | + success: function(args) { |
| 484 | + success($.extend(args, { |
| 485 | + remove: true |
| 486 | + })); |
489 | 487 | } |
490 | | - }); |
491 | | - break; |
492 | | - case 'acl': |
| 488 | + } |
| 489 | + }); |
| 490 | + break; |
| 491 | + case 'acl': |
493 | 492 | // Show ACL dialog |
494 | 493 | $('<div>').multiEdit( |
495 | 494 | $.extend(true, {}, actionArgs.multiEdit, { |
|
508 | 507 | } |
509 | 508 | }).closest('.ui-dialog').overlay(); |
510 | 509 | break; |
511 | | - default: |
512 | | - $loading.appendTo($tier); |
513 | | - action({ |
514 | | - context: context, |
515 | | - complete: success, |
516 | | - response: { |
517 | | - success: success, |
518 | | - error: function(args) { $loading.remove(); } |
519 | | - } |
520 | | - }); |
| 510 | + default: |
| 511 | + $loading.appendTo($tier); |
| 512 | + action({ |
| 513 | + context: context, |
| 514 | + complete: success, |
| 515 | + response: { |
| 516 | + success: success, |
| 517 | + error: function(args) { $loading.remove(); } |
| 518 | + } |
| 519 | + }); |
521 | 520 | } |
522 | 521 | }; |
523 | 522 |
|
|
0 commit comments