Show version mismatch warning only on OSS (#245)
This commit is contained in:
parent
447de7059a
commit
5b5798a4e2
2 changed files with 21 additions and 14 deletions
|
|
@ -89,20 +89,23 @@ const DefaultPageLayout: FC<DefaultPageLayoutProps> = observer((props) => {
|
|||
/>
|
||||
</Alert>
|
||||
)}
|
||||
{store.backendVersion && plugin?.version && store.backendVersion !== plugin?.version && (
|
||||
<Alert className={styles.alert} severity="warning" title={'Version mismatch!'}>
|
||||
Please make sure you have the same versions of the Grafana OnCall plugin and the Grafana OnCall engine,
|
||||
otherwise there could be issues with your Grafana OnCall installation!
|
||||
<br />
|
||||
{`Current plugin version: ${plugin.version}, current engine version: ${store.backendVersion}`}
|
||||
<br />
|
||||
Please see{' '}
|
||||
<a href={'https://grafana.com/docs/oncall/latest/open-source/#update-grafana-oncall-oss'}>
|
||||
the update instructions
|
||||
</a>
|
||||
.
|
||||
</Alert>
|
||||
)}
|
||||
{store.backendLicense === 'OpenSource' &&
|
||||
store.backendVersion &&
|
||||
plugin?.version &&
|
||||
store.backendVersion !== plugin?.version && (
|
||||
<Alert className={styles.alert} severity="warning" title={'Version mismatch!'}>
|
||||
Please make sure you have the same versions of the Grafana OnCall plugin and the Grafana OnCall engine,
|
||||
otherwise there could be issues with your Grafana OnCall installation!
|
||||
<br />
|
||||
{`Current plugin version: ${plugin.version}, current engine version: ${store.backendVersion}`}
|
||||
<br />
|
||||
Please see{' '}
|
||||
<a href={'https://grafana.com/docs/oncall/latest/open-source/#update-grafana-oncall-oss'}>
|
||||
the update instructions
|
||||
</a>
|
||||
.
|
||||
</Alert>
|
||||
)}
|
||||
{currentTeam?.limits.show_limits_warning &&
|
||||
currentTeam?.limits.period_title !== 'Version mismatch' && // don't show version mismatch warning twice
|
||||
!getItem(currentTeam.limits.warning_text) && (
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ export class RootBaseStore {
|
|||
@observable
|
||||
backendVersion = '';
|
||||
|
||||
@observable
|
||||
backendLicense = '';
|
||||
|
||||
@observable
|
||||
pluginIsInitialized = true;
|
||||
|
||||
|
|
@ -138,6 +141,7 @@ export class RootBaseStore {
|
|||
return;
|
||||
}
|
||||
this.backendVersion = get_sync_response.version;
|
||||
this.backendLicense = get_sync_response.license;
|
||||
this.appLoading = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue