From 09f27860edc890e86c80483e40865c3a3fca04e9 Mon Sep 17 00:00:00 2001 From: Rastislav Wagner Date: Wed, 9 Jan 2019 17:17:57 +0100 Subject: [PATCH] Show full OS name in templates view --- .../components/vm-template/vm-template.jsx | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/frontend/public/kubevirt/components/vm-template/vm-template.jsx b/frontend/public/kubevirt/components/vm-template/vm-template.jsx index 7f9340cbb8eb..c6f00226d5c1 100644 --- a/frontend/public/kubevirt/components/vm-template/vm-template.jsx +++ b/frontend/public/kubevirt/components/vm-template/vm-template.jsx @@ -20,31 +20,36 @@ const VmTemplateHeader = props => Flavor ; -const VmTemplateRow = ({obj: template}) => -
- -
-
- -
-
- {_.get(template.metadata, 'annotations.description', DASHES)} -
-
- -
-
-
- +const VmTemplateRow = ({obj: template}) => { + + const os = getTemplateOperatingSystems([template])[0]; + + return ( +
+ +
+
+ +
+
+ {_.get(template.metadata, 'annotations.description', DASHES)} +
+
+
-
-
- {getTemplateOperatingSystems([template])[0]} -
-
- {getTemplateFlavors([template])[0]} -
-; +
+
+ +
+
+
+ {os ? os.name || os.id : DASHES} +
+
+ {getTemplateFlavors([template])[0]} +
+ ); +}; const VmTemplateList = props => ;