Revision f8aa9fc3

b/snf-cyclades-app/synnefo/ui/static/snf/css/main.css
6705 6705
}
6706 6706

  
6707 6707
.collection span.no-available {
6708
  float: right;
6709 6708
}
6710 6709

  
6711 6710
.collection .no-available {
......
7306 7305
  color: #fff;
7307 7306
}
7308 7307

  
7308
.steps-container .floating-ips .collection {
7309
}
7310

  
7309 7311
.items-list.floating-ips {
7310 7312
  margin-top: -5px;
7311 7313
}
b/snf-cyclades-app/synnefo/ui/static/snf/js/neutron.js
345 345
            return attachment.firewallProfile
346 346
          } 
347 347
        ],
348
        
348
        'ext_status': [
349
          ['status'], function() {
350
            if (_.contains(["DISCONNECTING"], this.get('ext_status'))) {
351
              return this.get("ext_status")
352
            }
353
            return this.get("status")
354
          }
355
        ],
356
        'in_progress': [
357
          ['ext_status'], function() {
358
            return _.contains(["DISCONNECTING", "CONNECTING"], this.get("status"))
359
          }
360
        ],
349 361
        'firewall_running': [
350 362
          ['firewall_status', 'pending_firewall'], function(status, pending) {
351 363
              var pending = this.get('pending_firewall');
......
376 388
        var network = this.get('network');
377 389
        network.pending_disconnects++;
378 390
        network.update_connecting_status();
379
        this.destroy({complete: cb, silent: true});
391
        var complete = _.bind(function() {
392
          this.set({'status': 'DISCONNECTING'});
393
          cb();
394
        }, this);
395
        this.destroy({complete: complete, silent: true});
380 396
      }
381 397
    });
382 398

  
......
417 433
          return status_ok
418 434
        }],
419 435
        'disconnect': [['status'], function() {
420
          var status_ok = _.contains(['CONNECTED'], this.get('status'))
436
          var status_ok = _.contains(['ACTIVE', 'CONNECTED'], this.get('status'))
421 437
          return status_ok
422 438
        }]
423 439
      },
424 440

  
425 441
      proxy_attrs: {
442
        'ext_status': [
443
          ['status'], function() {
444
           if (_.contains(["DISCONNECTING"], this.get("ext_status"))) {
445
            return this.get("ext_status")
446
           }
447
           return this.get("status")
448
        }],
426 449
        'ip': [
427 450
          ['floating_ip_adress'], function() {
428 451
            return this.get('floating_ip_address'); 
......
439 462
          ['port_id', 'port'], function() {
440 463
            var val = this.get('port_id');
441 464
            if (!val) {
442
              return 'DISCONNECTED'
465
                return 'DISCONNECTED'
443 466
            } else {
444 467
              if (this.get('port')) {
445 468
                return 'CONNECTED'
......
452 475
      },
453 476

  
454 477
      disconnect: function(cb) {
455
        var self = this;
456
        var complete = function() {
457
          self.set({status: 'DISCONNECTING'});
458
          cb();
459
        }
460 478
        this.get('port').disconnect(cb);
461 479
      }
462 480
    });
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_ips_view.js
71 71
    views.IpView = views.ext.ModelView.extend({
72 72
      status_map: {
73 73
        'CONNECTED': 'Connected',
74
        'ACTIVE': 'Connected',
74 75
        'CONNECTING': 'Connecting',
75 76
        'DISCONNECTING': 'Disconnecting',
76 77
        'DOWN': 'Down',
77 78
        'DISCONNECTED': 'Not connected',
78
        'ACTIVE': 'Active',
79 79
        'REMOVING': 'Destroying'
80 80
      },
81 81

  
82 82
      status_cls_map: {
83 83
        'CONNECTED': 'status-active',
84
        'ACTIVE': 'status-active',
84 85
        'CONNECTING': 'status-active',
85 86
        'DISCONNECTING': 'status-inactive',
86 87
        'DOWN': 'status-inactive',
......
114 115
      },
115 116

  
116 117
      disconnect_complete: function() {
118
        this.model.set({status: 'DISCONNECTING'})
117 119
      },
118 120

  
119 121
      connect_vm: function(vms) {
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_networks_view.js
903 903
          // available quota
904 904
          create.removeClass("no-available");
905 905
          create.show();
906
          //create_link.show();
906
          create_link.show();
907 907
          create_no_available.hide();
908 908
        } else {
909 909
          // no available quota
910 910
          create.addClass("no-available");
911 911
          create.show();
912
          //create_link.hide();
912
          create_link.hide();
913 913
          create_no_available.show();
914 914
        }
915 915
        //
b/snf-cyclades-app/synnefo/ui/templates/partials/ips.html
31 31
          </div>
32 32
        </div>
33 33
        <div class="entry-right">
34
          <div data-rv-class="model.status|status_cls" class="status">
34
          <div data-rv-class="model.ext_status|status_cls" class="status">
35 35
            <div class="status-title">
36
              <span data-rv-text="model.status|status_display">Active</span>
36
              <span data-rv-text="model.ext_status|status_display">Active</span>
37 37
              <span data-rv-show="model.in_progress">...</span>
38 38
            </div>
39 39
            <div class="status-indicator clearfix">
b/snf-cyclades-app/synnefo/ui/templates/partials/networks.html
96 96
      <h5 class="title" data-rv-text="model.vm.name"></h5>
97 97
      <h5 class="subtitle" data-rv-text="model.mac_address"></h5>
98 98
      <div data-rv-show="model.network.is_public" class="firewall">
99
        <img data-rv-show="model.in_progress" 
100
             src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif" 
101
             class="progress-indicator" />
99 102
        <img data-rv-show="model.firewall_running" 
100 103
             src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif" 
101 104
             class="progress-indicator" />

Also available in: Unified diff