Skip to content

Commit

Permalink
env const added for infra proxy url
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Bachhav <[email protected]>
  • Loading branch information
sachin-msys committed Jan 3, 2020
1 parent f37785b commit 610144c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ export class ServerRequests {
constructor(private http: HttpClient) { }

public getServers(): Observable<ServersResponse> {
return this.http.get<ServersResponse>(`${env.gateway_url}/infra_proxy/servers`);
return this.http.get<ServersResponse>(`${env.infra_proxy_url}/servers`);
}

public getServer(id: string): Observable<ServerResponse> {
return this.http.get<ServerResponse>(`${env.gateway_url}/infra_proxy/servers/${id}`);
return this.http.get<ServerResponse>(`${env.infra_proxy_url}/servers/${id}`);
}

public createServer(serverData: CreateServerPayload): Observable<ServerResponse> {
return this.http.post<ServerResponse>(
`${env.gateway_url}/infra_proxy/servers`, mapKeys(snakeCase, serverData));
`${env.infra_proxy_url}/servers`, mapKeys(snakeCase, serverData));
}

public updateServer(server: Server): Observable<ServerSuccessPayload> {
return this.http.put<ServerSuccessPayload>(
`${env.gateway_url}/infra_proxy/servers/${server.id}`, server);
`${env.infra_proxy_url}/servers/${server.id}`, server);
}

public deleteServer(id: string): Observable<ServerResponse> {
return this.http.delete<ServerResponse>(`${env.gateway_url}/infra_proxy/servers/${id}`);
return this.http.delete<ServerResponse>(`${env.infra_proxy_url}/servers/${id}`);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const environment = {
config_mgmt_url: '/api/v0/cfgmgmt',
retention_url: '/api/v0/retention',
ingest_url: '/api/v0/ingest',
infra_proxy_url: '/api/v0/infra',
deployment_url: '/api/v0/deployment',
gateway_url: '/api/v0',
// TODO:eng-ex remove elasticsearch_url when all es requests go through config-mgmt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const environment = {
config_mgmt_url: '/api/v0/cfgmgmt',
retention_url: '/api/v0/retention',
ingest_url: '/api/v0/ingest',
infra_proxy_url: '/api/v0/infra',
deployment_url: '/api/v0/deployment',
gateway_url: '/api/v0',
elasticsearch_url: '/api/v0/elasticsearch',
Expand Down
1 change: 1 addition & 0 deletions components/automate-ui/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const environment = {
retention_url: '/api/v0/retention',
ingest_url: '/api/v0/ingest',
deployment_url: '/api/v0/deployment',
infra_proxy_url: '/api/v0/infra',
gateway_url: '/api/v0',
// TODO:eng-ex remove elasticsearch_url when all es requests go through config-mgmt
// don't forget to remove it from the proxy
Expand Down

0 comments on commit 610144c

Please sign in to comment.