]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: replace hard coded telemetry URLs 35231/head
authorTatjana Dehler <tdehler@suse.com>
Thu, 7 May 2020 13:59:08 +0000 (15:59 +0200)
committerTatjana Dehler <tdehler@suse.com>
Mon, 25 May 2020 11:53:35 +0000 (13:53 +0200)
Replace the hard coded telemetry URLs by the
actual config option values given by the cluster.

Fixes: https://tracker.ceph.com/issues/45319
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
(cherry picked from commit 9735947b4c159aec616493021cc2a39049418dc1)

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts

index 8d02a031a24a8c39c9227287e6b1873dc1a456ee..748ffd4231c14397833221229783f97a7dc45fcf 100644 (file)
@@ -25,7 +25,8 @@
               The data being reported does <b>not</b> contain any sensitive data like pool names, object names, object contents,
               hostnames, or device serial numbers. It contains counters and statistics on how the cluster has been
               deployed, the version of Ceph, the distribution of the hosts and other parameters which help the project
-              to gain a better understanding of the way Ceph is used. The data is sent secured to https://telemetry.ceph.com.</p>
+              to gain a better understanding of the way Ceph is used. The data is sent secured to {{ sendToUrl }} and
+              {{ sendToDeviceUrl }} (device report).</p>
             <div *ngIf="moduleEnabled">
               The plugin is already <b>enabled</b>. Click <b>Deactivate</b> to disable it.&nbsp;
               <button type="button"
index b258d2c18696d3713b9d7c2cc95e0d2d428e31f1..4d41878c5144b773707d263ba9c5847ade2b1c99 100644 (file)
@@ -44,6 +44,8 @@ export class TelemetryComponent implements OnInit {
   ];
   report: object = undefined;
   reportId: number = undefined;
+  sendToUrl = '';
+  sendToDeviceUrl = '';
   step = 1;
 
   constructor(
@@ -64,9 +66,12 @@ export class TelemetryComponent implements OnInit {
     ];
     observableForkJoin(observables).subscribe(
       (resp: object) => {
-        this.moduleEnabled = resp[1]['enabled'];
+        const configResp = resp[1];
+        this.moduleEnabled = configResp['enabled'];
+        this.sendToUrl = configResp['url'];
+        this.sendToDeviceUrl = configResp['device_url'];
         this.options = _.pick(resp[0], this.requiredFields);
-        const configs = _.pick(resp[1], this.requiredFields);
+        const configs = _.pick(configResp, this.requiredFields);
         this.createConfigForm();
         this.configForm.setValue(configs);
         this.loading = false;