Hi All, I got terminated from my job and got bored. I noticed the old index.adp 
was a bit out of touch so I've started rewriting index.adp to bring the page to 
the modern age. Especially with NaviServer being at version 5.0.

I hope I am not treading on anyone's toes.

In the old, certain features such as displaying ports, OS version where 
processed on the line where now I have now broken in to procedures.

Example of the old:

    <h2>Current Server Configuration</h2>
    <ul class="config-details">
      <li><strong>Configuration File:</strong> <code><%=[ns_info 
config]%></code></li>
      <li><strong>Listening:</strong> <%= [join [lsort $listenURLs] {, }] %> 
<%= $maybePublic %>
      </li>
      <li><strong>Loaded Modules:</strong> <%=[join $modules {, }]%></li>
    </ul>

Refactored:

    <h2>Current Server Configuration</h2>
    <div class="code">
      <li><%=[probe_driver_info os]%></li>
      <li><%=[probe_driver_info navi_version]%></li>
      <li><%=[probe_driver_info address]%></li>
      <li><%=[probe_driver_info modules]%></li>
    </div>

The above then renders the below:

Current Server Configuration
- Operating System: FreeBSD 15.0-PRERELEASE
- NaviServer Version: 5.0.0
- Listening on addresses: 127.0.0.1 10.2.1.7 at ports 4870 4990
- Modules Available: nscp nslog nscgi nssock nsstats

I have also editorialized the page in to a tutorial explaining to the the user 
allowing them to explore the basic of NaviServer's commands and cogs. It's a 
messy read at the moment and needs to rewrite but for now it's just getting 
words out of my mind. I plan to implement the same features from the old 
index.adp like the password model but for the basic output it sails smooth.

You can view my changes here: 
https://github.com/whisperzer0/naviserver/blob/main/index.adp

You'll may need to update line 92 to reflect the path of the CSS file. 
Otherwise place the default.css in the root of my repo in to the pages 
directory and it -should- hopefully render correctly.

I plan to use the new style Gustaf has created but this style is just something 
I whipped together for show & tell.

More polish is planned and some more design work needs to go in but to promote 
dynamic websites in the fashion of AOL Server did, I think this could spark 
something interesting for potential new users :), NaviServer forever. 

All the best,
David F


_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to