Author: timopollmeier
Date: 2016-09-21 12:49:45 +0200 (Wed, 21 Sep 2016)
New Revision: 26245

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/html/classic/gsad.xsl
   trunk/gsa/src/html/classic/js/greenbone.js
Log:
        * src/html/classic/gsad.xsl (autorefresh [html-header-meta]): Enable
        auto-refresh on dashboard pages.

        * src/html/classic/js/greenbone.js (on_ready): Change auto-refresh
        dropdown selection to "No auto-refresh" while auto-refresh is disabled.

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog 2016-09-21 10:49:39 UTC (rev 26244)
+++ trunk/gsa/ChangeLog 2016-09-21 10:49:45 UTC (rev 26245)
@@ -1,5 +1,13 @@
 2016-09-21  Timo Pollmeier <timo.pollme...@greenbone.net>
 
+       * src/html/classic/gsad.xsl (autorefresh [html-header-meta]): Enable
+       auto-refresh on dashboard pages.
+
+       * src/html/classic/js/greenbone.js (on_ready): Change auto-refresh
+       dropdown selection to "No auto-refresh" while auto-refresh is disabled.
+
+2016-09-21  Timo Pollmeier <timo.pollme...@greenbone.net>
+
        * src/html/classic/omp.xsl (date-diff-text): New function.  Text
        generator from date-diff.
        (date-diff): Move text generation to new function date-diff-text.

Modified: trunk/gsa/src/html/classic/gsad.xsl
===================================================================
--- trunk/gsa/src/html/classic/gsad.xsl 2016-09-21 10:49:39 UTC (rev 26244)
+++ trunk/gsa/src/html/classic/gsad.xsl 2016-09-21 10:49:45 UTC (rev 26245)
@@ -188,8 +188,8 @@
 
 <!-- Add meta refresh info if autorefresh element present -->
 <xsl:template match="autorefresh" mode="html-header-meta">
-  <xsl:variable name="cmd" select="name(/envelope/*[starts-with (name(), 
'get_')])"/>
-  <xsl:if test="starts-with ($cmd, 'get_') and substring ($cmd, 1) and ($cmd = 
'get_task' or substring ($cmd, string-length ($cmd), 1) = 's') and ($cmd != 
'get_my_settings') and ($cmd != 'get_system_reports') and (count (//gsad_msg) = 
0) and (count (//gsad_response) = 0)">
+  <xsl:variable name="cmd" select="name(/envelope/*[starts-with (name(), 
'get_') or name() = 'dashboard'])"/>
+  <xsl:if test="(starts-with ($cmd, 'get_')  or $cmd='dashboard') and 
substring ($cmd, 1) and ($cmd='dashboard' or $cmd = 'get_task' or substring 
($cmd, string-length ($cmd), 1) = 's') and ($cmd != 'get_my_settings') and 
($cmd != 'get_system_reports') and (count (//gsad_msg) = 0) and (count 
(//gsad_response) = 0)">
     <script type="text/javascript">
     window.autorefresh_enabled = true;
     </script>

Modified: trunk/gsa/src/html/classic/js/greenbone.js
===================================================================
--- trunk/gsa/src/html/classic/js/greenbone.js  2016-09-21 10:49:39 UTC (rev 
26244)
+++ trunk/gsa/src/html/classic/js/greenbone.js  2016-09-21 10:49:45 UTC (rev 
26245)
@@ -1585,7 +1585,9 @@
         start_auto_refresh();
       });
       if (!global.autorefresh_enabled) {
+        var autorefresh_off = autorefresh.find('option[value="0"]');
         autorefresh.prop('disabled', 'disabled');
+        autorefresh_off.prop ('selected', 'selected');
       }
     }
 

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits

Reply via email to