changeset 240:d2927fc17bd8

Fix jvm-info timestamp data format inconsistencies Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-October/025353.html
author Andrew Azores <aazores@redhat.com>
date Tue, 10 Oct 2017 15:21:45 -0400
parents 3757ec9994fa
children 522b92fe4541
files mock-api/endpoints/jvms.endpoint.js src/app/components/jvm-info/jvm-info.html
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mock-api/endpoints/jvms.endpoint.js	Wed Oct 11 10:36:40 2017 -0400
+++ b/mock-api/endpoints/jvms.endpoint.js	Tue Oct 10 15:21:45 2017 -0400
@@ -54,8 +54,9 @@
           agentId: 'foo-agentId',
           jvmId: req.params.jvmId,
           mainClass: 'c.r.t.A',
-          startTime: Date.now() - 5000000 + _.round(Math.random() * 1000000),
-          stopTime: -1,
+          startTime: { $numberLong: (Date.now() - 5000000 + _.round(Math.random() * 1000000)).toString() },
+          stopTime: { $numberLong: '-1' },
+          lastUpdated: { $numberLong: Date.now().toString() },
           isAlive: true,
           jvmPid: _.round(Math.random() * 2048) + 512,
           javaVersion: '1.9',
@@ -77,8 +78,7 @@
             }
           ],
           uid: _.floor(Math.random() * 800),
-          username: 'thermostat-user',
-          lastUpdated: Date.now().toString()
+          username: 'thermostat-user'
         }]
       }
     ));
--- a/src/app/components/jvm-info/jvm-info.html	Wed Oct 11 10:36:40 2017 -0400
+++ b/src/app/components/jvm-info/jvm-info.html	Tue Oct 10 15:21:45 2017 -0400
@@ -36,7 +36,7 @@
                 </tr>
                 <tr>
                   <td translate>jvmInfo.table.UID</td>
-                  <td>{{$ctrl.jvmInfo.uid}}</td>
+                  <td>{{$ctrl.jvmInfo.uid | metricToNumber }}</td>
                 </tr>
                 <tr>
                   <td translate>jvmInfo.table.JVM_ID</td>
@@ -48,15 +48,15 @@
                 </tr>
                 <tr>
                   <td translate>jvmInfo.table.START_TIME</td>
-                  <td>{{$ctrl.jvmInfo.startTime | date:"medium"}}</td>
+                  <td>{{$ctrl.jvmInfo.startTime | metricToNumber | date:"medium"}}</td>
                 </tr>
                 <tr ng-show="!$ctrl.jvmInfo.isAlive">
                   <td translate>jvmInfo.table.STOP_TIME</td>
-                  <td>{{$ctrl.jvmInfo.stopTime | date:"medium"}}</td>
+                  <td>{{$ctrl.jvmInfo.stopTime | metricToNumber | date:"medium"}}</td>
                 </tr>
                 <tr ng-show="$ctrl.jvmInfo.isAlive">
                   <td translate>jvmInfo.table.LAST_UPDATED</td>
-                  <td>{{$ctrl.jvmInfo.lastUpdated | date:"medium"}}</td>
+                  <td>{{$ctrl.jvmInfo.lastUpdated | metricToNumber | date:"medium"}}</td>
                 </tr>
                 <tr>
                   <td translate>jvmInfo.table.JVM_PID</td>