Skip to content

Commit

Permalink
Merge pull request payara#4442 from bbulk/issue-4169
Browse files Browse the repository at this point in the history
fixes issue payara#4169 - Display node uptime in a human readable format
  • Loading branch information
smillidge authored Feb 8, 2020
2 parents 58b01f7 + 3aa66dc commit 1aee9ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@
<sun:staticText id="statusReason" text="#{pageSession.statusReason}" />
</sun:property>
<sun:property id="uptimeProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18ncs.cluster.Uptime}:" >
<sun:staticText id="uptime" text="#{pageSession.statusUptime} (ms)" />
<!beforeCreate
convertMillisToReadable(milliseconds="#{pageSession.statusUptime}"
readableString=>$attribute{formattedUpTime});
/>
<sun:staticText id="uptime" text="#{formattedUpTime}" />
</sun:property>
<sun:property id="deploymentGroupProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18ncs.cluster.DeploymentGroup}:" >
<sun:staticText id="deploymentGRoup" text="#{pageSession.statusDG}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public static void convertMillisToReadable(HandlerContext handlerCtx) {

String readableString = "";

long msecLeftover = milliseconds;
long msecLeftover = milliseconds != null ? milliseconds : 0L;

long numWeeks = msecLeftover / MSEC_PER_WEEK;
msecLeftover -= numWeeks * MSEC_PER_WEEK;
Expand Down

0 comments on commit 1aee9ce

Please sign in to comment.