OverView page not showing all data after all hotfix's

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OverView page not showing all data after all hotfix's

Oilman
 noticed after the hotfixes the uptime, memory section, network section and active connections were not showing.


I solved the problem by editing the file /usr/lib/lua/luci/view/admin_status/index.htm replacing the two lines below

<script type="text/rocketscript" data-rocketsrc="<%=resource%>/cbi.js"></script>
<script type="text/rocketscript">//<![CDATA[

With the two lines below

<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript">//<![CDATA[


The hot fixes of 8.1, 8.2 an 8.3 changed these lines and it stop working for me correctly, I put the two original lines back and it works fine for now me.  I am using Firefox so maybe some browers can handle the rocketscript.

FYI
Reply | Threaded
Open this post in threaded view
|

Re: OverView page not showing all data after all hotfix's

hans2
I am using still script 7.x, with

<pre>
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
</pre> 

in chrome (latest) i have no problems.  Where is the "rocketscript" coming from? Could it be related to: http://stackoverflow.com/questions/9681032/why-is-wordpress-placing-text-rocketscript-instead-of-text-javascript-when-u
No more: Shield Pro v1, Chaos Calmer, FW 1.51 SP1
Reply | Threaded
Open this post in threaded view
|

Re: OverView page not showing all data after all hotfix's

Wisiwyg
In reply to this post by Oilman
Oilman wrote
noticed after the hotfixes the uptime, memory section, network section and active connections were not showing.

I solved the problem by editing the file /usr/lib/lua/luci/view/admin_status/index.htm replacing the two lines below
&lt;script type=&quot;text/rocketscript&quot; data-rocketsrc=&quot;&lt;%=resource%&gt;/cbi.js"></script>
<script type="text/rocketscript">//<![CDATA[

With the two lines below

<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
<script type="text/javascript">//<![CDATA[


The hot fixes of 8.1, 8.2 an 8.3 changed these lines and it stop working for me correctly, I put the two original lines back and it works fine for now me.  I am using Firefox so maybe some browers can handle the rocketscript.

FYI
I had this same problem, used your edits above, and fixed a few things. I continued to have problems with getting multiple 'appends' of date and version. So I edited the /sbin/fw_upgrade script

from:

# Shield Update Version: parse version number from the comments at the top of this script
grep -oP "^\s*#\s*VER.*-\s*\K([0-9\.]+)(?=\s*#\s*$)" /sbin/fw_upgrade > /.do_date        (was this supposed to point to .do_date since its for version?)

# Shield Update Last Run: append current date
date >> /.do_date

to:

# Shield Update Version: parse version number from the comments at the top of this script
rm -f /.version
grep -oP "^\s*#\s*VER.*-\s*\K([0-9\.]+)(?=\s*#\s*$)" /sbin/fw_upgrade >> /.version

# Shield Update Last Run: append current date
rm -f /.do_date
date >> /.do_date

and formatting issues now resolved. I am using the 8.3.2 'fw_upgrade' script.

Thank you for pointing me in the right direction.
Shield Pro v1, Chaos Calmer, FW 1.51 SP1, v8.3.2, Bridge Mode
Reply | Threaded
Open this post in threaded view
|

Re: OverView page not showing all data after all hotfix's

Gnomad
Hi Wisiwyg, you shouldn't have needed to change /sbin/fw_upgrade from
grep -oP "^\s*#\s*VER.*-\s*\K([0-9\.]+)(?=\s*#\s*$)" /sbin/fw_upgrade > /.do_date
date >> /.do_date
The first line containing the single > replaces any pre-existing /.do_date file with the parsed version text.
Then the second line with double >> appends the current date as a new line.

I'm not sure why you were seeing duplicates. (maybe you had a double >> on your first line?)

Without the duplicates though, /.do_date should then be successfully parsed by the latest /usr/lib/lua/luci/view/admin_status/index.htm via
<tr><td width="33%"><%:Shield Update Version%></td><td><%=luci.sys.exec("head -n 1 /.do_date") or "?"%>  <small style='color:#999;padding-left:3em'>/sbin/fw_upgrade</small></td></tr>
<tr><td width="33%"><%:Shield Update Last Run%></td><td><%=luci.sys.exec("tail -n 1 /.do_date | cut -c5-10") or "?"%></td></tr>
I converged both lines back into the original .do_date file, because .version was only later introduced specifically for display on the admin Status page (which I thought wasn't really needed).
OpenWrt SNAPSHOT, r10391-3d8d528939