Skip to content
Snippets Groups Projects
Commit 1d0f9484 authored by ddamiron's avatar ddamiron
Browse files

add data-log service

parent 29fab596
No related branches found
No related tags found
6 merge requests!10New updated datalog,!9add all datalog components and services into angular gui,!8update Datalog research input,!4Add logs pannels to updated admin gui,!7Datalog research input,!14Version 1.3.0
import { Injectable } from '@angular/core';
import { Observable, Subject, from } from 'rxjs';
import { map, concatMap } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
import { Resource, IResource, ResourceRO, IResourceFormat } from '../models/resource.model';
import { APP_CONFIG } from './app-config.service';
@Injectable()
export class DataLogsService {
resourceServiceUrl: string;
limit: number;
pageNumber: number;
sortOptions: {
value: string,
order: string,
};
private _searchChangeSubject: Subject<any>;
constructor(
private _httpClient: HttpClient) {
this.resourceServiceUrl = `${APP_CONFIG.restHeartAggregations.url}uuidToSessionId?avars=`;
this._searchChangeSubject = new Subject<any>();
this.limit = 10;
this.pageNumber = 1;
}
uuidToSessionId(uuid): Observable<any[]> {
const query = { uuid : uuid };
const stringQuery = JSON.stringify(query);
return this._httpClient.get<any[]>(this.resourceServiceUrl + stringQuery).pipe(
map((response) => {
return response;
}),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment