mirror of
https://github.com/bec-project/bec_atlas.git
synced 2025-07-13 22:51:49 +02:00
wip
This commit is contained in:
@ -104,47 +104,6 @@ export class AuthDataService extends RemoteDataService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class ScanDataService extends RemoteDataService {
|
|
||||||
/**
|
|
||||||
* Method for getting the scan data
|
|
||||||
* @param sessionId Unique identifier for the session
|
|
||||||
* @param offset Pagination offset (default = 0)
|
|
||||||
* @param limit Number of records to retrieve (default = 100)
|
|
||||||
* @param fields List of fields to include in the response
|
|
||||||
* @param includeUserData Whether to include user-related data
|
|
||||||
* @param sort Sort order for the records as a dictionary
|
|
||||||
* @returns response from the server with the scan data
|
|
||||||
* @throws HttpErrorResponse if the request fails
|
|
||||||
* @throws TimeoutError if the request takes too long
|
|
||||||
*/
|
|
||||||
getScanData(
|
|
||||||
sessionId: string,
|
|
||||||
offset: number = 0,
|
|
||||||
limit: number = 100,
|
|
||||||
fields: Array<string> | null = null,
|
|
||||||
includeUserData: boolean = false,
|
|
||||||
sort: { [key: string]: number } | null = null
|
|
||||||
) {
|
|
||||||
let headers = new HttpHeaders();
|
|
||||||
headers = headers.set('Content-Type', 'application/json; charset=utf-8');
|
|
||||||
return this.get<Array<ScanDataResponse>>(
|
|
||||||
'scans/session',
|
|
||||||
{
|
|
||||||
session_id: sessionId,
|
|
||||||
offset: offset.toString(),
|
|
||||||
limit: limit.toString(),
|
|
||||||
fields: fields ? fields : '',
|
|
||||||
sort: sort ? JSON.stringify(sort) : '',
|
|
||||||
includeUserData: includeUserData.toString(),
|
|
||||||
},
|
|
||||||
headers
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
@ -184,7 +143,42 @@ export class DeploymentDataService extends RemoteDataService {
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class ScanCountService extends RemoteDataService {
|
export class ScanDataService extends RemoteDataService {
|
||||||
|
/**
|
||||||
|
* Method for getting the scan data
|
||||||
|
* @param sessionId Unique identifier for the session
|
||||||
|
* @param offset Pagination offset (default = 0)
|
||||||
|
* @param limit Number of records to retrieve (default = 100)
|
||||||
|
* @param fields List of fields to include in the response
|
||||||
|
* @param includeUserData Whether to include user-related data
|
||||||
|
* @param sort Sort order for the records as a dictionary
|
||||||
|
* @returns response from the server with the scan data
|
||||||
|
* @throws HttpErrorResponse if the request fails
|
||||||
|
* @throws TimeoutError if the request takes too long
|
||||||
|
*/
|
||||||
|
getScanData(
|
||||||
|
sessionId: string,
|
||||||
|
offset: number = 0,
|
||||||
|
limit: number = 100,
|
||||||
|
fields: Array<string> | null = null,
|
||||||
|
includeUserData: boolean = false,
|
||||||
|
sort: { [key: string]: number } | null = null
|
||||||
|
) {
|
||||||
|
let headers = new HttpHeaders();
|
||||||
|
headers = headers.set('Content-Type', 'application/json; charset=utf-8');
|
||||||
|
return this.get<Array<ScanDataResponse>>(
|
||||||
|
'scans/session',
|
||||||
|
{
|
||||||
|
session_id: sessionId,
|
||||||
|
offset: offset.toString(),
|
||||||
|
limit: limit.toString(),
|
||||||
|
fields: fields ? fields : '',
|
||||||
|
sort: sort ? JSON.stringify(sort) : '',
|
||||||
|
includeUserData: includeUserData.toString(),
|
||||||
|
},
|
||||||
|
headers
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Method for getting the scan count
|
* Method for getting the scan count
|
||||||
* @param sessionId Unique identifier for the session (Optional)
|
* @param sessionId Unique identifier for the session (Optional)
|
||||||
|
Reference in New Issue
Block a user