Add agentNames to the endpoint index
This commit is contained in:
@@ -1919,7 +1919,7 @@ export class DataClient extends AuthorizedApiBase {
|
||||
return Promise.resolve<AgentIndexViewModel>(null as any);
|
||||
}
|
||||
|
||||
data_GetAgentIndexPaginated(timeFilter: string | null | undefined, page: number | undefined, pageSize: number | undefined, sortBy: string | null | undefined, sortOrder: string | null | undefined): Promise<PaginatedAgentIndexResponse> {
|
||||
data_GetAgentIndexPaginated(timeFilter: string | null | undefined, page: number | undefined, pageSize: number | undefined, sortBy: string | null | undefined, sortOrder: string | null | undefined, agentNames: string | null | undefined): Promise<PaginatedAgentIndexResponse> {
|
||||
let url_ = this.baseUrl + "/Data/GetAgentIndexPaginated?";
|
||||
if (timeFilter !== undefined && timeFilter !== null)
|
||||
url_ += "timeFilter=" + encodeURIComponent("" + timeFilter) + "&";
|
||||
@@ -1935,6 +1935,8 @@ export class DataClient extends AuthorizedApiBase {
|
||||
url_ += "sortBy=" + encodeURIComponent("" + sortBy) + "&";
|
||||
if (sortOrder !== undefined && sortOrder !== null)
|
||||
url_ += "sortOrder=" + encodeURIComponent("" + sortOrder) + "&";
|
||||
if (agentNames !== undefined && agentNames !== null)
|
||||
url_ += "agentNames=" + encodeURIComponent("" + agentNames) + "&";
|
||||
url_ = url_.replace(/[?&]$/, "");
|
||||
|
||||
let options_: RequestInit = {
|
||||
@@ -2060,8 +2062,8 @@ export class DataClient extends AuthorizedApiBase {
|
||||
return Promise.resolve<BestAgentsResponse>(null as any);
|
||||
}
|
||||
|
||||
data_GetAgentStatuses(): Promise<AgentStatusResponse[]> {
|
||||
let url_ = this.baseUrl + "/Data/GetAgentStatuses";
|
||||
data_GetOnlineAgent(): Promise<string[]> {
|
||||
let url_ = this.baseUrl + "/Data/GetOnlineAgent";
|
||||
url_ = url_.replace(/[?&]$/, "");
|
||||
|
||||
let options_: RequestInit = {
|
||||
@@ -2074,17 +2076,17 @@ export class DataClient extends AuthorizedApiBase {
|
||||
return this.transformOptions(options_).then(transformedOptions_ => {
|
||||
return this.http.fetch(url_, transformedOptions_);
|
||||
}).then((_response: Response) => {
|
||||
return this.processData_GetAgentStatuses(_response);
|
||||
return this.processData_GetOnlineAgent(_response);
|
||||
});
|
||||
}
|
||||
|
||||
protected processData_GetAgentStatuses(response: Response): Promise<AgentStatusResponse[]> {
|
||||
protected processData_GetOnlineAgent(response: Response): Promise<string[]> {
|
||||
const status = response.status;
|
||||
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
||||
if (status === 200) {
|
||||
return response.text().then((_responseText) => {
|
||||
let result200: any = null;
|
||||
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AgentStatusResponse[];
|
||||
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as string[];
|
||||
return result200;
|
||||
});
|
||||
} else if (status !== 200 && status !== 204) {
|
||||
@@ -2092,7 +2094,7 @@ export class DataClient extends AuthorizedApiBase {
|
||||
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
||||
});
|
||||
}
|
||||
return Promise.resolve<AgentStatusResponse[]>(null as any);
|
||||
return Promise.resolve<string[]>(null as any);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4509,6 +4511,7 @@ export interface PaginatedAgentIndexResponse {
|
||||
timeFilter?: string | null;
|
||||
sortBy?: string | null;
|
||||
sortOrder?: string | null;
|
||||
filteredAgentNames?: string | null;
|
||||
}
|
||||
|
||||
export interface AgentBalanceHistory {
|
||||
@@ -4533,16 +4536,6 @@ export interface BestAgentsResponse {
|
||||
totalPages?: number;
|
||||
}
|
||||
|
||||
export interface AgentStatusResponse {
|
||||
agentName?: string | null;
|
||||
status?: AgentStatus;
|
||||
}
|
||||
|
||||
export enum AgentStatus {
|
||||
Offline = "Offline",
|
||||
Online = "Online",
|
||||
}
|
||||
|
||||
export interface ScenarioViewModel {
|
||||
name: string;
|
||||
indicators: IndicatorViewModel[];
|
||||
|
||||
@@ -999,6 +999,7 @@ export interface PaginatedAgentIndexResponse {
|
||||
timeFilter?: string | null;
|
||||
sortBy?: string | null;
|
||||
sortOrder?: string | null;
|
||||
filteredAgentNames?: string | null;
|
||||
}
|
||||
|
||||
export interface AgentBalanceHistory {
|
||||
@@ -1023,16 +1024,6 @@ export interface BestAgentsResponse {
|
||||
totalPages?: number;
|
||||
}
|
||||
|
||||
export interface AgentStatusResponse {
|
||||
agentName?: string | null;
|
||||
status?: AgentStatus;
|
||||
}
|
||||
|
||||
export enum AgentStatus {
|
||||
Offline = "Offline",
|
||||
Online = "Online",
|
||||
}
|
||||
|
||||
export interface ScenarioViewModel {
|
||||
name: string;
|
||||
indicators: IndicatorViewModel[];
|
||||
|
||||
Reference in New Issue
Block a user