From 3eb4a90294f4a605cb9a18666f1e6e656e9b86a8 Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Thu, 17 Jun 2010 16:28:33 -0400 Subject: [PATCH] GUI tweaks, flesh out help text --- HelpPanel.py | 30 +++++++++++++++++++++++++++--- LinkPanel.py | 1 + NodePanel.py | 2 +- PlanetLab.py | 2 +- SfaBrowser.py | 1 - SliverPanel.py | 1 + SubmitPanel.py | 1 + public/SfaGUI.css | 25 ++++++++++++++++++++----- 8 files changed, 52 insertions(+), 11 deletions(-) diff --git a/HelpPanel.py b/HelpPanel.py index 2237aed..e99ee0b 100644 --- a/HelpPanel.py +++ b/HelpPanel.py @@ -5,18 +5,42 @@ from pyjamas.ui import HasAlignment class HelpPanel(VerticalPanel): def __init__(self): VerticalPanel.__init__(self) - def refresh(self): pass class PlanetLabHelpPanel(HelpPanel): def __init__(self): HelpPanel.__init__(self) - self.add(HTML("This is the PlanetLab help panel")) + m = "
Steps to set up your slice:" + m += "
  1. Use the Nodes tab to select the nodes " + m += "on which your slice will run." + m += "
  2. Use the Slivers tab to configure sliver attributes." + m += "(Note that typical users have insufficient permission to " + m += "set most attributes.)" + m += "
  3. Under the Submit tab, click the Apply button " + m += "to submit your changes, or the Reset button to discard " + m += "them.

" + self.add(HTML(m)) class VINIHelpPanel(HelpPanel): def __init__(self): HelpPanel.__init__(self) - self.add(HTML("This is the VINI help panel")) + m = "
Steps to set up your slice:" + m += "
  1. Use the Nodes tab to select the nodes " + m += "on which your slice will run." + m += "
  2. Use the Links tab to create a virtual topology for " + m += "your slice, if desired. The virtual topology will be " + m += "computed automatically; virtual links can only be set up " + m += "between nodes that are adjacent in the network, and a virtual " + m += "link will be added between each pair of adjacent nodes. " + m += "You can remove any undesired virtual links or change " + m += "the bandwidth reserved to each link. " + m += "
  3. Use the Slivers tab to configure sliver attributes." + m += "(Note that typical users have insufficient permission to " + m += "set most attributes.)" + m += "
  4. Under the Submit tab, click the Apply button " + m += "to submit your changes, or the Reset button to discard " + m += "them.

" + self.add(HTML(m)) diff --git a/LinkPanel.py b/LinkPanel.py index cf54567..9c3a7d7 100644 --- a/LinkPanel.py +++ b/LinkPanel.py @@ -86,6 +86,7 @@ class LinkPanel(VerticalPanel): VerticalPanel.__init__(self) self.sfadata = sfadata self.defaultbw = 1000 + self.setStyleName("ks-layouts") self.refresh() def refresh(self): diff --git a/NodePanel.py b/NodePanel.py index 80a6bf4..3db55fb 100644 --- a/NodePanel.py +++ b/NodePanel.py @@ -23,7 +23,6 @@ class NodePanel(DockPanel): DockPanel.__init__(self) self.sfadata = sfadata - self.setSize("100%", "100%") self.setHorizontalAlignment(HasAlignment.ALIGN_CENTER) self.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE) self.availableRegex = None @@ -66,6 +65,7 @@ class NodePanel(DockPanel): self.add(rightpanel, DockPanel.EAST) self.add(vertpanel, DockPanel.CENTER) + self.setStyleName("ks-layouts") self.refresh() def refresh(self): diff --git a/PlanetLab.py b/PlanetLab.py index 027ae14..dc557fd 100644 --- a/PlanetLab.py +++ b/PlanetLab.py @@ -46,4 +46,4 @@ class PLC(Sink): self.initWidget(self.tabs) def init(): - return SinkInfo("PLC", "Specify PlanetLab Central Resources", PLC) + return SinkInfo("PlanetLab", "Specify PlanetLab Central Resources", PLC) diff --git a/SfaBrowser.py b/SfaBrowser.py index 30442e8..b2053e3 100644 --- a/SfaBrowser.py +++ b/SfaBrowser.py @@ -12,7 +12,6 @@ class PopupRecord(PopupPanel): PopupPanel.__init__(self, True) contents = HTML("
" + record + "
") self.setWidget(contents) - self.setStyleName("ks-popups-Popup") class SfaItem(TreeItem): diff --git a/SliverPanel.py b/SliverPanel.py index a4b2602..9b7502b 100644 --- a/SliverPanel.py +++ b/SliverPanel.py @@ -82,6 +82,7 @@ class SliverPanel(VerticalPanel): def __init__(self, sfadata): VerticalPanel.__init__(self) self.sfadata = sfadata + self.setStyleName("ks-layouts") self.refresh() def refresh(self): diff --git a/SubmitPanel.py b/SubmitPanel.py index 8fa8fa6..47d41df 100644 --- a/SubmitPanel.py +++ b/SubmitPanel.py @@ -26,6 +26,7 @@ class SubmitPanel(VerticalPanel): self.add(hp1) self.add(hp2) + self.setStyleName("ks-layouts") def refresh(self): pass diff --git a/public/SfaGUI.css b/public/SfaGUI.css index 9449ca0..c62461d 100644 --- a/public/SfaGUI.css +++ b/public/SfaGUI.css @@ -125,21 +125,32 @@ a:visited { } .gwt-TabBar .gwt-TabBarItem { - border-top: 1px solid #C3D9FF; + background-color: #d2d8e0; + border-top: 1px solid #87B3FF; + border-left: 1px solid #87B3FF; + border-right: 1px solid #87B3FF; border-bottom: 1px solid #87B3FF; padding: 2px; + padding-left: 8px; + padding-right: 8px; + margin-left: 1px; + margin-right: 1px; cursor: pointer; cursor: hand; } .gwt-TabBar .gwt-TabBarItem-selected { - font-weight: bold; background-color: #E8EEF7; + font-weight: bold; border-top: 1px solid #87B3FF; border-left: 1px solid #87B3FF; border-right: 1px solid #87B3FF; border-bottom: 1px solid #E8EEF7; padding: 2px; + padding-left: 8px; + padding-right: 8px; + margin-left: 1px; + margin-right: 1px; cursor: default; } @@ -150,6 +161,7 @@ a:visited { } .gwt-Tree { + padding: 8px; } .gwt-Tree .gwt-TreeItem { @@ -193,9 +205,10 @@ a:visited { } .ks-List .ks-SinkItem { + background-color: #d2d8e0; width: 100%; padding: 0.3em; - padding-right: 16px; + padding-right: 32px; cursor: pointer; cursor: hand; } @@ -215,7 +228,9 @@ a:visited { } .ks-layouts { - margin: 8px; + padding: 8px; + width: 100%; + height: 100%; } .ks-layouts-Label { @@ -240,7 +255,7 @@ a:visited { } .infoProse { - margin: 8px; + padding: 8px; } /****************************************************** -- 2.43.0