Skip to content

Commit

Permalink
WIP insert a system_role step in the installation (FATE#317481)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Mar 1, 2016
1 parent b083c8f commit b04de91
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ client_DATA = \
clients/inst_save_hardware_status.rb \
clients/inst_scenarios.rb \
clients/inst_system_analysis.rb \
clients/inst_system_role.rb \
clients/inst_upgrade_urls.rb \
clients/inst_welcome.rb \
clients/inst_worker_continue.rb \
Expand Down Expand Up @@ -111,6 +112,7 @@ ylib_DATA = \
lib/installation/proposal_runner.rb \
lib/installation/proposal_store.rb \
lib/installation/remote_finish_client.rb \
lib/installation/select_system_role.rb \
lib/installation/snapshots_finish.rb

ylibclientdir = "${yast2dir}/lib/installation/clients"
Expand Down
2 changes: 2 additions & 0 deletions src/clients/inst_system_role.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require "installation/select_system_role"
Installation::SelectSystemRole.new.run
62 changes: 62 additions & 0 deletions src/lib/installation/select_system_role.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# encoding: utf-8
# TODO a cpyright header

require "yast"
module Installation
class SelectSystemRole # < Yast::Client ?
include Yast
include Yast::I18n
include Yast::UIShortcuts

def initialize
textdomain "installation"
Yast.import "UI"
Yast.import "Wizard"

end

def run
inst_workflow_navigation

setup_dialog

run_dialog
end

def inst_workflow_navigation
end

def setup_dialog
radios = RadioButtonGroup(
Id(:roles),
VBox(
RadioButton(Id(:hamlet), _("Hamlet")),
RadioButton(Id(:odette), _("Odette")),
RadioButton(Id(:gollum), _("Gollum"))
)
)
Wizard.SetContents(
_("Systoem Role"),
radios,
"help is overrated",
true, # wtf
true # wtf
)
end

def run_dialog
ui = nil
loop do
ui = UI.UserInput

ui = :abort if ui == :cancel

break if ui == :next || ui == :back || ui == :abort

# handle other ui
end

ui
end
end
end

0 comments on commit b04de91

Please sign in to comment.