File tree Expand file tree Collapse file tree 4 files changed +9
-17
lines changed
web/src/signalr-web/SignalRMiddleware/EventApp/src Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export class ConfigurationService {
15
15
} , error => console . error ( error ) ) ;
16
16
}
17
17
18
- get apiAddress ( ) {
18
+ get appInsightsKey ( ) {
19
19
return this . configuration . key ;
20
20
}
21
21
Original file line number Diff line number Diff line change 1
1
import { Injectable } from '@angular/core' ;
2
2
import { environment } from '../../environments/environment' ;
3
3
import { AppInsights } from 'applicationinsights-js' ;
4
-
4
+ import { ConfigurationService } from '../../app/configuration/configuration.service' ;
5
5
@Injectable ( )
6
6
export class AppInsightsService {
7
7
8
- private config :Microsoft . ApplicationInsights . IConfig = {
9
- instrumentationKey : environment . appInsights . instrumentationKey
10
- }
11
- constructor ( ) {
8
+ private config :Microsoft . ApplicationInsights . IConfig ;
9
+
10
+ constructor ( configuration : ConfigurationService ) {
11
+ this . config . instrumentationKey = configuration . appInsightsKey ;
12
12
if ( ! AppInsights . config ) {
13
13
AppInsights . downloadAndSetup ( this . config ) ;
14
14
}
Original file line number Diff line number Diff line change 1
- import { ConfigurationService } from '../app/configuration/configuration.service'
2
-
3
1
export const environment = {
4
- production : true ,
5
- appInsights : {
6
- instrumentationKey : "" /*The web middleware should return the key to the Angular Environment*/
7
- }
2
+ production : true
8
3
} ;
Original file line number Diff line number Diff line change 4
4
// The list of which env maps to which file can be found in `.angular-cli.json`.
5
5
6
6
export const environment = {
7
- production : false ,
8
- appInsights : {
9
- instrumentationKey : "3e0ab8f5-c675-448c-8a15-08ba5ec45317"
10
- }
11
- } ;
7
+ production : false
8
+ } ;
You can’t perform that action at this time.
0 commit comments