From 1b768cac8dad5f30c931c459b08512607d49c5cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Wed, 25 May 2016 16:55:22 +0100
Subject: [PATCH 1/7] SSH import proposal summary:
* improved ssh import dialog interface
* disable link if not previous installation
---
.../clients/ssh_import_proposal.rb | 4 ++-
src/lib/installation/dialogs/ssh_import.rb | 33 +++++++++++++------
2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/src/lib/installation/clients/ssh_import_proposal.rb b/src/lib/installation/clients/ssh_import_proposal.rb
index b216bef1f..73dc1f7d4 100644
--- a/src/lib/installation/clients/ssh_import_proposal.rb
+++ b/src/lib/installation/clients/ssh_import_proposal.rb
@@ -20,7 +20,9 @@ def description
"rich_text_title" => _("Import SSH Host Keys and Configuration"),
# menubutton entry
"menu_title" => _("&Import SSH Host Keys and Configuration"),
- "id" => "ssh_import"
+ # empty string is returned in case of not previous installation to
+ # avoid text link.
+ "id" => importer.configurations.empty? ? "" : "ssh_import"
}
end
diff --git a/src/lib/installation/dialogs/ssh_import.rb b/src/lib/installation/dialogs/ssh_import.rb
index f39671eeb..00210240f 100644
--- a/src/lib/installation/dialogs/ssh_import.rb
+++ b/src/lib/installation/dialogs/ssh_import.rb
@@ -34,7 +34,7 @@ def initialize
# Event callback for the 'ok' button
def next_handler
partition = UI.QueryWidget(Id(:device), :Value)
- partition = nil if partition == :none
+ partition = nil unless UI.QueryWidget(Id(:import_ssh_key), :Value)
copy_config = UI.QueryWidget(Id(:copy_config), :Value)
log.info "SshImportDialog partition => #{partition} copy_config => #{copy_config}"
importer.device = partition
@@ -61,12 +61,27 @@ def copy_config
end
def dialog_content
- HSquash(
+ HBox(
+ HStretch(),
VBox(
- Left(Label(_("System to Import SSH Host Keys from"))),
- partitions_list_widget,
- VSpacing(1),
- Left(copy_config_widget)
+ Left(CheckBoxFrame(
+ Id(:import_ssh_key),
+ _("I would like to import SSH keys from a previous installation"),
+ true,
+ VBox(
+ HStretch(),
+ VSpacing(1),
+ HBox(
+ HSpacing(2),
+ partitions_list_widget
+ ),
+ VSpacing(1),
+ HBox(
+ HSpacing(2),
+ Left(copy_config_widget)
+ )
+ )
+ )),
)
)
end
@@ -82,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.
" \
- "Check Copy Whole SSH Configuration to also copy other files " \
+ "
Check Insert SSH Configuration to also copy other files " \
"found in /etc/ssh, in addition to the keys.
"
)
end
@@ -96,8 +111,6 @@ def partitions_list_widget
RadioButtonGroup(
Id(:device),
VBox(
- # TRANSLATORS: option to select no partition for SSH keys import
- Left(RadioButton(Id(:none), _("None"), device.nil?)),
*part_widgets
)
)
@@ -112,7 +125,7 @@ def partition_widget(dev, partition)
end
def copy_config_widget
- CheckBox(Id(:copy_config), _("Copy Whole SSH Configuration"), copy_config)
+ CheckBox(Id(:copy_config), _("Insert SSH Configuration"), copy_config)
end
end
end
From 69314114a4ce604217de570aceb88144a1defdbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Wed, 25 May 2016 16:59:31 +0100
Subject: [PATCH 2/7] Update changes.
---
package/yast2-installation.changes | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/yast2-installation.changes b/package/yast2-installation.changes
index 85c84c557..ffacdb8c3 100644
--- a/package/yast2-installation.changes
+++ b/package/yast2-installation.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+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.
+
-------------------------------------------------------------------
Wed May 25 13:07:59 UTC 2016 - lslezak@suse.cz
From 142a50044b19b5b961dd68980d8ec6420ef2b8fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Thu, 26 May 2016 11:29:33 +0100
Subject: [PATCH 3/7] Some changes based on code review.
---
package/yast2-installation.changes | 2 +-
.../clients/ssh_import_proposal.rb | 23 ++++++++++---------
src/lib/installation/dialogs/ssh_import.rb | 10 ++++----
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/package/yast2-installation.changes b/package/yast2-installation.changes
index ffacdb8c3..5be2614f7 100644
--- a/package/yast2-installation.changes
+++ b/package/yast2-installation.changes
@@ -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
diff --git a/src/lib/installation/clients/ssh_import_proposal.rb b/src/lib/installation/clients/ssh_import_proposal.rb
index 73dc1f7d4..763dff054 100644
--- a/src/lib/installation/clients/ssh_import_proposal.rb
+++ b/src/lib/installation/clients/ssh_import_proposal.rb
@@ -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")
@@ -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 += " " + _("(change)") % '"ssh_import"'
Yast::HTML.List([res])
end
@@ -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
diff --git a/src/lib/installation/dialogs/ssh_import.rb b/src/lib/installation/dialogs/ssh_import.rb
index 00210240f..b8c814793 100644
--- a/src/lib/installation/dialogs/ssh_import.rb
+++ b/src/lib/installation/dialogs/ssh_import.rb
@@ -61,8 +61,7 @@ def copy_config
end
def dialog_content
- HBox(
- HStretch(),
+ HSquash(
VBox(
Left(CheckBoxFrame(
Id(:import_ssh_key),
@@ -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
@@ -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." \
- "Check Insert SSH Configuration to also copy other files " \
+ "
Check Import SSH Configuration to also copy other files " \
"found in /etc/ssh, in addition to the keys.
"
)
end
@@ -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
From 5fac26e14d4923a7698b4b341812d69f205d9ad1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Thu, 26 May 2016 12:18:11 +0100
Subject: [PATCH 4/7] Disable ssh_import sub proposal if no configuration
available.
---
src/lib/installation/clients/inst_pre_install.rb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/lib/installation/clients/inst_pre_install.rb b/src/lib/installation/clients/inst_pre_install.rb
index a61eb3eea..bae05da52 100644
--- a/src/lib/installation/clients/inst_pre_install.rb
+++ b/src/lib/installation/clients/inst_pre_install.rb
@@ -94,6 +94,12 @@ def main
read_ssh_info(device, mount_point)
end
+ # The ssh_import proposal doesn't make sense if there is no
+ # configuration to import from.
+ if ::Installation::SshImporter.instance.configurations.empty?
+ ProductControl.DisableSubProposal("inst_initial", "ssh_import")
+ end
+
# free the memory
@useful_partitions = nil
From 6c2f4855812d5f7f5069bdf0809efa22dfa31044 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Thu, 26 May 2016 12:34:53 +0100
Subject: [PATCH 5/7] Left is not needed and also makes rubocop happy.
---
src/lib/installation/dialogs/ssh_import.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/installation/dialogs/ssh_import.rb b/src/lib/installation/dialogs/ssh_import.rb
index b8c814793..ed6e71acf 100644
--- a/src/lib/installation/dialogs/ssh_import.rb
+++ b/src/lib/installation/dialogs/ssh_import.rb
@@ -63,7 +63,7 @@ def copy_config
def dialog_content
HSquash(
VBox(
- Left(CheckBoxFrame(
+ CheckBoxFrame(
Id(:import_ssh_key),
_("I would like to import SSH keys from a previous installation"),
true,
@@ -80,7 +80,7 @@ def dialog_content
Left(copy_config_widget)
)
)
- )),
+ ),
HStretch()
)
)
From 0901ac4a5a2fff1c1ab62a371f89cd74a96350c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Thu, 26 May 2016 12:41:30 +0100
Subject: [PATCH 6/7] Workaround is not needed if proposal is disable.
---
.../clients/ssh_import_proposal.rb | 23 ++++++++-----------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/lib/installation/clients/ssh_import_proposal.rb b/src/lib/installation/clients/ssh_import_proposal.rb
index 763dff054..ca9587e64 100644
--- a/src/lib/installation/clients/ssh_import_proposal.rb
+++ b/src/lib/installation/clients/ssh_import_proposal.rb
@@ -20,9 +20,7 @@ def description
"rich_text_title" => _("Import SSH Host Keys and Configuration"),
# menubutton entry
"menu_title" => _("&Import SSH Host Keys and Configuration"),
- # empty string is returned in case of not previous installation to
- # avoid text link.
- "id" => importer.configurations.empty? ? "" : "ssh_import"
+ "id" => "ssh_import"
}
end
@@ -67,18 +65,15 @@ def ask_user(param)
"going_back" => true
}
- 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}"
+ 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}"
+
{ "workflow_sequence" => result }
end
end
From 35dfed63625209a2acca513b6fd4809df1009aec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?=
Date: Thu, 26 May 2016 12:50:07 +0100
Subject: [PATCH 7/7] Bumped version.
---
package/yast2-installation.changes | 1 +
package/yast2-installation.spec | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/yast2-installation.changes b/package/yast2-installation.changes
index 5be2614f7..cd7d3d3eb 100644
--- a/package/yast2-installation.changes
+++ b/package/yast2-installation.changes
@@ -3,6 +3,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. (Fate#319624)
+- 3.1.189
-------------------------------------------------------------------
Wed May 25 13:07:59 UTC 2016 - lslezak@suse.cz
diff --git a/package/yast2-installation.spec b/package/yast2-installation.spec
index e2f2d5107..25689fb5e 100644
--- a/package/yast2-installation.spec
+++ b/package/yast2-installation.spec
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 3.1.188
+Version: 3.1.189
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build