Back to load on webui!

saroos1

Member
May 25, 2018
718
0
16
Hello again, I am having a few probs with the coding on the index.html. I am trying to load into the gui the average load and uptime into the webui. I can get the title loaded but I am having great difficulty trying to access the system info I require.

I AM A TOTAL N00B at javascripting, which is whI am asking for help. I have added this bit of code into the index.html and the title shows up fine but it wont display the system call I want. Any help would be appreciated smiley.gifsmiley.gifsmiley.gif

Code:
<table id="st_system" class="statuscell" cellpadding="0" cellspacing="0">
<tr>
<td><div class="sthdr">rTorrent:</div></td><td><div class="stval" id="rtorrentv"></div></td>
</tr>
</table>
</td>

<td>
<table border="1" bgcolor="#F433FF">
<tr>
<td>Uptime and Average Load</td>

<td><?php
$uptime = passthru ("/usr/bin/uptime");
echo "$uptime";

?></td>
</td></tr></table>

</td>


It is a basic call I want to make, so any pointers would be great smiley.gifsmiley.gif

THankl you inh advance
 

Attachments

saroos1

Member
May 25, 2018
718
0
16
thank you for the pointer, and I've been able to add anotherdisk space icon to the webui, but as I said earlier I am a total beginner at javascript, and do not know how to write the system call to show the average load, and soz if I am bumping the topic wonslung wink.gif

So please can you give me a hint as to the coding i need to add. Do I need to add a function for uptime/loadavg in the utils.php or or is it a simple deed of changing the init.js in plugins directory

As you can see I am not sure...lol
 

Attachments