• Error in /etc/inc/pfsense-utils.inc

    Line 1983 has the ;' flipped around it needs to be

    echo 'document.getElementById("progressbar").style.width="'. $percent.'%"';

  • Developer Netgate

    Is this function used anymore in 2.3? I would have thought not.

  • Moderator

    I upgraded my 2.3 Alpha snapshot last night and due to this issue, it didn't set the interface addresses. Had to manually add the missing ; from the terminal and reboot.

  • Developer Netgate

    Interesting. Thanks. I guess someone somewhare still uses it then :)

    I have applied you fix to 2.3 master.

  • It's not used anymore from the looks of it. One call to update_progress_bar in function read_body. Nothing uses read_body anymore that I see.

    The reason it broke things is because of the syntax error, not that it's used. Doesn't matter if the function gets touched or not if it has a syntax error within it, it'll break everything that uses anything in that entire file.

  • I was still using that function in parts of the Snort and Suricata packages.  It was called as part of read_body() calls used to update progress of rules tarball downloads.  Not absolutely critical to have that progress indicator, but it does give the user feedback that something is happening and roughly at what rate.

    Is there another standard call in 2.3 that duplicates the functionality of downloading a file and updating a progress bar in Bootstrap?


  • Developer Netgate

    Not that I know of, but the code of presenting and updating a bootstrap progress bar can be found in a number of places, including the thermal sensor widget, and pkg_mgr_install.php

  • I didn't check packages for references. The function's still there, so it may still work as before. Haven't checked, but if it does, we can leave it there.

  • It would potentially be useful to have a Progress Bar API function that packages could use without each package having its own version of "the wheel" if you will.  My vote would be to leave it in and maybe "Bootstrap it" so it integrates cleanly with the rest of the GUI.


    Edit: to fix typo

  • Developer Netgate

    Good idea. I'll add it to the list.

Log in to reply