File

src/app/shared/api/configuration.service.ts

Index

Methods

Constructor

constructor(http: HttpClient)
Parameters :
Name Type Optional
http HttpClient No

Methods

bulkCreate
bulkCreate(configOptions: Object)
Parameters :
Name Type Optional
configOptions Object No
Returns : any
create
create(configOption: ConfigFormCreateRequestModel)
Parameters :
Name Type Optional
configOption ConfigFormCreateRequestModel No
Returns : any
get
get(configOption: string)
Parameters :
Name Type Optional
configOption string No
Returns : any
getConfigData
getConfigData()
Returns : any
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

import { ConfigFormCreateRequestModel } from '../../ceph/cluster/configuration/configuration-form/configuration-form-create-request.model';
import { ApiModule } from './api.module';

@Injectable({
  providedIn: ApiModule
})
export class ConfigurationService {
  constructor(private http: HttpClient) {}

  getConfigData() {
    return this.http.get('api/cluster_conf/');
  }

  get(configOption: string) {
    return this.http.get(`api/cluster_conf/${configOption}`);
  }

  create(configOption: ConfigFormCreateRequestModel) {
    return this.http.post('api/cluster_conf/', configOption);
  }

  bulkCreate(configOptions: Object) {
    return this.http.put('api/cluster_conf', configOptions);
  }
}

result-matching ""

    No results matching ""