Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #2119] add javascript to refresh page/pause easier #797

Closed
icinga-migration opened this issue Nov 24, 2011 · 39 comments
Closed

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2119

Created by mzac on 2011-11-24 14:33:51 +00:00

Assignee: ricardo
Status: Resolved (closed on 2012-05-05 10:01:15 +00:00)
Target Version: 1.7
Last Update: 2014-12-08 09:32:51 +00:00 (in Redmine)


When in the host/services list and you click on the check boxes on the right and then the screen refreshes (if you didn't click on pause) then you loose all your check boxes.

It would be interesting if when clicking on the check box that the interfaces pauses automatically or you can set a timer longer than the default of 30 seconds, say 1 minute.

Attachments

Changesets

2012-03-09 17:44:58 +00:00 by ricardo 0bb8178

classic ui: add javascript to refresh page/pause easier #2119

refs: #2119

* no reload necessary to pause refresh
* selecting item in status.cgi/extinfo.cgi resets' refresh counter
* added cgi config option to choose between http header refresh and
  javascript refresh
* live "countdown"

2012-03-12 20:47:45 +00:00 by ricardo 14dddd9

classic ui: fixed up some refresh problems with javascript #2119

refs: #2119

* tac header now refreshed with javascript to
* changed javascript refresh method

2012-04-13 18:48:07 +00:00 by ricardo 7b9ec5b

classic-ui: updated Changelog CHANGES section

refs: #1524
refs: #1981
refs: #2018
refs: #2117
refs: #2119
refs: #2145
refs: #2198
refs: #2343
refs: #2359
refs: #2373
refs: #2421

hope the "changes" section for classic ui isn't tooo long

2012-05-02 10:53:53 +00:00 by ricardo 784e3ff

classic-ui: changed javascript refresh look #2119

refs: #2119

* handle line breaks in status.cgi better
* added reload icon
* added javascript helper functions

2012-05-08 15:34:50 +00:00 by ricardo d6cbaa9

classic-ui: fixed resetting counter when selecting checkbox #2119

refs: #2119

Relations:

@icinga-migration
Copy link
Author

Updated by mjbrooks on 2011-12-04 10:49:30 +00:00

That's a very good point on the behavior.

I fear programming the solution won't be as straightforward if I recall the pause mechanics correctly.

That said, the default refresh is 90 seconds and it can be changed globally in cgi.cfg. Although, you would still have the same issue whenever the time threshold you set is crossed.

@icinga-migration
Copy link
Author

Updated by ricardo on 2011-12-08 14:59:21 +00:00

That's a good idea.

At the moment the refresh is done vie HTTP headers. This way we can't change the timeout for the current page.

Already had a look at it and found a way to do the refresh with javascript. There I could readjust the timeout and delete (pause from reload) the timeout.

Important to know would be: how reliable on reloading is this solution?

Think a config option for a fallback to refresh with HTTP header would be the way to go.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-03-09 17:55:40 +00:00

  • Subject changed from Pause timer on host/service selection to add javascript to refresh page/pause easier
  • Status changed from New to Feedback
  • Assigned to set to ricardo
  • Target Version set to 1.7
  • Done % changed from 0 to 90

commit message:

    * no reload necessary to pause refresh
    * selecting item in status.cgi/extinfo.cgi resets' refresh counter
    * added cgi config option to choose between http header refresh and
      javascript refresh
    * live "countdown

in current "rbartels/cgi". please test

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-03-11 14:09:25 +00:00

  • File added icinga_cgis_1.7.0_refresh_timer.png

looks nice. would that be possible for the tac_header as well? we do have problems with the meta refresh within the frameset, causing shib sessions to get stale on timeout.

icinga_cgis_1.7.0_refresh_timer.png

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-03-11 16:10:15 +00:00

you mean a little counter in tac header?

@icinga-migration
Copy link
Author

Updated by mzac on 2012-03-11 16:52:30 +00:00

A counter sounds like a good idea! maybe with an 'update now' button next to it too?

ricardo wrote:

you mean a little counter in tac header?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-03-11 18:48:58 +00:00

no counter. just refresh the tac header with javascript as well, instead of the meta refresh.
a counter plus text is problematic on wrapped views on 1024x768 resolution...

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-03-11 23:52:35 +00:00

now tac header also get's refreshed via javascript.

check 'rbartels/cgi'.

This needs proper testing, to see if there will be situations where the site won't refresh. Had some problems with safari earlier and then I changed the Javascript reload method. Looks better now.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-03-12 20:49:39 +00:00

  • File added punch.jpg

Had to change reload method again.

scumbag browser vendors!

punch.jpg

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-03 08:44:51 +00:00

  • File added icinga_classicui_refresh_broken_01.png
  • File added icinga_classicui_refresh_broken_02.png

hm. chromium 17.0.963.79 (Developer Build 125985 Linux)

tests within frameset

first reload takes 20sec, leaving many items. could be my browser/connection too.

icinga_classicui_refresh_broken_01.png

second reload moans about the javascript command dropdown.

icinga_classicui_refresh_broken_02.png

after that reload it takes again 20sec to refresh plus load. the command dropdown is still missing.

when i finally hit F5 on the frameset, everything works fine afterwards.

status.cgi only

over here, everything works fine as expected.

so it seems that the javascript code is incompatible. at least the one loaded for refresh got problems with the dropdown code (as we know already, happening from time to time). the combination with the frameset makes it worse then, inner frame reloads might be dangerous as usual.

the overall solution might be to integrate the menue plus header somehow directly into the cgis. maybe javascript driven again using sort of "hide the menue" entries, like you can see in icinga-web with the cronks menue.
this could be made compatible with &nomenu GET variable to the ones using the cgis as datasource? or implement something new, abstracting the old vals.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-04-03 10:14:17 +00:00

and you did a full page reload (F5) after update?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-03 10:16:13 +00:00

first installed the update, then opened the webpage. so it was more or less fresh, but still, could be a browser issue caching the 'older' js libraries.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-04-13 15:14:32 +00:00

it looks like a caching problem.

We should recommend a full page reload after updating.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-04-13 19:01:48 +00:00

still think this triggers a javascript memory leak in current firefox 11.

Have to investigate this more.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-04-13 22:34:01 +00:00

ok, found out the memory leak was caused by "Firebug". Switching it off keeps memory at a steady amount. This is a more general problem, not one of our scripts.

Think this issue can be considered resolved.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-19 12:31:34 +00:00

  • Done % changed from 90 to 100

from my usage feeling this works now. but leave this issue open until at least 2 other users report their tests ok evilgrin

@icinga-migration
Copy link
Author

Updated by mzac on 2012-04-20 13:55:09 +00:00

Looks great!!!

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-25 16:40:38 +00:00

works in my dev branches on different os and boxes.

@icinga-migration
Copy link
Author

Updated by mzac on 2012-04-27 16:02:46 +00:00

  • File added tac1.png
  • File added status1.png

The only thing I find weird is that on the main tac overview, the timer shows up on one line:

Last Updated: - Update in xx seconds [pause]

However on some other screens, like for example the service detail, it shows up as:Last

Updated: - Update in xx
seconds [pause]

And by the time the timer comes up it bumps the whole page down by one line, so if you were already ready to click on something on the page it moves down.

This is with Chrome on Windows 7 and I see the same thing in IE

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-04-27 16:07:02 +00:00

Hi,

I think, this depends on your screen/window size. What screen resolution do you have?

in status.cgi the status totals force the browser to do a line break.

@icinga-migration
Copy link
Author

Updated by mzac on 2012-04-27 16:08:49 +00:00

Hmmm. yes it seems to be that.. I have to monitors and it only does it on the smaller one:

Monitor 1: 1920 x 1080 - no problem
Monitor 2: 1280 x 1024 - problem

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-04-27 16:13:36 +00:00

Thanks for testing by the way ;-)

