Revision 198b546d snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js

b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js
1
// Copyright 2011 GRNET S.A. All rights reserved.
1
// Copyright 2014 GRNET S.A. All rights reserved.
2 2
// 
3 3
// Redistribution and use in source and binary forms, with or
4 4
// without modification, are permitted provided that the following
......
53 53
    var debug = _.bind(logger.debug, logger);
54 54
    
55 55
    var hasKey = Object.prototype.hasOwnProperty;
56

  
56
    
57 57
    // base class for views that contain/handle VMS
58 58
    views.VMListView = views.View.extend({
59 59

  
......
397 397
            }
398 398
        },
399 399
        
400
        show_reassign_view: function(vm) {
401
          synnefo.ui.main.vm_reassign_view.show(vm);
402
        },
403

  
400 404
        show_indicator: function(vm, action) {
401 405
            var action = action || vm.pending_action;
402 406
            this.sel('vm_wave', vm.id).hide();
......
654 658
                // action links click events
655 659
                $(this.el).find(".action-container."+action+" a").click(function(ev) {
656 660
                    ev.preventDefault();
657
                    if (action == "start" && !self.vm.can_start() && !vm.in_error_state()) {
661
                    if (
662
                      action == "start" && 
663
                      !self.vm.can_start() && 
664
                      !vm.in_error_state()) {
658 665
                        ui.main.vm_resize_view.show_with_warning(self.vm);
659 666
                        return;
660 667
                    }
661 668

  
662 669
                    if (action == "resize") {
663
                        ui.main.vm_resize_view.show(self.vm);
664
                        return;
670
                      ui.main.vm_resize_view.show(self.vm);
671
                      return;
672
                    } else if (action == "reassign") {
673
                      ui.main.vm_reassign_view.show(self.vm);
674
                      return;
665 675
                    } else {
666 676
                        self.set(action);
667 677
                    }

Also available in: Unified diff