sensu-dashboard icon indicating copy to clipboard operation
sensu-dashboard copied to clipboard

Timestamp format in Event Detail View

Open windowsrefund opened this issue 12 years ago • 10 comments

Currently, timestamps are stored in Redis and displayed as follows:

Timestamp 1357832605

Perhaps dashboard could convert it to a more user-friendly format?

windowsrefund avatar Jan 10 '13 15:01 windowsrefund

Displaying an ISO8601 (UTC) formatted timestamp would be great. I've labelled this issue as a Feature.

portertech avatar Mar 25 '13 17:03 portertech

Any progress on this?

anjo avatar Sep 05 '13 19:09 anjo

Can you please add something like:

event.coffee initialize: -> ... @set issued: new Date(@get("issued")*1000)

client.coffee: initialize: -> @set timestamp: new Date(@get("timestamp")*1000)

so that the display is at least halfway useful? And don't use UTC unless you are totally sure that it's more useful that local date (of the client).

anjo avatar Sep 05 '13 19:09 anjo

Patches welcome!

On Thu, Sep 5, 2013 at 12:43 PM, anjo [email protected] wrote:

Can you please add something like:

event.coffee initialize: -> ... @set https://github.com/set issued: new Date(@get https://github.com/get("issued")*1000)

client.coffee: initialize: -> @set https://github.com/set timestamp: new Date(@get https://github.com/get("timestamp")*1000)

so that the display is at least halfway useful? And don't use UTC unless you are totally sure that it's more useful that local date (of the client).

— Reply to this email directly or view it on GitHubhttps://github.com/sensu/sensu-dashboard/issues/88#issuecomment-23895936 .

Nick Stielau 206-245-7991

nstielau avatar Sep 05 '13 20:09 nstielau

In theory yes, but I don't know the first thing about coffescript (apart from that I don't like the general idea that much).

I also don't know if the date is correctly displayed for other users - it is for me, but my servers are in the same TZ as my client.

So while the above fixed the issues for me, I have no idea if that's the actually correct way. But I do know that it now looks at least halfway usable for me. So please enter the two lines yourself after reviewing they are ok. I fixed it in my local installation which I probably won't update for some time, so I won't benefit anyway.

Again: if this were a normal project, I'd fork it and make a pull request but here I don't feel that qualified.

anjo avatar Sep 06 '13 10:09 anjo

ps: the "https://github.com/set" is a github thing added into my message?

anjo avatar Sep 06 '13 10:09 anjo

+1 on user friendly format :)

damienjoldersma avatar Dec 18 '13 22:12 damienjoldersma

any progress on this?

MrPink avatar Jan 29 '14 09:01 MrPink

+1 on user-friendly format

bombergio avatar Feb 22 '14 14:02 bombergio

Just PR'd some changes that add formatting for timestamps in ISO8601 format. See #163.

amdprophet avatar Mar 05 '14 02:03 amdprophet