diff --git a/frontend/src/component/api/__tests__/__snapshots__/show-api-details-component-test.jsx.snap b/frontend/src/component/api/__tests__/__snapshots__/show-api-details-component-test.jsx.snap index 1668b2d20d..2381c154fb 100644 --- a/frontend/src/component/api/__tests__/__snapshots__/show-api-details-component-test.jsx.snap +++ b/frontend/src/component/api/__tests__/__snapshots__/show-api-details-component-test.jsx.snap @@ -7,11 +7,19 @@ exports[`renders correctly with empty version 1`] = ` > (test) + +
+ +
We are the best! +
+ + + `; @@ -22,11 +30,19 @@ exports[`renders correctly with ui-config 1`] = ` > (test) + +
+ +
We are the best! +
+ + + `; @@ -37,8 +53,16 @@ exports[`renders correctly without uiConfig 1`] = ` > + +
+ +
+
+ + + `; diff --git a/frontend/src/component/api/show-api-details-component.jsx b/frontend/src/component/api/show-api-details-component.jsx index 46853c00f8..218b42354e 100644 --- a/frontend/src/component/api/show-api-details-component.jsx +++ b/frontend/src/component/api/show-api-details-component.jsx @@ -8,13 +8,35 @@ class ShowApiDetailsComponent extends Component { }; render() { - const { slogan, environment, version, name } = this.props.uiConfig; - + const { slogan, environment, version, versionInfo, name } = this.props.uiConfig; + let versionStr; + let updateNotification; + let instanceId; + if (versionInfo) { + if (versionInfo.current.enterprise) { + versionStr = `${name} ${versionInfo.current.enterprise}`; + if (versionInfo.latest && !versionInfo.isLatest) { + updateNotification = `Upgrade available - Latest Enterprise release: ${versionInfo.latest.enterprise}`; + } + } else { + versionStr = `${name} ${versionInfo.current.oss}`; + if (versionInfo.latest && !versionInfo.isLatest) { + updateNotification = `Upgrade available - Latest OSS release: ${versionInfo.latest.oss}`; + } + } + instanceId = versionInfo.instanceId; + } else { + versionStr = `${name} ${version}`; + } return ( - + {environment ? `(${environment})` : ''}
+ {updateNotification ? `${updateNotification}` : ''} +
{slogan} +
+ {instanceId ? `${instanceId}` : ''}
); }