[Kimchi-devel] [PATCH 2/3] issue #301: Add a loading message while listing default remote ISOs
Aline Manera
alinefm at linux.vnet.ibm.com
Fri Mar 7 04:10:59 UTC 2014
From: Aline Manera <alinefm at br.ibm.com>
The remote ISO path may become invalid and we check it on backend to
only return valid data to UI.
But checking the remote ISO path for each distro can take some time so
UI needs to properly display it to user.
Do that by adding a loading message until get the backend response.
Also update the .po files as new messages were added.
Signed-off-by: Aline Manera <alinefm at br.ibm.com>
---
po/en_US.po | 8 +++++++-
po/kimchi.pot | 8 +++++++-
po/pt_BR.po | 8 +++++++-
po/zh_CN.po | 8 +++++++-
ui/js/src/kimchi.template_add_main.js | 4 ++++
ui/pages/template-add.html.tmpl | 12 +++++++++++-
6 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/po/en_US.po b/po/en_US.po
index 23881da..23926d6 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: kimchi 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-05 17:45-0300\n"
+"POT-Creation-Date: 2014-03-07 00:54-0300\n"
"PO-Revision-Date: 2013-07-11 17:32-0400\n"
"Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
"Language-Team: English\n"
@@ -565,6 +565,12 @@ msgstr "Create Templates from Selected ISO"
msgid "I want to use a specific ISO file"
msgstr "I want to use a specific ISO file"
+msgid "Loading default remote ISOs ..."
+msgstr ""
+
+msgid "Arch: "
+msgstr ""
+
msgid "I want to use a custom URL"
msgstr "I want to use a custom URL"
diff --git a/po/kimchi.pot b/po/kimchi.pot
index 06236d2..a8b3ecb 100755
--- a/po/kimchi.pot
+++ b/po/kimchi.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-05 17:45-0300\n"
+"POT-Creation-Date: 2014-03-07 00:54-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -552,6 +552,12 @@ msgstr ""
msgid "I want to use a specific ISO file"
msgstr ""
+msgid "Loading default remote ISOs ..."
+msgstr ""
+
+msgid "Arch: "
+msgstr ""
+
msgid "I want to use a custom URL"
msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 06db056..bca6335 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: kimchi 1.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-05 17:45-0300\n"
+"POT-Creation-Date: 2014-03-07 00:54-0300\n"
"PO-Revision-Date: 2013-06-27 10:48+0000\n"
"Last-Translator: Crístian Viana <vianac at linux.vnet.ibm.com>\n"
"Language-Team: Aline Manera <alinefm at br.ibm.com>\n"
@@ -580,6 +580,12 @@ msgstr "Criar Modelos a partir das ISOs selecionadas"
msgid "I want to use a specific ISO file"
msgstr "Eu quero usar um arquivo ISO específico"
+msgid "Loading default remote ISOs ..."
+msgstr ""
+
+msgid "Arch: "
+msgstr ""
+
msgid "I want to use a custom URL"
msgstr "Eu quero usar uma URL personalizada"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 38a3c6c..6e0d538 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: kimchi 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-03-05 17:45-0300\n"
+"POT-Creation-Date: 2014-03-07 00:54-0300\n"
"PO-Revision-Date: 2013-06-27 10:48+0000\n"
"Last-Translator: ShaoHe Feng <shaohef at linux.vnet.ibm.com>\n"
"Language-Team: ShaoHe Feng <shaohef at linux.vnet.ibm.com>\n"
@@ -569,6 +569,12 @@ msgstr "从选中的ISO中创建模板"
msgid "I want to use a specific ISO file"
msgstr "指定一个ISO文件"
+msgid "Loading default remote ISOs ..."
+msgstr ""
+
+msgid "Arch: "
+msgstr ""
+
msgid "I want to use a custom URL"
msgstr "我想用一个自定义的URL"
diff --git a/ui/js/src/kimchi.template_add_main.js b/ui/js/src/kimchi.template_add_main.js
index 098a706..d1ba527 100644
--- a/ui/js/src/kimchi.template_add_main.js
+++ b/ui/js/src/kimchi.template_add_main.js
@@ -249,7 +249,9 @@ kimchi.template_add_main = function() {
//1-2-1 remote iso list
var initRemoteIsoField = function() {
+ $('#load-remote-iso').show();
$('#remote-iso-field').hide();
+ $('#iso-url-field').hide();
$('#select-all-remote-iso').prop('checked', false);
$('#btn-template-remote-iso-create').attr('disabled', 'disabled');
};
@@ -268,7 +270,9 @@ kimchi.template_add_main = function() {
}
});
$('#list-remote-iso').html(html);
+ $('#load-remote-iso').hide()
$('#remote-iso-field').show();
+ $('#iso-url-field').show();
} else {
kimchi.message.warn(i18n['KCHTMPL6001W']);
}
diff --git a/ui/pages/template-add.html.tmpl b/ui/pages/template-add.html.tmpl
index 5c66753..afe22dd 100644
--- a/ui/pages/template-add.html.tmpl
+++ b/ui/pages/template-add.html.tmpl
@@ -128,6 +128,16 @@
<h2 class="step-title">$_("Remote ISO Image")</h2>
</header>
+ <!-- 1-2-0 -->
+ <div id="load-remote-iso">
+ <h3 class="step-subtitle">
+ <label>
+ <img src = "../images/theme-default/loading.gif" />
+ $_("Loading default remote ISOs ...")
+ </label>
+ </h3>
+ </div>
+
<!-- 1-2-1 -->
<div id="remote-iso-field" class="iso-field" style="display: none;">
<h3 class="step-subtitle">
@@ -180,7 +190,7 @@
</div>
<!-- 1-2-2 -->
- <div id="iso-url-field">
+ <div id="iso-url-field" style="display: none;">
<h3 class="step-subtitle">
<label>
<input type="checkbox" id="iso-url-check">
--
1.7.10.4
More information about the Kimchi-devel
mailing list