import { Injectable , Output , EventEmitter } from '@angular/core' ; import { Observable , BehaviorSubject } from 'rxjs' ; import { ApiService } from './api.service' ; @ Injectable ( ) export class DashboardService extends ApiService { private route = '/dashboard/' ; private routeDataManager = '/database-manager' ; public _notSaved = new BehaviorSubject < boolean > ( false ) ; public notSaved = this . _notSaved . asObservable ( ) ; getDashboards ( ) { return this . get ( this . route ) ; } getDashboard ( id ) { return this . get ( `${ this . route }${ id }` ) ; } addNewDashboard ( dashboard ) { return this . post ( this . route , dashboard ) ; } updateDashboard ( id , body ) { return this . put ( `${ this . route }${ id }` , body ) ; } deleteDashboard ( id ) { return this . delete ( `${ this . route }${ id }` ) ; } executeQuery ( body ) { return this . post ( `${ this . route }query` , body ) ; } executeSqlQuery ( body ) { return this . post ( `${ this . route }sql-query` , body ) ; } executeView ( body ) { return this . post ( `${ this . route }view-query` , body ) ; } getBuildedQuery ( body ) { return this . post ( `${ this . route }getQuey` , body ) ; } cleanCache ( body ) { return this . post ( `${ this . route }clean-refresh` , body ) ; } }