]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/dashboard-time-selector/dashboard-time-selector.component.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / dashboard-v3 / dashboard-time-selector / dashboard-time-selector.component.ts
index 3b0915232b665648cd791c380675ec81c662a82d..9e368efc7f0c90d7ef71841f7ea32e1b1ca66cc1 100644 (file)
@@ -26,35 +26,27 @@ export class DashboardTimeSelectorComponent {
       },
       {
         name: $localize`Last 30 minutes`,
-        value: this.timeToDate(30 * 60, 6)
+        value: this.timeToDate(30 * 60, 7)
       },
       {
         name: $localize`Last 1 hour`,
-        value: this.timeToDate(3600, 12)
+        value: this.timeToDate(3600, 14)
       },
       {
         name: $localize`Last 3 hours`,
-        value: this.timeToDate(3 * 3600, 36)
+        value: this.timeToDate(3 * 3600, 42)
       },
       {
         name: $localize`Last 6 hours`,
-        value: this.timeToDate(6 * 3600, 72)
+        value: this.timeToDate(6 * 3600, 84)
       },
       {
         name: $localize`Last 12 hours`,
-        value: this.timeToDate(12 * 3600, 144)
+        value: this.timeToDate(12 * 3600, 168)
       },
       {
         name: $localize`Last 24 hours`,
-        value: this.timeToDate(24 * 3600, 288)
-      },
-      {
-        name: $localize`Last 2 days`,
-        value: this.timeToDate(48 * 3600, 576)
-      },
-      {
-        name: $localize`Last 7 days`,
-        value: this.timeToDate(168 * 3600, 2016)
+        value: this.timeToDate(24 * 3600, 336)
       }
     ];
     this.time = this.times[3].value;
@@ -64,7 +56,7 @@ export class DashboardTimeSelectorComponent {
     this.selectedTime.emit(this.timeToDate(this.time.end - this.time.start, this.time.step));
   }
 
-  private timeToDate(secondsAgo: number, step: number): any {
+  public timeToDate(secondsAgo: number, step: number): any {
     const date: number = moment().unix() - secondsAgo;
     const dateNow: number = moment().unix();
     const formattedDate: any = {