aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/Manager
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/Manager')
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs3
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs28
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs32
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs2
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs27
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs49
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs26
7 files changed, 73 insertions, 94 deletions
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
index b6b2b64..210e195 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
@@ -39,7 +39,8 @@ namespace OpenGridServices.Manager
39 39
40 protected virtual void OnResponse(object o, Gtk.ResponseArgs args) 40 protected virtual void OnResponse(object o, Gtk.ResponseArgs args)
41 { 41 {
42 switch (args.ResponseId) { 42 switch (args.ResponseId)
43 {
43 case Gtk.ResponseType.Ok: 44 case Gtk.ResponseType.Ok:
44 MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text); 45 MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text);
45 break; 46 break;
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
index a386fa8..cf44ac2 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
@@ -46,7 +46,8 @@ namespace OpenGridServices.Manager
46 46
47 public bool Connect(string GridServerURL, string username, string password) 47 public bool Connect(string GridServerURL, string username, string password)
48 { 48 {
49 try { 49 try
50 {
50 this.ServerURL=GridServerURL; 51 this.ServerURL=GridServerURL;
51 Hashtable LoginParamsHT = new Hashtable(); 52 Hashtable LoginParamsHT = new Hashtable();
52 LoginParamsHT["username"]=username; 53 LoginParamsHT["username"]=username;
@@ -55,16 +56,21 @@ namespace OpenGridServices.Manager
55 LoginParams.Add(LoginParamsHT); 56 LoginParams.Add(LoginParamsHT);
56 XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams); 57 XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams);
57 XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000); 58 XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000);
58 if (GridResp.IsFault) { 59 if (GridResp.IsFault)
60 {
59 connected=false; 61 connected=false;
60 return false; 62 return false;
61 } else { 63 }
64 else
65 {
62 Hashtable gridrespData = (Hashtable)GridResp.Value; 66 Hashtable gridrespData = (Hashtable)GridResp.Value;
63 this.SessionID = new LLUUID((string)gridrespData["session_id"]); 67 this.SessionID = new LLUUID((string)gridrespData["session_id"]);
64 connected=true; 68 connected=true;
65 return true; 69 return true;
66 } 70 }
67 } catch(Exception e) { 71 }
72 catch(Exception e)
73 {
68 Console.WriteLine(e.ToString()); 74 Console.WriteLine(e.ToString());
69 connected=false; 75 connected=false;
70 return false; 76 return false;
@@ -107,20 +113,26 @@ namespace OpenGridServices.Manager
107 113
108 public bool ShutdownServer() 114 public bool ShutdownServer()
109 { 115 {
110 try { 116 try
117 {
111 Hashtable ShutdownParamsHT = new Hashtable(); 118 Hashtable ShutdownParamsHT = new Hashtable();
112 ArrayList ShutdownParams = new ArrayList(); 119 ArrayList ShutdownParams = new ArrayList();
113 ShutdownParamsHT["session_id"]=this.SessionID.ToString(); 120 ShutdownParamsHT["session_id"]=this.SessionID.ToString();
114 ShutdownParams.Add(ShutdownParamsHT); 121 ShutdownParams.Add(ShutdownParamsHT);
115 XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams); 122 XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams);
116 XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL, 3000); 123 XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL, 3000);
117 if (GridResp.IsFault) { 124 if (GridResp.IsFault)
125 {
118 return false; 126 return false;
119 } else { 127 }
128 else
129 {
120 connected=false; 130 connected=false;
121 return true; 131 return true;
122 } 132 }
123 } catch(Exception e) { 133 }
134 catch(Exception e)
135 {
124 Console.WriteLine(e.ToString()); 136 Console.WriteLine(e.ToString());
125 return false; 137 return false;
126 } 138 }
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs
index 6b7a5ab..7700229 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs
@@ -62,47 +62,57 @@ namespace OpenGridServices.Manager
62 operation=PendingOperations.Dequeue(); 62 operation=PendingOperations.Dequeue();
63 Console.WriteLine(operation); 63 Console.WriteLine(operation);
64 cmd = operation.Split(sep)[0]; 64 cmd = operation.Split(sep)[0];
65 switch (cmd) { 65 switch (cmd)
66 {
66 case "connect_to_gridserver": 67 case "connect_to_gridserver":
67 win.SetStatus("Connecting to grid server..."); 68 win.SetStatus("Connecting to grid server...");
68 if (gridserverConn.Connect(operation.Split(sep)[1], operation.Split(sep)[2], operation.Split(sep)[3])) { 69 if (gridserverConn.Connect(operation.Split(sep)[1], operation.Split(sep)[2], operation.Split(sep)[3]))
70 {
69 win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID); 71 win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID);
70 win.SetGridServerConnected(true); 72 win.SetGridServerConnected(true);
71 Thread.Sleep(3000); 73 Thread.Sleep(3000);
72 win.SetStatus("Downloading region maps..."); 74 win.SetStatus("Downloading region maps...");
73 gridserverConn.DownloadMap(); 75 gridserverConn.DownloadMap();
74 } else { 76 }
77 else
78 {
75 win.SetStatus("Could not connect"); 79 win.SetStatus("Could not connect");
76 } 80 }
77 break; 81 break;
78 82
79 case "restart_gridserver": 83 case "restart_gridserver":
80 win.SetStatus("Restarting grid server..."); 84 win.SetStatus("Restarting grid server...");
81 if (gridserverConn.RestartServer()) { 85 if (gridserverConn.RestartServer())
86 {
82 win.SetStatus("Restarted server OK"); 87 win.SetStatus("Restarted server OK");
83 Thread.Sleep(3000); 88 Thread.Sleep(3000);
84 win.SetStatus(""); 89 win.SetStatus("");
85 } else { 90 }
91 else
92 {
86 win.SetStatus("Error restarting grid server!!!"); 93 win.SetStatus("Error restarting grid server!!!");
87 } 94 }
88 break; 95 break;
89 96
90 case "shutdown_gridserver": 97 case "shutdown_gridserver":
91 win.SetStatus("Shutting down grid server..."); 98 win.SetStatus("Shutting down grid server...");
92 if (gridserverConn.ShutdownServer()) { 99 if (gridserverConn.ShutdownServer())
100 {
93 win.SetStatus("Grid server shutdown"); 101 win.SetStatus("Grid server shutdown");
94 win.SetGridServerConnected(false); 102 win.SetGridServerConnected(false);
95 Thread.Sleep(3000); 103 Thread.Sleep(3000);
96 win.SetStatus(""); 104 win.SetStatus("");
97 } else { 105 }
106 else
107 {
98 win.SetStatus("Could not shutdown grid server!!!"); 108 win.SetStatus("Could not shutdown grid server!!!");
99 } 109 }
100 break; 110 break;
101 111
102 case "disconnect_gridserver": 112 case "disconnect_gridserver":
103 gridserverConn.DisconnectServer(); 113 gridserverConn.DisconnectServer();
104 win.SetGridServerConnected(false); 114 win.SetGridServerConnected(false);
105 break; 115 break;
106 } 116 }
107 } 117 }
108 } 118 }
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
index fcc5574..aff4719 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Utilities
55 public static uint GetNextXferID() 55 public static uint GetNextXferID()
56 { 56 {
57 uint id = 0; 57 uint id = 0;
58 lock(XferLock) 58 lock (XferLock)
59 { 59 {
60 id = nextXferID; 60 id = nextXferID;
61 nextXferID++; 61 nextXferID++;
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
index d082a3b..a5a4ec8 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
@@ -35,38 +35,26 @@
35// </autogenerated> 35// </autogenerated>
36// ------------------------------------------------------------------------------ 36// ------------------------------------------------------------------------------
37 37
38namespace OpenGridServices.Manager { 38namespace OpenGridServices.Manager
39 39{
40 40 public partial class ConnectToGridServerDialog
41 public partial class ConnectToGridServerDialog { 41 {
42
43 private Gtk.VBox vbox2; 42 private Gtk.VBox vbox2;
44
45 private Gtk.VBox vbox3; 43 private Gtk.VBox vbox3;
46
47 private Gtk.HBox hbox1; 44 private Gtk.HBox hbox1;
48
49 private Gtk.Label label1; 45 private Gtk.Label label1;
50
51 private Gtk.Entry entry1; 46 private Gtk.Entry entry1;
52
53 private Gtk.HBox hbox2; 47 private Gtk.HBox hbox2;
54
55 private Gtk.Label label2; 48 private Gtk.Label label2;
56
57 private Gtk.Entry entry2; 49 private Gtk.Entry entry2;
58
59 private Gtk.HBox hbox3; 50 private Gtk.HBox hbox3;
60
61 private Gtk.Label label3; 51 private Gtk.Label label3;
62
63 private Gtk.Entry entry3; 52 private Gtk.Entry entry3;
64
65 private Gtk.Button button2; 53 private Gtk.Button button2;
66
67 private Gtk.Button button8; 54 private Gtk.Button button8;
68 55
69 protected virtual void Build() { 56 protected virtual void Build()
57 {
70 Stetic.Gui.Initialize(); 58 Stetic.Gui.Initialize();
71 // Widget OpenGridServices.Manager.ConnectToGridServerDialog 59 // Widget OpenGridServices.Manager.ConnectToGridServerDialog
72 this.Events = ((Gdk.EventMask)(256)); 60 this.Events = ((Gdk.EventMask)(256));
@@ -241,7 +229,8 @@ namespace OpenGridServices.Manager {
241 w31.Position = 1; 229 w31.Position = 1;
242 w31.Expand = false; 230 w31.Expand = false;
243 w31.Fill = false; 231 w31.Fill = false;
244 if ((this.Child != null)) { 232 if (this.Child != null)
233 {
245 this.Child.ShowAll(); 234 this.Child.ShowAll();
246 } 235 }
247 this.DefaultWidth = 476; 236 this.DefaultWidth = 476;
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
index 9d3cdaf..9707aee 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
@@ -35,82 +35,48 @@
35// </autogenerated> 35// </autogenerated>
36// ------------------------------------------------------------------------------ 36// ------------------------------------------------------------------------------
37 37
38namespace OpenGridServices.Manager { 38namespace OpenGridServices.Manager
39 39{
40 40 public partial class MainWindow
41 public partial class MainWindow { 41 {
42
43 private Gtk.Action Grid; 42 private Gtk.Action Grid;
44
45 private Gtk.Action User; 43 private Gtk.Action User;
46
47 private Gtk.Action Asset; 44 private Gtk.Action Asset;
48
49 private Gtk.Action Region; 45 private Gtk.Action Region;
50
51 private Gtk.Action Services; 46 private Gtk.Action Services;
52
53 private Gtk.Action ConnectToGridserver; 47 private Gtk.Action ConnectToGridserver;
54
55 private Gtk.Action RestartWholeGrid; 48 private Gtk.Action RestartWholeGrid;
56
57 private Gtk.Action ShutdownWholeGrid; 49 private Gtk.Action ShutdownWholeGrid;
58
59 private Gtk.Action ExitGridManager; 50 private Gtk.Action ExitGridManager;
60
61 private Gtk.Action ConnectToUserserver; 51 private Gtk.Action ConnectToUserserver;
62
63 private Gtk.Action AccountManagment; 52 private Gtk.Action AccountManagment;
64
65 private Gtk.Action GlobalNotice; 53 private Gtk.Action GlobalNotice;
66
67 private Gtk.Action DisableAllLogins; 54 private Gtk.Action DisableAllLogins;
68
69 private Gtk.Action DisableNonGodUsersOnly; 55 private Gtk.Action DisableNonGodUsersOnly;
70
71 private Gtk.Action ShutdownUserServer; 56 private Gtk.Action ShutdownUserServer;
72
73 private Gtk.Action ShutdownGridserverOnly; 57 private Gtk.Action ShutdownGridserverOnly;
74
75 private Gtk.Action RestartGridserverOnly; 58 private Gtk.Action RestartGridserverOnly;
76
77 private Gtk.Action DefaultLocalGridUserserver; 59 private Gtk.Action DefaultLocalGridUserserver;
78
79 private Gtk.Action CustomUserserver; 60 private Gtk.Action CustomUserserver;
80
81 private Gtk.Action RemoteGridDefaultUserserver; 61 private Gtk.Action RemoteGridDefaultUserserver;
82
83 private Gtk.Action DisconnectFromGridServer; 62 private Gtk.Action DisconnectFromGridServer;
84
85 private Gtk.Action UploadAsset; 63 private Gtk.Action UploadAsset;
86
87 private Gtk.Action AssetManagement; 64 private Gtk.Action AssetManagement;
88
89 private Gtk.Action ConnectToAssetServer; 65 private Gtk.Action ConnectToAssetServer;
90
91 private Gtk.Action ConnectToDefaultAssetServerForGrid; 66 private Gtk.Action ConnectToDefaultAssetServerForGrid;
92
93 private Gtk.Action DefaultForLocalGrid; 67 private Gtk.Action DefaultForLocalGrid;
94
95 private Gtk.Action DefaultForRemoteGrid; 68 private Gtk.Action DefaultForRemoteGrid;
96
97 private Gtk.Action CustomAssetServer; 69 private Gtk.Action CustomAssetServer;
98
99 private Gtk.VBox vbox1; 70 private Gtk.VBox vbox1;
100
101 private Gtk.MenuBar menubar2; 71 private Gtk.MenuBar menubar2;
102
103 private Gtk.HBox hbox1; 72 private Gtk.HBox hbox1;
104
105 private Gtk.ScrolledWindow scrolledwindow1; 73 private Gtk.ScrolledWindow scrolledwindow1;
106
107 private Gtk.DrawingArea drawingarea1; 74 private Gtk.DrawingArea drawingarea1;
108
109 private Gtk.TreeView treeview1; 75 private Gtk.TreeView treeview1;
110
111 private Gtk.Statusbar statusbar1; 76 private Gtk.Statusbar statusbar1;
112 77
113 protected virtual void Build() { 78 protected virtual void Build()
79 {
114 Stetic.Gui.Initialize(); 80 Stetic.Gui.Initialize();
115 // Widget OpenGridServices.Manager.MainWindow 81 // Widget OpenGridServices.Manager.MainWindow
116 Gtk.UIManager w1 = new Gtk.UIManager(); 82 Gtk.UIManager w1 = new Gtk.UIManager();
@@ -266,7 +232,8 @@ namespace OpenGridServices.Manager {
266 w10.Expand = false; 232 w10.Expand = false;
267 w10.Fill = false; 233 w10.Fill = false;
268 this.Add(this.vbox1); 234 this.Add(this.vbox1);
269 if ((this.Child != null)) { 235 if (this.Child != null)
236 {
270 this.Child.ShowAll(); 237 this.Child.ShowAll();
271 } 238 }
272 this.DefaultWidth = 800; 239 this.DefaultWidth = 800;
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs
index b297b16..46dec05 100644
--- a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs
@@ -35,27 +35,27 @@
35// </autogenerated> 35// </autogenerated>
36// ------------------------------------------------------------------------------ 36// ------------------------------------------------------------------------------
37 37
38namespace Stetic { 38namespace Stetic
39 39{
40 40 internal class Gui
41 internal class Gui { 41 {
42
43 private static bool initialized; 42 private static bool initialized;
44 43
45 internal static void Initialize() { 44 internal static void Initialize()
46 if ((Stetic.Gui.initialized == false)) { 45 {
47 Stetic.Gui.initialized = true; 46 Stetic.Gui.initialized = true;
48 }
49 } 47 }
50 } 48 }
51 49
52 internal class ActionGroups { 50 internal class ActionGroups
53 51 {
54 public static Gtk.ActionGroup GetActionGroup(System.Type type) { 52 public static Gtk.ActionGroup GetActionGroup(System.Type type)
53 {
55 return Stetic.ActionGroups.GetActionGroup(type.FullName); 54 return Stetic.ActionGroups.GetActionGroup(type.FullName);
56 } 55 }
57 56
58 public static Gtk.ActionGroup GetActionGroup(string name) { 57 public static Gtk.ActionGroup GetActionGroup(string name)
58 {
59 return null; 59 return null;
60 } 60 }
61 } 61 }