aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.Manager
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGridServices.Manager')
-rw-r--r--OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs9
-rw-r--r--OpenGridServices.Manager/OpenGridServices.Manager/Main.cs15
-rw-r--r--OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs5
-rw-r--r--OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs6
-rw-r--r--OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs2
-rw-r--r--OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic4
6 files changed, 36 insertions, 5 deletions
diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
index 8c933e1..afd9a69 100644
--- a/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
+++ b/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
@@ -2,12 +2,14 @@ using Nwc.XmlRpc;
2using System; 2using System;
3using System.Collections; 3using System.Collections;
4using System.Collections.Generic; 4using System.Collections.Generic;
5using libsecondlife;
5 6
6namespace OpenGridServices.Manager 7namespace OpenGridServices.Manager
7{ 8{
8 public class GridServerConnectionManager 9 public class GridServerConnectionManager
9 { 10 {
10 private string ServerURL; 11 private string ServerURL;
12 public LLUUID SessionID;
11 13
12 public bool Connect(string GridServerURL, string username, string password) 14 public bool Connect(string GridServerURL, string username, string password)
13 { 15 {
@@ -23,6 +25,8 @@ namespace OpenGridServices.Manager
23 if(GridResp.IsFault) { 25 if(GridResp.IsFault) {
24 return false; 26 return false;
25 } else { 27 } else {
28 Hashtable gridrespData = (Hashtable)GridResp.Value;
29 this.SessionID = new LLUUID((string)gridrespData["session_id"]);
26 return true; 30 return true;
27 } 31 }
28 } catch(Exception e) { 32 } catch(Exception e) {
@@ -30,5 +34,10 @@ namespace OpenGridServices.Manager
30 return false; 34 return false;
31 } 35 }
32 } 36 }
37
38 public bool RestartServer()
39 {
40 return true;
41 }
33 } 42 }
34} 43}
diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs b/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
index 0e3f74d..d5a9688 100644
--- a/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
+++ b/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
@@ -40,11 +40,24 @@ namespace OpenGridServices.Manager
40 case "connect_to_gridserver": 40 case "connect_to_gridserver":
41 win.SetStatus("Connecting to grid server..."); 41 win.SetStatus("Connecting to grid server...");
42 if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) { 42 if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) {
43 win.SetStatus("Connected OK"); 43 win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID);
44 Thread.Sleep(3000);
45 win.SetStatus("");
44 } else { 46 } else {
45 win.SetStatus("Could not connect"); 47 win.SetStatus("Could not connect");
46 } 48 }
47 break; 49 break;
50
51 case "restart_gridserver":
52 win.SetStatus("Restarting grid server...");
53 if(gridserverConn.RestartServer()) {
54 win.SetStatus("Restarted server OK");
55 Thread.Sleep(3000);
56 win.SetStatus("");
57 } else {
58 win.SetStatus("Error restarting grid server!!!");
59 }
60 break;
48 } 61 }
49 } 62 }
50 } 63 }
diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs b/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
index 5a22221..5cf4bc1 100644
--- a/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
+++ b/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
@@ -35,6 +35,11 @@ namespace OpenGridServices.Manager {
35 35
36 } 36 }
37 37
38 protected virtual void RestartGridserverMenu(object sender, System.EventArgs e)
39 {
40 MainClass.PendingOperations.Enqueue("restart_gridserver");
41 }
42
38 } 43 }
39} 44}
40 45
diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
index 0707b01..da6739e 100644
--- a/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
+++ b/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
@@ -45,6 +45,8 @@ namespace OpenGridServices.Manager {
45 this.Events = ((Gdk.EventMask)(256)); 45 this.Events = ((Gdk.EventMask)(256));
46 this.Name = "OpenGridServices.Manager.ConnectToGridServerDialog"; 46 this.Name = "OpenGridServices.Manager.ConnectToGridServerDialog";
47 this.Title = Mono.Unix.Catalog.GetString("Connect to Grid server"); 47 this.Title = Mono.Unix.Catalog.GetString("Connect to Grid server");
48 this.WindowPosition = ((Gtk.WindowPosition)(4));
49 this.HasSeparator = false;
48 // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.VBox 50 // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.VBox
49 Gtk.VBox w1 = this.VBox; 51 Gtk.VBox w1 = this.VBox;
50 w1.Events = ((Gdk.EventMask)(256)); 52 w1.Events = ((Gdk.EventMask)(256));
@@ -166,7 +168,7 @@ namespace OpenGridServices.Manager {
166 w15.Spacing = 2; 168 w15.Spacing = 2;
167 // Container child GtkHBox.Gtk.Container+ContainerChild 169 // Container child GtkHBox.Gtk.Container+ContainerChild
168 Gtk.Image w16 = new Gtk.Image(); 170 Gtk.Image w16 = new Gtk.Image();
169 w16.Name = "image39"; 171 w16.Name = "image1";
170 w16.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-apply", 16, 0); 172 w16.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-apply", 16, 0);
171 w15.Add(w16); 173 w15.Add(w16);
172 // Container child GtkHBox.Gtk.Container+ContainerChild 174 // Container child GtkHBox.Gtk.Container+ContainerChild
@@ -196,7 +198,7 @@ namespace OpenGridServices.Manager {
196 w24.Spacing = 2; 198 w24.Spacing = 2;
197 // Container child GtkHBox1.Gtk.Container+ContainerChild 199 // Container child GtkHBox1.Gtk.Container+ContainerChild
198 Gtk.Image w25 = new Gtk.Image(); 200 Gtk.Image w25 = new Gtk.Image();
199 w25.Name = "image40"; 201 w25.Name = "image2";
200 w25.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-cancel", 16, 0); 202 w25.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-cancel", 16, 0);
201 w24.Add(w25); 203 w24.Add(w25);
202 // Container child GtkHBox1.Gtk.Container+ContainerChild 204 // Container child GtkHBox1.Gtk.Container+ContainerChild
diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
index 4047dec..c565b9b 100644
--- a/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
+++ b/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
@@ -202,7 +202,6 @@ namespace OpenGridServices.Manager {
202 this.Name = "OpenGridServices.Manager.MainWindow"; 202 this.Name = "OpenGridServices.Manager.MainWindow";
203 this.Title = Mono.Unix.Catalog.GetString("Open Grid Services Manager"); 203 this.Title = Mono.Unix.Catalog.GetString("Open Grid Services Manager");
204 this.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-network", 48, 0); 204 this.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-network", 48, 0);
205 this.WindowPosition = ((Gtk.WindowPosition)(0));
206 // Container child OpenGridServices.Manager.MainWindow.Gtk.Container+ContainerChild 205 // Container child OpenGridServices.Manager.MainWindow.Gtk.Container+ContainerChild
207 this.vbox1 = new Gtk.VBox(); 206 this.vbox1 = new Gtk.VBox();
208 this.vbox1.Name = "vbox1"; 207 this.vbox1.Name = "vbox1";
@@ -354,6 +353,7 @@ namespace OpenGridServices.Manager {
354 this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent); 353 this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
355 this.ConnectToGridserver.Activated += new System.EventHandler(this.ConnectToGridServerMenu); 354 this.ConnectToGridserver.Activated += new System.EventHandler(this.ConnectToGridServerMenu);
356 this.ExitGridManager.Activated += new System.EventHandler(this.QuitMenu); 355 this.ExitGridManager.Activated += new System.EventHandler(this.QuitMenu);
356 this.RestartGridserverOnly.Activated += new System.EventHandler(this.RestartGridserverMenu);
357 } 357 }
358 } 358 }
359} 359}
diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic b/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
index 12674c3..2e04efa 100644
--- a/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
+++ b/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
@@ -105,6 +105,7 @@
105 <property name="Label" translatable="yes">Restart gridserver only</property> 105 <property name="Label" translatable="yes">Restart gridserver only</property>
106 <property name="ShortLabel" translatable="yes">Restart gridserver only</property> 106 <property name="ShortLabel" translatable="yes">Restart gridserver only</property>
107 <property name="StockId">gtk-refresh</property> 107 <property name="StockId">gtk-refresh</property>
108 <signal name="Activated" handler="RestartGridserverMenu" after="yes" />
108 </action> 109 </action>
109 <action id="DefaultLocalGridUserserver"> 110 <action id="DefaultLocalGridUserserver">
110 <property name="Type">Action</property> 111 <property name="Type">Action</property>
@@ -169,7 +170,6 @@
169 <property name="HeightRequest">600</property> 170 <property name="HeightRequest">600</property>
170 <property name="Title" translatable="yes">Open Grid Services Manager</property> 171 <property name="Title" translatable="yes">Open Grid Services Manager</property>
171 <property name="Icon">stock:gtk-network Dialog</property> 172 <property name="Icon">stock:gtk-network Dialog</property>
172 <property name="WindowPosition">None</property>
173 <signal name="DeleteEvent" handler="OnDeleteEvent" /> 173 <signal name="DeleteEvent" handler="OnDeleteEvent" />
174 <child> 174 <child>
175 <widget class="Gtk.VBox" id="vbox1"> 175 <widget class="Gtk.VBox" id="vbox1">
@@ -467,8 +467,10 @@
467 <property name="MemberName" /> 467 <property name="MemberName" />
468 <property name="Events">ButtonPressMask</property> 468 <property name="Events">ButtonPressMask</property>
469 <property name="Title" translatable="yes">Connect to Grid server</property> 469 <property name="Title" translatable="yes">Connect to Grid server</property>
470 <property name="WindowPosition">CenterOnParent</property>
470 <property name="Buttons">2</property> 471 <property name="Buttons">2</property>
471 <property name="HelpButton">False</property> 472 <property name="HelpButton">False</property>
473 <property name="HasSeparator">False</property>
472 <signal name="Response" handler="OnResponse" /> 474 <signal name="Response" handler="OnResponse" />
473 <child internal-child="VBox"> 475 <child internal-child="VBox">
474 <widget class="Gtk.VBox" id="dialog_VBox"> 476 <widget class="Gtk.VBox" id="dialog_VBox">