]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: replace hard coded telemetry URLs 34953/head
authorTatjana Dehler <tdehler@suse.com>
Thu, 7 May 2020 13:59:08 +0000 (15:59 +0200)
committerTatjana Dehler <tdehler@suse.com>
Mon, 11 May 2020 08:26:03 +0000 (10:26 +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>
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 af7eacd4ff9b3b98c55c5adb7527aa1c953e4743..d9ec0e4f8ec142ffef88a73034650199eee5dc15 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;