I kind of don't want to make it a fixed size, because then, it can cause trouble if you change your font size in your browser.

Or what do you think?

@icinga-migration
Copy link
Author

Updated by mzac on 2012-04-27 16:22:08 +00:00

What if the 'Update in x seconds [pause]' was just completely on the next line by itself?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-27 16:25:31 +00:00

ugh. don't add lines i explicitely killed for space reasons on smaller displays (1024)

@icinga-migration
Copy link
Author

Updated by mzac on 2012-04-27 16:33:20 +00:00

  • File added status2.png
  • File added status3.png

status2.png

Is it possible to make the table column bigger? right now it's split 33% between all of them:

status3.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-30 16:10:27 +00:00

not sure about that. can we discuss the table sizes in a different issue please? that's anothr problem, but keeps this issue from being resolved.

@icinga-migration
Copy link
Author

Updated by mzac on 2012-04-30 16:47:16 +00:00

Yes I guess we could open another issue on that, the function of this feature works as expected (and even better than I originally thought!)

dnsmichi wrote:

not sure about that. can we discuss the table sizes in a different issue please? that's anothr problem, but keeps this issue from being resolved.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-30 16:50:55 +00:00

  • Status changed from Feedback to Resolved

ok then please be so kind to open a new issue, while i resolve this now.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-05-02 10:56:20 +00:00

  • Status changed from Resolved to Feedback

Hi,

changed behavior of line break in status.cgi with displayed status totals

also added a reload icon

I think this is save for 1.7 but this is open for discussion.

in current rbartels/cgi

Cheers Ricardo

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-05-03 11:07:00 +00:00

if so, please merge to dev/cgis and test/cgis ... and hopefully it does not break....

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-05-05 10:00:57 +00:00

  • File added icinga_classicui_reload.png

ok. but the next time, keep this as feature for the next version. this violates the feature freeze...

anyhow, works here.

icinga_classicui_reload.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-05-05 10:01:15 +00:00

  • Status changed from Feedback to Resolved

@icinga-migration
Copy link
Author

Updated by mzac on 2012-05-07 19:16:21 +00:00

It doesn't see like the timer resets any more when I choose a service since this last change. Can anyone else confirm if this is the case?

dnsmichi wrote:

ok. but the next time, keep this as feature for the next version. this violates the feature freeze...

anyhow, works here.

icinga_classicui_reload.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-05-08 10:44:17 +00:00

no, works like expected.

@icinga-migration
Copy link
Author

Updated by ricardo on 2012-05-08 15:41:12 +00:00

mzac you are right. Thanks for testing.

fixed it in current dev/cgis and test/cgis

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-05-08 16:12:00 +00:00

i have no idea what you are talking about - clicking on the various pages, stopping the counter, clicking further always resets the counter.

so what exactly does this fix do?

@icinga-migration
Copy link
Author

Updated by mzac on 2012-05-09 17:18:29 +00:00

That did it! Will it be pushed to current git? I manually patched my install to test and it worked

ricardo wrote:

mzac you are right. Thanks for testing.

fixed it in current dev/cgis and test/cgis

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-05-09 17:25:16 +00:00

check the beta tarball from sf.net pls

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 09:32:51 +00:00

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category changed from 52 to Classic UI

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant