Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 ... 7 8 [9] 10 11

Author Topic: DSLstats webserver - Custom Interface  (Read 59830 times)

jelv

  • Helpful
  • Kitizen
  • *
  • Posts: 2054
Re: DSLstats webserver - Custom Interface
« Reply #120 on: December 14, 2018, 03:16:55 PM »

Whoops - it's a duplicate that should be removed (not that is doing any harm).

It stems from the SNRMperbanddownstream and SNRperbandupstream which I combined.
Logged
Broadband and Line rental: Zen Unlimited Fibre 2, Mobile: Vodaphone
Router: Fritz!Box 7530

m48t02

  • Member
  • **
  • Posts: 11
Re: DSLstats webserver - Custom Interface
« Reply #121 on: March 01, 2019, 06:59:14 PM »

Hi guys,

Firstly many thanks @kitz for providing these pages for the DSLStats data. I am new on the forum and have been playing for the last day or so on getting it working with my data.

I just wanted to share a change I made to the history.php page, so that the drop-down choices do not revert back to the default choices, and stay on the currently viewed folder and graph file. It makes it a little more intuitive when reviewing the graph for me.

Hope it's useful. (N.B. The array() defines my folders, just add/remove your elements as necessary):

I hope this is the correct place to share.

Code: [Select]
<div class="graphs">
  <form name="form1" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  Graph Type<br>
    <select name="graph">
      <option value="SNRM">SNR Margin</option>
      <option value="ErroredSeconds">Errored Seconds</option>
      <option value="CRC">CRCs</option>
    </select>
    <input type="submit" value="Select">
  </form>

Becomes:

Code: [Select]
<div class="graphs">
  <form name="form1" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  Graph Type<br>
    <select name="graph">

<?php
$graphs 
= array("Bitloading","Bitswaps","ConnSpeed","CRC","ErroredSeconds","FEC","HLog","QLN","SES","SNRM","SNRMperband","SwapsPerMinute");

foreach (
$graphs as $graph) {
        if (
$_REQUEST['graph'] == $graph || $_REQUEST['folder'] == $graph){
                
$selected ' selected';
        } else {
                
$selected '';
        }
        print 
"<option value='".$graph."'".$selected.">".$graph."</option>\n";
}
?>

    </select>
    <input type="submit" value="Select">
  </form>


And in fuction(ListGraphs) this:

Code: [Select]
         #Output to Drop Down Select Box
         if (in_array($ext, $supported_file)) {
             echo "<option value=\"" . $image . "\">" . basename($image) . "</option> \"";                                      // Strip file path from img url

Becomes:

Code: [Select]
           #Output to Drop Down Select Box
            if (in_array($ext, $supported_file)) {

                   if ($_REQUEST['fileName'] == $image) {
                            $imageselected = " selected";
                   } else {
                            $imageselected = "";
                   }

              echo "<option value=\"" . $image . "\"".$imageselected.">" . basename($image) . "</option>\n";


« Last Edit: March 02, 2019, 12:16:19 AM by m48t02 »
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 34023
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: DSLstats webserver - Custom Interface
« Reply #122 on: March 01, 2019, 09:46:12 PM »

Thanks m48t02 for sharing your code.   Appreciated :)
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

tiffy

  • Kitizen
  • ****
  • Posts: 1350
Re: DSLstats webserver - Custom Interface
« Reply #123 on: March 02, 2019, 05:13:46 PM »

@m48t02

Script updated and tested on my system, working perfectly and certainly worth the effort, many thanks for sharing.

From previous experience on my system, RPi 3B running DSLStats and uploading webserver files to web server, if edits are made to web site, server *.php files only they can be overwriten back to original by the corresponding file on the RPi at the next scheduled DSLStats upload, not sure if this would apply to the history.php file but has certainly happened to other *.php files I have edited on the web server in the past.

Probably best to edit at source and then copy / replace the file on the web server.
Logged
Vodafone FTTP 200/28, VF THG3000 Hub

m48t02

  • Member
  • **
  • Posts: 11
Re: DSLstats webserver - Custom Interface
« Reply #124 on: March 03, 2019, 09:48:57 AM »

@m48t02

Script updated and tested on my system, working perfectly and certainly worth the effort, many thanks for sharing.

My pleasure.

From previous experience on my system, RPi 3B running DSLStats and uploading webserver files to web server, if edits are made to web site, server *.php files only they can be overwriten back to original by the corresponding file on the RPi at the next scheduled DSLStats upload, not sure if this would apply to the history.php file but has certainly happened to other *.php files I have edited on the web server in the past.

Probably best to edit at source and then copy / replace the file on the web server.

Absolutely, it kind of boils down to the release medium. The source needs to be synchronised with changes.

I don't know how savvy you guys are at using sites such as github.com or bitbucket.org where you can freely host your code as an owner, but others can push 'merge' (read change) requests to your codebase which you can choose to accept or deny?

You can then mark a 'release' at a certain point in the development phase that can be downloaded as a zip, at a point you think merged changes are stable or significantly different enough to merit a new release tag.
Logged

7cfm

  • Member
  • **
  • Posts: 29
Re: DSLstats webserver - Custom Interface
« Reply #125 on: March 24, 2019, 08:54:55 AM »

I'm using Kitz custom interface on a raspberry pi and it works great but I need to change the default apache port from port 80. I've updated /etc/apache2/sites-enabled/000-default.conf and /etc/apache2/ports.conf and I get the linestats OK but lose the page formatting, any ideas please?


[attachment deleted by admin]
Logged

j0hn

  • Kitizen
  • ****
  • Posts: 4119
Re: DSLstats webserver - Custom Interface
« Reply #126 on: March 24, 2019, 10:33:20 AM »

eww @ that packet loss
Logged
Talktalk FTTP 550/75 - Speedtest - BQM

7cfm

  • Member
  • **
  • Posts: 29
Re: DSLstats webserver - Custom Interface
« Reply #127 on: March 24, 2019, 01:52:41 PM »

Not good is it. Interestingly when the line was busy downloading yesterday afternoon the packet loss reduced.
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 34023
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: DSLstats webserver - Custom Interface
« Reply #128 on: March 25, 2019, 01:16:09 PM »

I get the linestats OK but lose the page formatting, any ideas please?

Check the directory paths as it doesn't appear to have found the file css.css
Have you set up custom folders?  The .css file should be in the same folder as index.htm etc.
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

7cfm

  • Member
  • **
  • Posts: 29
Re: DSLstats webserver - Custom Interface
« Reply #129 on: March 25, 2019, 05:03:52 PM »

That was it, I am using the default apache directory and css.css was completely missing, where I was picking it up from when I was using port 80 is a mystery but all sorted now, many thanks
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 34023
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: DSLstats webserver - Custom Interface
« Reply #130 on: March 28, 2019, 10:37:16 PM »

YW :) 
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

