Browse Source

Merge "Network topology "Graph" tab always shows nothing"

Zuul 1 year ago
parent
commit
c2b5c642ee
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      openstack_dashboard/static/js/horizon.networktopology.js

+ 7
- 6
openstack_dashboard/static/js/horizon.networktopology.js View File

@@ -145,12 +145,6 @@ horizon.network_topology = {
145 145
     // set up loader first thing
146 146
     self.$loading_template.show();
147 147
 
148
-    if (self.data.networks.length === undefined) {
149
-      $('.loader-inline').remove();
150
-      $(self.svg_container).addClass('noinfo');
151
-      return;
152
-    }
153
-
154 148
     self.create_vis();
155 149
     self.force_direction(0.05,70,-700);
156 150
     if(horizon.networktopologyloader.model !== null) {
@@ -165,6 +159,13 @@ horizon.network_topology = {
165 159
 
166 160
     angular.element('#networktopology').on('change', function() {
167 161
       self.retrieve_network_info(true);
162
+      if(angular.equals(self.data.networks,{}) && angular.equals(self.data.routers,{}) &&
163
+         angular.equals(self.data.servers,{})){
164
+        $('.loader-inline').remove();
165
+        angular.element('#topologyCanvasContainer').find('svg').remove();
166
+        $(self.svg_container).addClass('noinfo');
167
+        return;
168
+      }
168 169
     });
169 170
 
170 171
     // register for message notifications

Loading…
Cancel
Save