Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Show full OS name in templates view
Browse files Browse the repository at this point in the history
  • Loading branch information
rawagner committed Jan 9, 2019
1 parent b060fc8 commit 09f2786
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions frontend/public/kubevirt/components/vm-template/vm-template.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,36 @@ const VmTemplateHeader = props => <ListHeader>
<ColHead {...props} className={otherRowStyle}>Flavor</ColHead>
</ListHeader>;

const VmTemplateRow = ({obj: template}) => <ResourceRow obj={template}>
<div className={mainRowStyle}>
<ResourceLink kind={VmTemplateModel.kind} name={template.metadata.name} namespace={template.metadata.namespace} title={template.metadata.uid} />
</div>
<div className={mainRowStyle}>
<ResourceLink kind={NamespaceModel.kind} name={template.metadata.namespace} title={template.metadata.namespace} />
</div>
<div className={mainRowStyle}>
{_.get(template.metadata, 'annotations.description', DASHES)}
</div>
<div className="dropdown-kebab-pf">
<ResourceKebab actions={menuActions} kind={VmTemplateModel.kind} resource={template} />
</div>
<div className={otherRowStyle}>
<div className="co-resource-list__item--templateSource">
<TemplateSource template={template} />
const VmTemplateRow = ({obj: template}) => {

const os = getTemplateOperatingSystems([template])[0];

return ( <ResourceRow obj={template}>
<div className={mainRowStyle}>
<ResourceLink kind={VmTemplateModel.kind} name={template.metadata.name} namespace={template.metadata.namespace} title={template.metadata.uid} />
</div>
<div className={mainRowStyle}>
<ResourceLink kind={NamespaceModel.kind} name={template.metadata.namespace} title={template.metadata.namespace} />
</div>
<div className={mainRowStyle}>
{_.get(template.metadata, 'annotations.description', DASHES)}
</div>
<div className="dropdown-kebab-pf">
<ResourceKebab actions={menuActions} kind={VmTemplateModel.kind} resource={template} />
</div>
</div>
<div className={otherRowStyle}>
{getTemplateOperatingSystems([template])[0]}
</div>
<div className={otherRowStyle}>
{getTemplateFlavors([template])[0]}
</div>
</ResourceRow>;
<div className={otherRowStyle}>
<div className="co-resource-list__item--templateSource">
<TemplateSource template={template} />
</div>
</div>
<div className={otherRowStyle}>
{os ? os.name || os.id : DASHES}
</div>
<div className={otherRowStyle}>
{getTemplateFlavors([template])[0]}
</div>
</ResourceRow>);
};


const VmTemplateList = props => <List {...props} Header={VmTemplateHeader} Row={VmTemplateRow} />;
Expand Down

0 comments on commit 09f2786

Please sign in to comment.