]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/crush-rule.service.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / crush-rule.service.ts
index 506fa23d4e62fe24507daccd55676dc4b4b36b30..e4e7bb6054045780c70039052b7ac61117464019 100644 (file)
@@ -1,25 +1,22 @@
 import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 
-import { I18n } from '@ngx-translate/i18n-polyfill';
-
 import { CrushRuleConfig } from '../models/crush-rule';
-import { ApiModule } from './api.module';
 
 @Injectable({
-  providedIn: ApiModule
+  providedIn: 'root'
 })
 export class CrushRuleService {
   apiPath = 'api/crush_rule';
 
   formTooltips = {
     // Copied from /doc/rados/operations/crush-map.rst
-    root: this.i18n(`The name of the node under which data should be placed.`),
-    failure_domain: this.i18n(`The type of CRUSH nodes across which we should separate replicas.`),
-    device_class: this.i18n(`The device class data should be placed on.`)
+    root: $localize`The name of the node under which data should be placed.`,
+    failure_domain: $localize`The type of CRUSH nodes across which we should separate replicas.`,
+    device_class: $localize`The device class data should be placed on.`
   };
 
-  constructor(private http: HttpClient, private i18n: I18n) {}
+  constructor(private http: HttpClient) {}
 
   create(rule: CrushRuleConfig) {
     return this.http.post(this.apiPath, rule, { observe: 'response' });