RTouris

  • Member
  • **
  • Posts: 55
Re: DSLstats webserver - Custom Interface
« Reply #131 on: June 01, 2019, 10:08:47 PM »

Having just completed my frank-o-setup - running Raspbian DSLstats + Kitz's modified interface on an old tablet via Linux Deploy with much success I was wondering if there is any way to include the quite informative pbparams.txt section in one of the tabs of the main web interface..Seeing that pbparams.html is actually missing (i.e. DSLStats doesn't output it) - I tried to "include" the text output of the .txt file into one of kitz's .htms but unfortunately my HTML is quite rusty to the point that I managed to get the file downloaded, but not actually displayed (embedded) into the respective tab.
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 34023
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: DSLstats webserver - Custom Interface
« Reply #132 on: June 04, 2019, 11:28:51 PM »

Sorry only just seen this.    The easiest way is output the text file in a frame.

https://kitz.co.uk/linestats/pbparams.htm

You should be able to download that file. 
Don't forget you will also need to change the menu nav bar for the other pages too. 


---
PS

You may need to adjust the frame width depending upon data in your own txt file.
I just quickly used 800 x 600 to test, as mine isn't uploading live data...  but you can tweak it to what best suits your data output.

Code: [Select]
<iframe src="pbparams.txt" width="800" height="600" frameborder="0">
« Last Edit: June 04, 2019, 11:43:24 PM by kitz »
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

RTouris

  • Member
  • **
  • Posts: 55
Re: DSLstats webserver - Custom Interface
« Reply #133 on: June 07, 2019, 12:21:48 PM »

Sorry only just seen this.    The easiest way is output the text file in a frame.

https://kitz.co.uk/linestats/pbparams.htm

You should be able to download that file. 
Don't forget you will also need to change the menu nav bar for the other pages too. 


---
PS

You may need to adjust the frame width depending upon data in your own txt file.
I just quickly used 800 x 600 to test, as mine isn't uploading live data...  but you can tweak it to what best suits your data output.

Code: [Select]
<iframe src="pbparams.txt" width="800" height="600" frameborder="0">

Thanks for the reply...For some strange reason I can't get this to work properly, so let me elaborate. Accessing the page from within the tablet that runs the DSLstats server under Ubuntu works beautifully, presenting said pbParams data embedded in the respective .htm tab / page, however when I try to access it from any other desktop class (i.e. not an iPhone/iPad/Android browser) browser outside the server that runs on the tablet results in the pbparams.txt file being downloaded by the browser..

iPhone/iPad also works displaying the pbparams.txt contents in the frame of the page, however any desktop-class browser (Safari/Chrome/Firefox) will download the linked .txt file rather than displaying it..

One thing I noticed is that any other text-based tab has the respective .html that's generated by DSLstats which is then called into by the frame of the custom UI .htm page, however that's not the case with pbParams, where DSLstats does NOT provide the live .html variant, but only outputs the .txt file...maybe that's somehow responsible for this behaviour?
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 34023
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: DSLstats webserver - Custom Interface
« Reply #134 on: June 07, 2019, 12:47:11 PM »

How strange.   

Mine using pbparams.txt works fine here in Firefox, Chrome, Opera, Palemoon & Vivaldi.
Do you have the same problem when trying to view my stats?

https://kitz.co.uk/linestats/pbparams.htm

I'm wondering if there may perhaps be some application or setting on the desktop machine which by default tries to open all text files.
afaik all browsers should by default open .txt files within the browser window - unless told to do otherwise.
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker
Pages: 1 ... 7 8 [9] 10 11
 

anything