sensu / sensu-dashboard

A dashboard for Sensu, for displaying & managing events & clients.
http://sensuapp.org
MIT License
96 stars 44 forks source link

Timestamp format in Event Detail View #88

Open windowsrefund opened 11 years ago

windowsrefund commented 11 years ago

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

Timestamp 1357832605

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

portertech commented 11 years ago

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

anjo commented 10 years ago

Any progress on this?

anjo commented 10 years ago

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).

nstielau commented 10 years ago

Patches welcome!

On Thu, Sep 5, 2013 at 12:43 PM, anjo notifications@github.com 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

anjo commented 10 years ago

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 commented 10 years ago

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

damienjoldersma commented 10 years ago

+1 on user friendly format :)

MrPink commented 10 years ago

any progress on this?

bombergio commented 10 years ago

+1 on user-friendly format

amdprophet commented 10 years ago

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