mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-23 13:46:45 +02:00
feat: add oss/enterprise version to footer (#245)
This commit is contained in:
parent
6101a2525d
commit
a9cb68705a
@ -7,11 +7,19 @@ exports[`renders correctly with empty version 1`] = `
|
|||||||
>
|
>
|
||||||
<small>
|
<small>
|
||||||
(test)
|
(test)
|
||||||
|
</small>
|
||||||
|
<br />
|
||||||
|
<small>
|
||||||
|
|
||||||
</small>
|
</small>
|
||||||
<br />
|
<br />
|
||||||
<small>
|
<small>
|
||||||
We are the best!
|
We are the best!
|
||||||
</small>
|
</small>
|
||||||
|
<br />
|
||||||
|
<small>
|
||||||
|
|
||||||
|
</small>
|
||||||
</react-mdl-FooterSection>
|
</react-mdl-FooterSection>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -22,11 +30,19 @@ exports[`renders correctly with ui-config 1`] = `
|
|||||||
>
|
>
|
||||||
<small>
|
<small>
|
||||||
(test)
|
(test)
|
||||||
|
</small>
|
||||||
|
<br />
|
||||||
|
<small>
|
||||||
|
|
||||||
</small>
|
</small>
|
||||||
<br />
|
<br />
|
||||||
<small>
|
<small>
|
||||||
We are the best!
|
We are the best!
|
||||||
</small>
|
</small>
|
||||||
|
<br />
|
||||||
|
<small>
|
||||||
|
|
||||||
|
</small>
|
||||||
</react-mdl-FooterSection>
|
</react-mdl-FooterSection>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -37,8 +53,16 @@ exports[`renders correctly without uiConfig 1`] = `
|
|||||||
>
|
>
|
||||||
<small>
|
<small>
|
||||||
|
|
||||||
|
</small>
|
||||||
|
<br />
|
||||||
|
<small>
|
||||||
|
|
||||||
</small>
|
</small>
|
||||||
<br />
|
<br />
|
||||||
<small />
|
<small />
|
||||||
|
<br />
|
||||||
|
<small>
|
||||||
|
|
||||||
|
</small>
|
||||||
</react-mdl-FooterSection>
|
</react-mdl-FooterSection>
|
||||||
`;
|
`;
|
||||||
|
@ -8,13 +8,35 @@ class ShowApiDetailsComponent extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
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 (
|
return (
|
||||||
<FooterSection type="bottom" logo={`${name} ${version}`}>
|
<FooterSection type="bottom" logo={`${versionStr}`}>
|
||||||
<small>{environment ? `(${environment})` : ''}</small>
|
<small>{environment ? `(${environment})` : ''}</small>
|
||||||
<br />
|
<br />
|
||||||
|
<small>{updateNotification ? `${updateNotification}` : ''}</small>
|
||||||
|
<br />
|
||||||
<small>{slogan}</small>
|
<small>{slogan}</small>
|
||||||
|
<br />
|
||||||
|
<small>{instanceId ? `${instanceId}` : ''}</small>
|
||||||
</FooterSection>
|
</FooterSection>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user