diff --git a/_sls_lambda_universal/serverless.yml b/_sls_lambda_universal/serverless.yml index c29c81a..4640010 100644 --- a/_sls_lambda_universal/serverless.yml +++ b/_sls_lambda_universal/serverless.yml @@ -11,15 +11,16 @@ provider: stage: dev environment: ROLLBAR_SERVER_API_KEY: ${env:ROLLBAR_SERVER_API_KEY} + ROLLBAR_ENV: ${opt:stage, self:provider.stage} custom: apigwBinary: types: - - '*/*' + - "*/*" functions: api: handler: pydt-universal.handler events: - http: GET /{proxy+} - - http: GET / \ No newline at end of file + - http: GET / diff --git a/src/app/shared/error.service.ts b/src/app/shared/error.service.ts index fbba161..c65f728 100644 --- a/src/app/shared/error.service.ts +++ b/src/app/shared/error.service.ts @@ -27,7 +27,7 @@ export class ErrorHandlerService implements ErrorHandler { captureUnhandledRejections: true, enabled: !!process.env["ROLLBAR_SERVER_API_KEY"], payload: { - environment: environment.name, + environment: process.env["ROLLBAR_ENV"] || environment.name, client: { javascript: { // eslint-disable-next-line camelcase diff --git a/src/app/stats/display-turn-stats/display-turn-stats.component.html b/src/app/stats/display-turn-stats/display-turn-stats.component.html index 6edb73c..942a3f0 100644 --- a/src/app/stats/display-turn-stats/display-turn-stats.component.html +++ b/src/app/stats/display-turn-stats/display-turn-stats.component.html @@ -17,7 +17,7 @@

-
+
diff --git a/src/app/stats/display-turn-stats/display-turn-stats.component.ts b/src/app/stats/display-turn-stats/display-turn-stats.component.ts index f0aa335..d704915 100644 --- a/src/app/stats/display-turn-stats/display-turn-stats.component.ts +++ b/src/app/stats/display-turn-stats/display-turn-stats.component.ts @@ -2,7 +2,6 @@ import { Component, Input } from "@angular/core"; import moment from "moment"; import { TurnData } from "pydt-shared"; import { Utility } from "../../shared/utility"; -import { BrowserDataService } from "../../shared/browser-data.service"; @Component({ selector: "pydt-turn-stats", @@ -15,12 +14,6 @@ export class DisplayTurnStatsComponent { @Input() hideQueueCharts = false; @Input() factWidth = 6; - constructor(private browserData: BrowserDataService) {} - - get isBrowser() { - return this.browserData.isBrowser(); - } - get firstTurnAgo() { return Utility.countdownAgo(this.turnData.firstTurnEndDate, null); } diff --git a/src/app/stats/turn-length-chart/turn-length-chart.component.html b/src/app/stats/turn-length-chart/turn-length-chart.component.html index f423c95..366309c 100644 --- a/src/app/stats/turn-length-chart/turn-length-chart.component.html +++ b/src/app/stats/turn-length-chart/turn-length-chart.component.html @@ -1,3 +1,4 @@
- + +
diff --git a/src/app/stats/turn-length-chart/turn-length-chart.component.ts b/src/app/stats/turn-length-chart/turn-length-chart.component.ts index 7e9a83f..8622afa 100644 --- a/src/app/stats/turn-length-chart/turn-length-chart.component.ts +++ b/src/app/stats/turn-length-chart/turn-length-chart.component.ts @@ -2,6 +2,7 @@ import { Component, Input, OnChanges } from "@angular/core"; import { TURN_BUCKETS, TurnData } from "pydt-shared"; import { ChartConfiguration } from "chart.js"; import { Utility } from "../../shared/utility"; +import { BrowserDataService } from "../../../app/shared/browser-data.service"; @Component({ selector: "pydt-turn-length-chart", @@ -20,6 +21,12 @@ export class TurnLengthChartComponent implements OnChanges { animation: false, }; + isBrowser = false; + + constructor(browserData: BrowserDataService) { + this.isBrowser = browserData.isBrowser(); + } + ngOnChanges(): void { const turnLengthColors = [ "#00FF00",