Skip to content

Commit

Permalink
Fix versions (#564)
Browse files Browse the repository at this point in the history
* fix versions

* lint fixes
  • Loading branch information
pb82 authored Mar 4, 2020
1 parent 6a27ef4 commit 1820297
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/components/installedAppsView/InstalledAppsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,17 @@ class InstalledAppsView extends React.Component {

getAppVersion = app => {
if (window.OPENSHIFT_CONFIG && window.OPENSHIFT_CONFIG.openshiftVersion === 4) {
return ` (version ${
window.OPENSHIFT_CONFIG.provisionedServices[app.spec.clusterServiceClassExternalName].Version
})`;
const key = (app.spec && app.spec.clusterServiceClassExternalName) || app.name;
const service = window.OPENSHIFT_CONFIG.provisionedServices[key];
if (!service) {
return '';
}

const version = service.Version;
if (!version) {
return '';
}
return ` (version ${version})`;
}
return '';
};
Expand Down

0 comments on commit 1820297

Please sign in to comment.