Skip to content

Commit

Permalink
Some changes based on code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed May 26, 2016
1 parent 6931411 commit 142a500
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package/yast2-installation.changes
Expand Up @@ -2,7 +2,7 @@
Wed May 25 15:49:41 UTC 2016 - kanderssen@suse.com

- More visual improvements in the SSH keys importing proposal
summary based on blog entry feedback.
summary based on blog entry feedback. (Fate#319624)

-------------------------------------------------------------------
Wed May 25 13:07:59 UTC 2016 - lslezak@suse.cz
Expand Down
23 changes: 12 additions & 11 deletions src/lib/installation/clients/ssh_import_proposal.rb
Expand Up @@ -40,7 +40,7 @@ def importer

def preformatted_proposal
if importer.configurations.empty?
return _("No previous Linux installation found - not importing any SSH Key")
return Yast::HTML.List([_("No previous Linux installation found")])
end
if importer.device.nil?
res = _("No existing SSH host keys will be copied")
Expand All @@ -57,8 +57,6 @@ def preformatted_proposal
res = _("SSH host keys will be copied from %s") % partition
end
end
# TRANSLATORS: link to change the proposal
res += " " + _("(<a href=%s>change</a>)") % '"ssh_import"'
Yast::HTML.List([res])
end

Expand All @@ -69,15 +67,18 @@ def ask_user(param)
"going_back" => true
}

log.info "Asking user which SSH keys to import"
begin
Yast::Wizard.OpenAcceptDialog
result = WFM.CallFunction("inst_ssh_import", [args])
ensure
Yast::Wizard.CloseDialog
if importer.configurations.empty?
result = :next
else
log.info "Asking user which SSH keys to import"
begin
Yast::Wizard.OpenAcceptDialog
result = WFM.CallFunction("inst_ssh_import", [args])
ensure
Yast::Wizard.CloseDialog
end
log.info "Returning from ssh_import ask_user with #{result}"
end
log.info "Returning from ssh_import ask_user with #{result}"

{ "workflow_sequence" => result }
end
end
Expand Down
10 changes: 5 additions & 5 deletions src/lib/installation/dialogs/ssh_import.rb
Expand Up @@ -61,8 +61,7 @@ def copy_config
end

def dialog_content
HBox(
HStretch(),
HSquash(
VBox(
Left(CheckBoxFrame(
Id(:import_ssh_key),
Expand All @@ -75,13 +74,14 @@ def dialog_content
HSpacing(2),
partitions_list_widget
),
VSpacing(1),
VSpacing(3),
HBox(
HSpacing(2),
Left(copy_config_widget)
)
)
)),
HStretch()
)
)
end
Expand All @@ -97,7 +97,7 @@ def help_text
"thus the identity- of its SSH server. The key files found in /etc/ssh " \
"(one pair of files per host key) will be copied to the new system " \
"being installed.</p>" \
"<p>Check <b>Insert SSH Configuration</b> to also copy other files " \
"<p>Check <b>Import SSH Configuration</b> to also copy other files " \
"found in /etc/ssh, in addition to the keys.</p>"
)
end
Expand Down Expand Up @@ -125,7 +125,7 @@ def partition_widget(dev, partition)
end

def copy_config_widget
CheckBox(Id(:copy_config), _("Insert SSH Configuration"), copy_config)
CheckBox(Id(:copy_config), _("Import SSH Configuration"), copy_config)
end
end
end

0 comments on commit 142a500

Please sign in to comment.