src/app/shared/api/mgr-module.service.ts
Properties |
|
Methods |
constructor(http: HttpClient)
|
||||||
Defined in src/app/shared/api/mgr-module.service.ts:12
|
||||||
Parameters :
|
disable | ||||||||
disable(module: string)
|
||||||||
Defined in src/app/shared/api/mgr-module.service.ts:55
|
||||||||
Disable the Ceph Mgr module.
Parameters :
Returns :
any
|
enable | ||||||||
enable(module: string)
|
||||||||
Defined in src/app/shared/api/mgr-module.service.ts:47
|
||||||||
Enable the Ceph Mgr module.
Parameters :
Returns :
any
|
getConfig | ||||||||
getConfig(module: string)
|
||||||||
Defined in src/app/shared/api/mgr-module.service.ts:29
|
||||||||
Get the Ceph Mgr module configuration.
Parameters :
Returns :
Observable<Object>
|
getOptions | ||||||||
getOptions(module: string)
|
||||||||
Defined in src/app/shared/api/mgr-module.service.ts:64
|
||||||||
Get the Ceph Mgr module options.
Parameters :
Returns :
Observable<Object>
|
list |
list()
|
Defined in src/app/shared/api/mgr-module.service.ts:20
|
Get the list of Ceph Mgr modules and their state (enabled/disabled).
Returns :
Observable<Object[]>
|
updateConfig | ||||||||||||
updateConfig(module: string, config: Object)
|
||||||||||||
Defined in src/app/shared/api/mgr-module.service.ts:39
|
||||||||||||
Update the Ceph Mgr module configuration.
Parameters :
Returns :
Observable<Object>
|
Private url |
Type : string
|
Default value : 'api/mgr/module'
|
Defined in src/app/shared/api/mgr-module.service.ts:12
|
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { ApiModule } from './api.module';
@Injectable({
providedIn: ApiModule
})
export class MgrModuleService {
private url = 'api/mgr/module';
constructor(private http: HttpClient) {}
/**
* Get the list of Ceph Mgr modules and their state (enabled/disabled).
* @return {Observable<Object[]>}
*/
list(): Observable<Object[]> {
return this.http.get<Object[]>(`${this.url}`);
}
/**
* Get the Ceph Mgr module configuration.
* @param {string} module The name of the mgr module.
* @return {Observable<Object>}
*/
getConfig(module: string): Observable<Object> {
return this.http.get(`${this.url}/${module}`);
}
/**
* Update the Ceph Mgr module configuration.
* @param {string} module The name of the mgr module.
* @param {object} config The configuration.
* @return {Observable<Object>}
*/
updateConfig(module: string, config: Object): Observable<Object> {
return this.http.put(`${this.url}/${module}`, { config: config });
}
/**
* Enable the Ceph Mgr module.
* @param {string} module The name of the mgr module.
*/
enable(module: string) {
return this.http.post(`${this.url}/${module}/enable`, null);
}
/**
* Disable the Ceph Mgr module.
* @param {string} module The name of the mgr module.
*/
disable(module: string) {
return this.http.post(`${this.url}/${module}/disable`, null);
}
/**
* Get the Ceph Mgr module options.
* @param {string} module The name of the mgr module.
* @return {Observable<Object>}
*/
getOptions(module: string): Observable<Object> {
return this.http.get(`${this.url}/${module}/options`);
}
}