--
Tested-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Reviewed-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
On Wed, 2014-03-05 at 15:18 -0300, Rodrigo Trujillo wrote:
This patche filters remote isos that should be showed to user by the
system architecture. The UI now shows the architecture of the remote
iso as well.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
src/kimchi/distroloader.py | 3 ++-
ui/pages/template-add.html.tmpl | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/distroloader.py b/src/kimchi/distroloader.py
index daa5d5b..7745e0d 100644
--- a/src/kimchi/distroloader.py
+++ b/src/kimchi/distroloader.py
@@ -49,9 +49,10 @@ class DistroLoader(object):
raise OperationFailed("KCHDL0002E", msg_args)
def get(self):
+ arch = os.uname()[4]
all_json_files = glob.glob("%s/%s" % (self.location,
"*.json"))
distros = []
for f in all_json_files:
distros.extend(self._get_json_info(f))
- return dict([(distro['name'], distro) for distro in distros])
+ return dict([(distro['name'], distro) for distro in distros if
distro['os_arch'] == arch])
diff --git a/ui/pages/template-add.html.tmpl b/ui/pages/template-add.html.tmpl
index edce8d2..8d20f66 100644
--- a/ui/pages/template-add.html.tmpl
+++ b/ui/pages/template-add.html.tmpl
@@ -158,6 +158,9 @@
<div class="iso-info-item"
title="{os_distro}">
$_("OS: "){os_distro}
</div>
+ <div class="iso-info-item"
title="{os_arch}">
+ $_("Arch: "){os_arch}
+ </div>
</div>
<div class="iso-info-col">
<div class="iso-info-item"
title="{os_version}">