Zabbix-Network-Weathermap icon indicating copy to clipboard operation
Zabbix-Network-Weathermap copied to clipboard

Updating the browser page

Open psmartins opened this issue 7 years ago • 7 comments
trafficstars

The link traffic information changes only when I refresh the page in the browser or press f5 on the keyboard. Can you tell me where I have to change in the configuration for the map page to update dynamically.

My zabbix has been compiled and put all your files inside the /opt/zabbix/directory. The frontend files are within /opt/zabbix/www/

The Zabbix-Network-Weathermap plugin files are in the /opt/zabbix/maps_wheatermap_zabbix/Zabbix-Network-Weathermap-master/

Thank you.

psmartins avatar Feb 01 '18 12:02 psmartins

Zabbix -> Administration -> Users -> username -> Refresh (in seconds)

Prototype-X avatar Feb 01 '18 12:02 Prototype-X

It was already set for 50s. I switched to 10s and the problem still persisted.

psmartins avatar Feb 01 '18 13:02 psmartins

In this case, the question should be addressed to the developers of Zabbix. Alternative:

  1. Update Zabbix
  2. Downgrade to Zabbix LTS 3.0
  3. Change web browser
  4. Install plugin in web browser for refresh page
  5. Wait for Zabbix updates in which the problem will be solved

Prototype-X avatar Feb 01 '18 14:02 Prototype-X

The version of my zabbix is ​​3.4.4. The other maps are updating normally.

Thank you

psmartins avatar Feb 01 '18 14:02 psmartins

Prototype-X

What is the Linux distribution and what version of zabbix have you tested on your map?

Thanks!

psmartins avatar Feb 02 '18 10:02 psmartins

Ubuntu 16.04 LTS + Zabbix 3.0.9 LTS

Zabbix appliance 3.4.6 with last weathermap - zabbix frontend do not reload background image while refresh. This behavior can be fixed by the browser plugin Auto refresh page.

Prototype-X avatar Feb 02 '18 18:02 Prototype-X

Hotfix for refresh background image. Open /usr/share/zabbix/js/vector/class.svg.map.js and comment or delete:

if (this.background !== null && background === this.options.background) {
        // Background was not changed.
        return;
}

Like this:

/**
 * Update background image.
 *
 * @param {string}    background     Background image id.
 */
SVGMap.prototype.updateBackground = function (background) {
        var element = null;

        if (background && background !== '0') {
                //if (this.background !== null && background === this.options.background) {
                        // Background was not changed.
                        //return;
                //}

Prototype-X avatar Feb 02 '18 20:02 Prototype-X