def __init__(self, assistant):
        Page.__init__(self, assistant)

        config_dir = GLib.get_user_config_dir()
        self.repositories = os.path.join(
                config_dir, 'baserock-installer', 'repos')

        self.worker = None
        self.idle_id = 0
        self.download_completed = False

        self.title, box = self.start_section('Downloading Release')
        text = self.create_text(
                'Depending on your internet connection, this may take '
                'some time. You will, however, get a Baserock system that '
                'provides a traceable and controlled runtime or development '
                'environment. Among many other things, this helps in '
                'spotting, diagnosing and fixing problems as at any time '
                'it is clear how exactly the system is configured.')
        box.pack_start(text, False, False, 0)

        grid = Gtk.Grid()
        grid.set_column_spacing(12)
        grid.set_row_spacing(6)
        grid.show()
        box.pack_start(grid, False, True, 0)

        label = Gtk.Label('Current File:')
        label.set_halign(Gtk.Align.START)
        label.show()
        grid.attach(label, 0, 1, 1, 1)

        self.item_progress = Gtk.ProgressBar()
        self.item_progress.set_hexpand(True)
        self.item_progress.show()
        grid.attach(self.item_progress, 0, 2, 1, 1)

        label = Gtk.Label('Total:')
        label.set_halign(Gtk.Align.START)
        label.show()
        grid.attach(label, 0, 3, 1, 1)

        self.total_progress = Gtk.ProgressBar()
        self.total_progress.show()
        grid.attach(self.total_progress, 0, 4, 1, 1)

        self.numbers_label = Gtk.Label()
        self.numbers_label.set_halign(Gtk.Align.START)
        self.numbers_label.show()
        grid.attach(self.numbers_label, 0, 5, 1, 1)

        self.downloader = FileDownload()
        self.downloader.connect('download-error', self.download_error)
        self.downloader.connect('download-progress', self.download_progress)
        self.downloader.connect('download-finished', self.download_finished)
        self.downloader.excluded_mime_types.add('text/html')

        self.reset()
Esempio n. 2
0
    def __init__(self, *args, **kwargs):
        Page.__init__(self, *args, **kwargs)
        label = tk.Label(self, text="This is page 1")
        # label.pack(side="top", fill="both", expand=True)

        self.frame = tk.Frame(self).pack()

        self.create_input_fields()
        self.create_radios()
        self.create_btn()

        title = tk.Label(self.frame,
                         text="Neuer Kunde")
        title.config(font=("Courier", 44))
        title.place(x=20, y=35)
    def __init__(self, *args, **kwargs):
        Page.__init__(self, *args, **kwargs)
        label = tk.Label(self, text="This is page 1")
        # label.pack(side="top", fill="both", expand=True)

        self.frame = tk.Frame(self).pack()

        ReceptionUseCase().createReservation("nasdf", 12, SingleRoom())
        ReceptionUseCase().createReservation("nasdf", 12, SingleRoom())
        ReceptionUseCase().createReservation("nasdf", 12, SingleRoom())

        self.create_list()

        title = tk.Label(self.frame, text="Kunden\nVerwaltung")
        title.config(font=("Courier", 44))
        title.place(x=20, y=35)
    def __init__(self, assistant):
        Page.__init__(self, assistant)

        title, box = self.start_section('Configure Virtual Machine')

        grid = Gtk.Grid()
        grid.set_column_spacing(12)
        grid.set_row_spacing(6)
        grid.show()
        box.pack_start(grid, False, False, 0)

        label = Gtk.Label('Virtualization:')
        label.set_halign(Gtk.Align.START)
        label.show()
        grid.attach(label, 0, 1, 1, 1)

        self.model = Gtk.ListStore(str, object)
        self.combo = Gtk.ComboBox(model=self.model)
        self.combo.connect('changed', self.virtualization_changed)
        renderer = Gtk.CellRendererText()
        self.combo.pack_start(renderer, True)
        self.combo.add_attribute(renderer, 'text', 0)
        self.combo.show()
        grid.attach(self.combo, 1, 1, 1, 1)

        label = Gtk.Label('VM Name:')
        label.set_halign(Gtk.Align.START)
        label.show()
        grid.attach(label, 0, 2, 1, 1)

        self.vm_name = Gtk.Entry()
        self.vm_name.set_halign(Gtk.Align.FILL)
        self.vm_name.set_hexpand(True)
        self.vm_name.show()
        grid.attach(self.vm_name, 1, 2, 4, 1)

        label = Gtk.Label('SSH Forward Port:')
        label.set_halign(Gtk.Align.START)
        label.show()
        grid.attach(label, 0, 3, 1, 1)

        self.ssh_port = Gtk.SpinButton()
        self.ssh_port.set_range(1, 9999)
        self.ssh_port.set_value(2222)
        self.ssh_port.show()
        grid.attach(self.ssh_port, 1, 3, 1, 1)
    def __init__(self, assistant):
        Page.__init__(self, assistant)

        label, box = self.start_section('Select Release')
        text = self.create_text(
                'In order to set up a Baserock development or runtime '
                'environment, please select one of the releases below.')
        box.pack_start(text, False, False, 0)

        self.model = Gtk.ListStore(str, object)
        self.combo = Gtk.ComboBox.new_with_model(self.model)
        self.combo.connect('changed', self.selection_changed)
        renderer = Gtk.CellRendererText()
        self.combo.pack_start(renderer, True)
        self.combo.add_attribute(renderer, 'text', 0)
        self.combo.show()
        box.pack_start(self.combo, False, False, 0)
