Added help screen
[sface.git] / sface / screens / helpscreen.py
diff --git a/sface/screens/helpscreen.py b/sface/screens/helpscreen.py
new file mode 100644 (file)
index 0000000..662deab
--- /dev/null
@@ -0,0 +1,75 @@
+
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+from sface.screens.sfascreen import SfaScreen
+
+class HelpWidget(QWidget):
+    def __init__(self, parent):
+        QWidget.__init__(self, parent)
+        self.showHelpText()
+
+    def showHelpText(self):
+        layout = QVBoxLayout(self)
+        layout.setAlignment(Qt.AlignTop)
+
+        text = QLabel(self)
+        text.setWordWrap(True)
+        text.setOpenExternalLinks(True)
+        text.setText("""
+<p>The <em>PlanetLab Federation</em> is a collection of testbeds that
+have joined forces using the <em>Slice Federation Architecture</em>
+(SFA).</p>
+
+<p>This GUI allows users of OneLab and PlanetLab to allocate resources
+belonging to any federated testbed to an existing slice.  To use it,
+follow these steps:</p>
+
+<ol>
+
+<li>Go to the <b>Configure</b> screen and configure your slice, user,
+and user authority HRNs.</li>
+
+<li>Go to the <b>Main Window</b> and click <b>Update Slice
+Data</b>. This will load the set of resources currently allocated to
+your slice, and group them by testbeds.  Expand the entry for a
+particular testbed to see the resources allocated there.</li>
+
+<li>To modify the resources allocated to your slice:
+
+  <ul>
+  
+  <li>Double click a node to toggle its status.</li>
+  
+  <li>Expand a node to see the tags assigned to that node. Right click
+  on the node to add a new tag. Double click on a tag to toggle its
+  status.</li>
+  
+  <li>The first entry for each testbed begins with <em>Default
+  tags</em>.  Expand this to see the set of tags that applies to all
+  nodes in the testbed.  Right click on it to add a new default
+  tag.  Double click on a tag to toggle its status.</li>
+  
+  </ul>
+  
+</li>
+
+<li>After you have made your changes, click <b>Submit</b>.  This will
+submit your changes and then refresh the set of slice resources to
+reflect the current allocation.  No changes are made to your slice
+allocation until you click <b>Submit</b>.</li>
+
+</ol>
+
+<p>This GUI was built by the OneLab and PlanetLab teams.  Please send
+feedback on its usefulness to <a href="mailto:support@planet-lab.org">support@planet-lab.org</a></p>
+""")
+        text.setTextFormat(Qt.RichText)
+        layout.addWidget(text)
+
+class HelpScreen(SfaScreen):
+    def __init__(self, parent):
+        SfaScreen.__init__(self, parent)
+
+        widget = HelpWidget(self)
+        self.init(widget, "Help", "How to use the OneLab Federation GUI")