50407c7a4c342ffdf28fb802e635bfd32eec4468
[sfa-gui.git] / PlanetLab.py
1 from Sink import Sink, SinkInfo
2 from pyjamas.ui.VerticalPanel import VerticalPanel
3 from pyjamas.ui.TextArea import TextArea
4 from pyjamas.ui.HTML import HTML
5 from SfaData import PlanetLabData
6
7 class PlanetLab(Sink):
8     def __init__(self):
9
10         Sink.__init__(self)
11         self.panel = VerticalPanel()
12         self.panel.setSize("100%", "100%")
13         self.data = PlanetLabData()
14         self.rspec = self.data.getRSpec()
15
16         # Just to show that we can retrieve the RSpec
17         ta = TextArea()
18         ta.setSize("100%", "100%")
19         ta.setText(self.rspec)
20         self.panel.add(ta)
21
22         self.initWidget(self.panel)
23
24     def onShow(self):
25         # Do we want to refresh the RSpec?
26         pass
27         
28
29
30 def init():
31     return SinkInfo("PlanetLab", "Specify PlanetLab Resources", PlanetLab)