Esempio n. 6
0
    def __init__(self, assistant):
        Page.__init__(self, assistant)

        self.repository = None

        label, box = self.start_section('Welcome to the Baserock installer')
        text = self.create_text(
                'This wizard will guide you through the installation of '
                'Baserock. You will be able to select a Baserock release '
                'and will be helped in setting up your development or runtime '
                'environment step by step.\n'
                '\n'
                'If you encounter any problems during the installation or '
                'have any further questions, please join us in '
                '<tt>#baserock</tt> on the FreeNode IRC network.')
        box.pack_start(text, False, True, 0)

        label, box = self.start_section('Release Repository')
        text = self.create_text(
                'Please enter the URL of a Baserock release repository into '
                'the following field. This URL should be in a format that Git '
                'understands, e.g.\n'
                '\n'
                '<tt>ssh://user@host/path/to/repo.git</tt>\n'
                '<tt>git://host:path/to/repo.git</tt>')
        box.pack_start(text, False, True, 0)

        hbox = Gtk.HBox(False, 12)
        hbox.show()
        box.pack_start(hbox, False, True, 0)

        label = Gtk.Label('Repository:')
        label.show()
        hbox.pack_start(label, False, True, 0)

        entry = Gtk.Entry()
        entry.set_activates_default(True)
        entry.connect('changed', self.repository_changed)
        entry.connect('activate', self.repository_changed)
        entry.set_placeholder_text(
                'git://trove.baserock.org/baserock/baserock/releases.git')
        entry.show()
        hbox.add(entry)
    def __init__(self, assistant):
        Page.__init__(self, assistant)

        configdir = GLib.get_user_config_dir()
        self.repositories = os.path.join(
                configdir, 'baserock-installer', 'repos')

        label, box = self.start_section('Downloading Releases')

        self.download_text = self.create_text('')
        box.pack_start(self.download_text, False, False, 0)

        self.progress = Gtk.ProgressBar()
        self.progress.set_show_text(True)
        self.progress.show()
        box.pack_start(self.progress, False, False, 0)
        
        self.error_label = self.create_text('')
        self.error_label.set_selectable(True)
        box.pack_start(self.error_label, False, False, 0)
Esempio n. 8
0
    def __init__(self, assistant):
        Page.__init__(self, assistant)

        title, box = self.start_section('Create Virtual Machine')
        text = self.create_text(
                'This step automatically sets up your Baserock virtual '
                'machine. This involves converting the downloaded release '
                'into a format that the virtualization technology '
                'understands, creating the virtual machine and copying '
                'other downloaded files into it.')
        box.pack_start(text, False, False, 0)

        self.progress_bar = Gtk.ProgressBar()
        self.progress_bar.show()
        box.pack_start(self.progress_bar, False, False, 0)

        self.status_label = Gtk.Label('Initialising...')
        self.status_label.set_line_wrap(True)
        self.status_label.set_alignment(0.0, 0.0)
        self.status_label.show()
        box.pack_start(self.status_label, False, False, 0)
    def __init__(self, *args, **kwargs):
        root = tk.Tk()
        root.title("HI")
        root.wm_geometry("400x400")
        root.mainloop()

        Page.__init__(self, *args, **kwargs)
        label = tk.Label(self, text="This is page 1")
        # label.pack(side="top", fill="both", expand=True)

        self.frame = tk.Frame(self).pack()

        ReceptionUseCase().createReservation("nasdf", 12, SingleRoom())
        ReceptionUseCase().createReservation("nasdf", 12, SingleRoom())
        ReceptionUseCase().createReservation("nasdf", 12, SingleRoom())

        self.create_list()

        title = tk.Label(self.frame,
                         text="Zimmer\nVerwaltung")
        title.config(font=("Courier", 44))
        title.place(x=20, y=35)
Esempio n. 10
0
    def __init__(self, assistant):
        Page.__init__(self, assistant)

        label, box = self.start_section('Thanks for installing Baserock!')
        text = self.create_text(
                'Your development or runtime environment should now be '
                'configured and ready to use. If this is not the case, '
                'please join us in <tt>#baserock</tt> on the FreeNode IRC '
                'network.')
        box.pack_start(text, False, True, 0)

        label, box = self.start_section('Start Baserock now?')
        text = self.create_text(
                'If you want to start Baserock now, simply press the '
                'button below.')
        box.pack_start(text, False, True, 0)

        self.start_button = Gtk.Button()
        image = Gtk.Image.new_from_stock(
                Gtk.STOCK_EXECUTE, Gtk.IconSize.BUTTON)
        self.start_button.set_image(image)
        self.start_button.set_label('Start Baserock')
        self.start_button.show()
        box.pack_start(self.start_button, False, False, 0)