Skip to content

Commit

Permalink
use server version from console html (#2464)
Browse files Browse the repository at this point in the history
  • Loading branch information
wawhal authored and rikinsk committed Jul 3, 2019
1 parent 0aefbd0 commit bdb415b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions console/src/Globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { SERVER_CONSOLE_MODE } from './constants';
/* eslint-disable */
import sqlFormatter from './helpers/sql-formatter.min';
import hljs from './helpers/highlight.min';
import { getFeaturesCompatibility } from './helpers/versionUtils';
/* eslint-enable */

/* */
Expand Down Expand Up @@ -42,6 +43,10 @@ const globals = {
telemetryTopic:
window.__env.nodeEnv !== 'development' ? 'console' : 'console_test',
assetsPath: window.__env.assetsPath,
serverVersion: window.__env.serverVersion,
featuresCompatibility: window.__env.serverVersion
? getFeaturesCompatibility(window.__env.serverVersion)
: null,
};

// set defaults
Expand Down
1 change: 1 addition & 0 deletions console/src/components/Main/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const setFeaturesCompatibility = data => ({
const featureCompatibilityInit = () => {
return (dispatch, getState) => {
const { serverVersion } = getState().main;

if (!serverVersion) {
return;
}
Expand Down

0 comments on commit bdb415b

Please sign in to comment.