Skip to content

Commit 2dc3129

Browse files
author
Rajkumar Balakrishnan
committed
Fetch AppInsights Key from API
1 parent bf54f0f commit 2dc3129

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

web/src/signalr-web/SignalRMiddleware/EventApp/src/app/configuration/configuration.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import { HttpClient } from '@angular/common/http';
55
export class ConfigurationService {
66

77
private configuration: IAppInsightsConfiguration;
8+
89
constructor(private http: HttpClient) { }
910

1011
loadConfig() {
11-
return this.http.get<IAppInsightsConfiguration>('/api/applicationsetting')
12+
return this.http.get<IAppInsightsConfiguration>('https://crwebsssrtmrepszkp.azurewebsites.net/api/applicationsetting')
1213
.toPromise()
1314
.then(result => {
1415
this.configuration = <IAppInsightsConfiguration>(result);

web/src/signalr-web/SignalRMiddleware/EventApp/src/app/services/app-insights.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { Injectable } from '@angular/core';
2-
import { environment } from '../../environments/environment';
32
import { AppInsights } from 'applicationinsights-js';
43
import { ConfigurationService} from '../../app/configuration/configuration.service';
54
@Injectable()
65
export class AppInsightsService {
76

8-
private config:Microsoft.ApplicationInsights.IConfig;
7+
private config:Microsoft.ApplicationInsights.IConfig={
8+
instrumentationKey:''
9+
}
910

1011
constructor(configuration: ConfigurationService) {
1112
this.config.instrumentationKey=configuration.appInsightsKey;

0 commit comments

Comments
 (0)