tenant view only shows sites the user should be able to see
[plstackapi.git] / planetstack / core / xoslib / static / js / xosTenant.js
index 07762ed..0182f9f 100644 (file)
@@ -137,6 +137,9 @@ XOSTenantApp.buildViews = function() {
                                                 app: XOSTenantApp,\r
                                                 detailFields: ["serviceClass", "default_image", "default_flavor", "network_ports", "mount_data_sets"],\r
                                                 fieldDisplayNames: {serviceClass: "Service Level", "default_flavor": "Flavor", "default_image": "Image", "mount_data_sets": "Data Sets"},\r
+                                                helpText: {"serviceClass": "Existing slivers will be re-instantiated if changed",\r
+                                                           "default_image": "Existing slivers will be re-instantiated if changed",\r
+                                                           "default_flavor": "Existing slivers will be re-instantiated if changed"},\r
 \r
                                                 onShow: function() {\r
                                                     // the slice selector is in a different table, so make every label cell the maximal width\r
@@ -175,6 +178,9 @@ XOSTenantApp.buildViews = function() {
          sliceChanged: function(id) {\r
              XOSTenantApp.navToSlice(id);\r
          },\r
+         filter: function(slice) {\r
+             return slice.attributes.current_user_can_see;\r
+         },\r
      });\r
 \r
      xos.sites.fetch();\r
@@ -304,7 +310,7 @@ XOSTenantApp.downloadSSH = function(model) {
          return;\r
     }\r
 \r
-    var htmlView = new HTMLView({html: "<pre>" + sshCommands + "</pre>"});\r
+    var htmlView = new HTMLView({html: '<pre style="overflow: auto; word-wrap: normal; white-space: pre; word-wrap: normal;">' + sshCommands + '</pre>'});\r
     XOSTenantApp.tenantSSHCommandsInterior.show(htmlView);\r
 \r
     $("#tenant-ssh-commands-dialog").dialog({\r