+XOSTenantApp.editUsers = function(model) {\r
+ var app=this;\r
+ var detailView = new XOSEditUsersView({model: model, collection: xos.slicesPlus});\r
+ detailView.dialog = $("#tenant-edit-users-dialog");\r
+ app.tenantEditUsersInterior.show(detailView);\r
+ $("#tenant-edit-users-dialog").dialog({\r
+ autoOpen: false,
+ modal: true,
+ width: 640,
+ buttons : {
+ "Ok" : function() {
+ var editDialog = this;
+ user_ids = all_options($("#tenant-edit-users-dialog").find(".select-picker-to"));
+ user_ids = user_ids.map( function(x) { return parseInt(x,10); } );
+ if (!array_same_elements(user_ids, model.usersBuffer)) {
+ XOSTenantApp.setDirty(true);
+ }
+ model.usersBuffer = user_ids;
+ $(editDialog).dialog("close");
+ },
+ "Cancel" : function() {
+ $(this).dialog("close");
+ }
+ }
+ });
+ $("#tenant-edit-users-dialog").dialog("open");\r
+};\r
+\r
+XOSTenantApp.downloadSSHOld = function(model) {\r
+ sshCommands = "";\r
+ for (index in model.attributes.sliceInfo.sshCommands) {\r
+ sshCommand = model.attributes.sliceInfo.sshCommands[index];\r
+ sshCommands = sshCommands + sshCommand + "\n";\r
+ }\r
+\r
+ if (sshCommands.length == 0) {\r
+ alert("this slice has no instantiated slivers yet");\r
+ return;\r
+ }\r
+\r
+ var myWindow = window.open("", "ssh_command_list",""); // "width=640, height=480");\r
+ myWindow.document.write("<html><head><title>SSH Commands</title></head><body><pre>" + sshCommands + "</pre></body></html>");\r
+ myWindow.document.close();\r
+};\r
+\r
+XOSTenantApp.downloadSSH = function(model) {\r
+ sshCommands = "";\r
+ for (index in model.attributes.sliceInfo.sshCommands) {\r
+ sshCommand = model.attributes.sliceInfo.sshCommands[index];\r
+ sshCommands = sshCommands + sshCommand + "\n";\r
+ }\r
+\r
+ if (sshCommands.length == 0) {\r
+ alert("this slice has no instantiated slivers yet");\r
+ return;\r
+ }\r
+\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
+ autoOpen: false,
+ modal: true,
+ width: 640,
+ buttons : {
+ "Ok" : function() {
+ $(this).dialog("close");
+ },
+ }
+ });
+ $("#tenant-ssh-commands-dialog").dialog("open");\r
+};\r
+\r