from Sink import Sink, SinkInfo from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.TextArea import TextArea from pyjamas.ui.HTML import HTML from SfaData import PlanetLabData class PlanetLab(Sink): def __init__(self): Sink.__init__(self) self.panel = VerticalPanel() self.panel.setSize("100%", "100%") self.data = PlanetLabData() self.rspec = self.data.getRSpec() # Just to show that we can retrieve the RSpec ta = TextArea() ta.setSize("100%", "100%") ta.setText(self.rspec) self.panel.add(ta) self.initWidget(self.panel) def onShow(self): # Do we want to refresh the RSpec? pass def init(): return SinkInfo("PlanetLab", "Specify PlanetLab Resources", PlanetLab)