Skip to content

Commit

Permalink
Added the metric start date to the controller and environment
Browse files Browse the repository at this point in the history
  • Loading branch information
bp-cos committed Oct 17, 2023
1 parent 72a6a13 commit f5ad69f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/config/environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ declare const config: {
devMode: boolean;
cookieDomain: string;
authenticator: string;
metricsStartDate: string;
cookies: {
status: string;
keenUserId: string;
Expand Down
2 changes: 2 additions & 0 deletions app/preprints/detail/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export default class PrePrintsDetailController extends Controller {

@tracked fullScreenMFR = false;

metricsStartDate = config.OSF.metricsStartDate;

get hyperlink(): string {
return window.location.href;
}
Expand Down
6 changes: 4 additions & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const {
OSF_FILE_URL: waterbutlerUrl = 'http://localhost:7777/',
OSF_HELP_URL: helpUrl = 'http://localhost:4200/help',
OSF_AUTHENTICATOR: osfAuthenticator = 'osf-cookie',
PLAUDIT_WIDGET_URL = 'https://osf-review.plaudit.pub/embed/endorsements.js',
PLAUDIT_WIDGET_URL: plauditWidgetUrl = 'https://osf-review.plaudit.pub/embed/endorsements.js',
METRICS_START_DATE: metricsStartDate = '2019-01-01',
POLICY_URL_PREFIX = 'https://github.com/CenterForOpenScience/centerforopenscience.org/blob/master/',
POPULAR_LINKS_NODE: popularNode = '57tnq',
// POPULAR_LINKS_REGISTRATIONS = '',
Expand All @@ -72,7 +73,7 @@ module.exports = function(environment) {
const ENV = {
modulePrefix: 'ember-osf-web',
WATER_BUTLER_ENABLED,
PLAUDIT_WIDGET_URL,
plauditWidgetUrl,
environment,
lintOnBuild,
testsEnabled: false, // Disable tests by default.
Expand Down Expand Up @@ -155,6 +156,7 @@ module.exports = function(environment) {
shareApiUrl,
shareSearchUrl,
devMode,
metricsStartDate,
cookieDomain,
authenticator: `authenticator:${osfAuthenticator}`,
cookies: {
Expand Down

0 comments on commit f5ad69f

Please sign in to comment.