Skip to content

Commit ca27ba1

Browse files
committed
Remove all references and configuration to make an environment V2 from country config
1 parent b42ec25 commit ca27ba1

File tree

5 files changed

+7
-21
lines changed

5 files changed

+7
-21
lines changed

src/client-config.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ window.config = {
2929
defaultMessage: 'Development dashboard',
3030
description: 'Menu item for development dashboard'
3131
},
32-
url: 'http://localhost:3040/ping',
32+
url: 'http://localhost:3040/ping'
3333
}
3434
],
35-
FEATURES: {
36-
// The V2_EVENTS variable is passed down from src/index.ts:309
37-
V2_EVENTS: {{ V2_EVENTS }}
38-
}
35+
FEATURES: {}
3936
}

src/client-config.prod.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ window.config = {
3333
defaultMessage: 'Registrations Dashboard',
3434
description: 'Menu item for registrations dashboard'
3535
},
36-
url: `${scheme}//metabase.${hostname}/public/dashboard/03be04d6-bde0-4fa7-9141-21cea2a7518b#bordered=false&titled=false&refresh=300`, // Filled in below
36+
url: `${scheme}//metabase.${hostname}/public/dashboard/03be04d6-bde0-4fa7-9141-21cea2a7518b#bordered=false&titled=false&refresh=300` // Filled in below
3737
},
3838
{
3939
id: 'completeness',
@@ -42,7 +42,7 @@ window.config = {
4242
defaultMessage: 'Completeness Dashboard',
4343
description: 'Menu item for completeness dashboard'
4444
},
45-
url: `${scheme}//metabase.${hostname}/public/dashboard/41940907-8542-4e18-a05d-2408e7e9838a#bordered=false&titled=false&refresh=300`,
45+
url: `${scheme}//metabase.${hostname}/public/dashboard/41940907-8542-4e18-a05d-2408e7e9838a#bordered=false&titled=false&refresh=300`
4646
},
4747
{
4848
id: 'registry',
@@ -51,11 +51,8 @@ window.config = {
5151
defaultMessage: 'Registry',
5252
description: 'Menu item for registry dashboard'
5353
},
54-
url: `${scheme}//metabase.${hostname}/public/dashboard/dc66b77a-79df-4f68-8fc8-5e5d5a2d7a35#bordered=false&titled=false&refresh=300`,
54+
url: `${scheme}//metabase.${hostname}/public/dashboard/dc66b77a-79df-4f68-8fc8-5e5d5a2d7a35#bordered=false&titled=false&refresh=300`
5555
}
5656
],
57-
FEATURES: {
58-
// The V2_EVENTS variable is passed down from src/index.ts:309
59-
V2_EVENTS: {{ V2_EVENTS }}
60-
}
57+
FEATURES: {}
6158
}

src/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ export const CHECK_INVALID_TOKEN = env.CHECK_INVALID_TOKEN
3131

3232
export const PRODUCTION = env.isProd
3333
export const QA_ENV = env.QA_ENV
34-
export const V2_EVENTS = env.V2_EVENTS
3534
export const ANALYTICS_DATABASE_URL = env.ANALYTICS_DATABASE_URL

src/environment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export const env = cleanEnv(process.env, {
3131
devDefault: 'http://localhost:5050/confirm/registration'
3232
}),
3333
QA_ENV: bool({ default: false }),
34-
V2_EVENTS: bool({ default: false }),
3534
ANALYTICS_DATABASE_URL: url({
3635
devDefault:
3736
'postgres://events_analytics:analytics_password@localhost:5432/events',

src/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ require('dotenv').config()
1313

1414
import StreamArray from 'stream-json/streamers/StreamArray'
1515
import path from 'path'
16-
import Handlebars from 'handlebars'
1716
import * as Hapi from '@hapi/hapi'
1817
import * as Pino from 'hapi-pino'
1918
import * as JWT from 'hapi-auth-jwt2'
@@ -25,7 +24,6 @@ import {
2524
DOMAIN,
2625
LOGIN_URL,
2726
SENTRY_DSN,
28-
V2_EVENTS,
2927
COUNTRY_CONFIG_HOST,
3028
COUNTRY_CONFIG_PORT,
3129
CHECK_INVALID_TOKEN,
@@ -318,11 +316,7 @@ export async function createServer() {
318316
? '/client-config.prod.js'
319317
: '/client-config.js'
320318

321-
const template = Handlebars.compile(
322-
readFileSync(join(__dirname, file), 'utf8')
323-
)
324-
const result = template({ V2_EVENTS })
325-
return h.response(result).type('application/javascript')
319+
return h.file(join(__dirname, file))
326320
},
327321
options: {
328322
auth: false,

0 commit comments

Comments
 (0)