Skip to content

Commit

Permalink
add proposal screen to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Apr 1, 2015
1 parent 5e8c960 commit 6c5525f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
8 changes: 8 additions & 0 deletions src/clients/migration_proposals.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require "migration/proposal_store"
require "installation/proposal_runner"
require "yast"

Yast.import "Wizard"

Yast::Wizard.OpenNextBackDialog
::Installation::ProposalRunner.new(Migration::ProposalStore).run
18 changes: 10 additions & 8 deletions src/lib/migration/main_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ module Migration
class MainWorkflow
include Yast::Logger

# array of migration steps, each step contain client and its args
MIGRATION_STEPS = [
{
client: "repositories",
args: [:sw_single_mode]
}
]
def self.run
workflow = new
workflow.run
Expand All @@ -50,6 +43,10 @@ def run
WORKFLOW_SEQUENCE = {
"ws_start" => "repositories", # TODO: store state before run
"repositories" => {
abort: "restore",
next: "proposals"
},
"proposals" => {
abort: "restore",
next: :next
},
Expand All @@ -61,7 +58,8 @@ def run
def aliases
{
"restore" => ->() { restore_state },
"repositories" => ->() { repositories }
"repositories" => ->() { repositories },
"proposals" => ->() { proposals }
}
end

Expand All @@ -73,5 +71,9 @@ def restore_state
def repositories
Yast::WFM.CallFunction("repositories", [:sw_single_mode])
end

def proposals
Yast::WFM.CallFunction("migration_proposals")
end
end
end

0 comments on commit 6c5525f

Please sign in to comment.