<commit_before>xquery version "1.0";
(: $Id$ :)
(:
    Module: display status information on the current database instance.
:)

module namespace status = "http://exist-db.org/xquery/admin-interface/status";

declare namespace system = "http://exist-db.org/xquery/system";
declare namespace util = "http://exist-db.org/xquery/util";

declare function status:status-line($key as xs:string, $value as xs:string) as element()
{
    <tr>
        <td class="key">{$key}:</td>
        <td>{$value}</td>
    </tr>
};

declare function status:main() as element()
{
    <div class="panel">
        <div class="panel-head">System Status</div>
        <table id="status" cellpadding="7">
            <tr><th colspan="2">General</th></tr>
            {
                status:status-line("eXist Version", system:get-version()),
                status:status-line("eXist Build", system:get-build()),
                status:status-line("eXist Home", system:get-exist-home()),
                status:status-line("SVN Revision", system:get-revision()),
                status:status-line("Operating System", 
                    concat(util:system-property("os.name"), " ", util:system-property("os.version"),
                        " ", util:system-property("os.arch"))
                ),
                status:status-line("File encoding", util:system-property("file.encoding"))
            }
            <tr><th colspan="2">Java</th></tr>
            {
                status:status-line("Vendor", util:system-property("java.vendor")),
                status:status-line("Version", util:system-property("java.version")),
                status:status-line("Implementation", util:system-property("java.vm.name")),
                status:status-line("Installation", util:system-property("java.home"))
            }
            <tr><th colspan="2">Memory Usage</th></tr>
            {<commit_msg>[ignore] added java.io.tmpdir information to status report<commit_after>xquery version "1.0";
(: $Id$ :)
(:
    Module: display status information on the current database instance.
:)

module namespace status = "http://exist-db.org/xquery/admin-interface/status";

declare namespace system = "http://exist-db.org/xquery/system";
declare namespace util = "http://exist-db.org/xquery/util";

declare function status:status-line($key as xs:string, $value as xs:string) as element()
{
    <tr>
        <td class="key">{$key}:</td>
        <td>{$value}</td>
    </tr>
};

declare function status:main() as element()
{
    <div class="panel">
        <div class="panel-head">System Status</div>
        <table id="status" cellpadding="7">
            <tr><th colspan="2">General</th></tr>
            {
                status:status-line("eXist Version", system:get-version()),
                status:status-line("eXist Build", system:get-build()),
                status:status-line("eXist Home", system:get-exist-home()),
                status:status-line("SVN Revision", system:get-revision()),
                status:status-line("Operating System", 
                    concat(util:system-property("os.name"), " ", util:system-property("os.version"),
                        " ", util:system-property("os.arch"))
                ),
                status:status-line("File encoding", util:system-property("file.encoding"))
            }
            <tr><th colspan="2">Java</th></tr>
            {
                status:status-line("Vendor", util:system-property("java.vendor")),
                status:status-line("Version", util:system-property("java.version")),
                status:status-line("Implementation", util:system-property("java.vm.name")),
                status:status-line("Installation", util:system-property("java.home")),
                status:status-line("Temp file path", util:system-property("java.io.tmpdir"))
            }
            <tr><th colspan="2">Memory Usage</th></tr>
            {
{'fraction_non_alphanumeric': 0.17286483713772763, 'fraction_numerical': 0.00307771223390613, 'mean_word_length': 2.4914950760966876, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2231033', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1082, 'n_words': 186}