<div class="col-md-12">
    <h1>Server Info</h1>

    <table class="table table-striped table-bordered">
        <tr>
            <td>Version</td>
            <td>{{serverInfo.version}}</td>
        </tr>
        <tr>
            <td>Server Time</td>
            <td>{{serverInfo.serverTime}} (<a style="cursor: pointer" data-ng-click="serverInfoUpdate()">update</a>)</td>
        </tr>
        <tr>
            <td>Server Uptime</td>
            <td>{{serverInfo.serverUptime}}</td>
        </tr>
        <tr>
            <td>Current Working Directory</td>
            <td>{{serverInfo.systemInfo.userDir}}</td>
        </tr>
        <tr>
            <td>Java Version</td>
            <td>{{serverInfo.systemInfo.javaVersion}}</td>
        </tr>
        <tr>
            <td>Java Vendor</td>
            <td>{{serverInfo.systemInfo.javaVendor}}</td>
        </tr>
        <tr>
            <td>Java Runtime</td>
            <td>{{serverInfo.systemInfo.javaRuntime}}</td>
        </tr>
        <tr>
            <td>Java VM</td>
            <td>{{serverInfo.systemInfo.javaVm}}</td>
        </tr>
        <tr>
            <td>Java VM Version</td>
            <td>{{serverInfo.systemInfo.javaVmVersion}}</td>
        </tr>
        <tr>
            <td>Java Home</td>
            <td>{{serverInfo.systemInfo.javaHome}}</td>
        </tr>
        <tr>
            <td>User Name</td>
            <td>{{serverInfo.systemInfo.userName}}</td>
        </tr>
        <tr>
            <td>User Timezone</td>
            <td>{{serverInfo.systemInfo.userTimezone}}</td>
        </tr>
        <tr>
            <td>User Locale</td>
            <td>{{serverInfo.systemInfo.userLocale}}</td>
        </tr>
        <tr>
            <td>System Encoding</td>
            <td>{{serverInfo.systemInfo.fileEncoding}}</td>
        </tr>
        <tr>
            <td>Operating System</td>
            <td>{{serverInfo.systemInfo.osName}} {{serverInfo.systemInfo.osVersion}}</td>
        </tr>
        <tr>
            <td>OS Architecture</td>
            <td>{{serverInfo.systemInfo.osArchitecture}}</td>
        </tr>
    </table>
    
    <h3>Java VM Memory Statistics</h3>
    <table class="table table-striped table-bordered">
        <tr>
            <td>Total Memory</td>
            <td>{{serverInfo.memoryInfo.totalFormated}}</td>
        </tr>
        <tr>
            <td>Free Memory</td>
            <td>{{serverInfo.memoryInfo.freeFormated}} ({{serverInfo.memoryInfo.freePercentage}}%)</td>
        </tr>
        <tr>
            <td>Used Memory</td>
            <td>{{serverInfo.memoryInfo.usedFormated}}</td>
        </tr>
   	</table>
    <fieldset>
        <legend collapsed>Providers</legend>

        <div class="form-group">
            <h3>Public SPIs</h3>
            <kc-tooltip>For public SPIs there are built-in providers, but it's also supported to write your own custom providers.</kc-tooltip>

            <table class="table table-striped table-bordered">
                <thead>
                <tr>
                    <th>SPI</th>
                    <th>Providers</th>
                </tr>
                </thead>
                <tbody>
                <tr data-ng-repeat="spi in (serverInfo.providers | filter:{internal:false} | orderBy:'name')">
                    <td>{{spi.name}}</td>
                    <td>
                        <div data-ng-repeat="provider in (spi.implementations | orderBy:'toString()')">
                            {{provider}}
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="form-group">
            <h3>Internal SPIs</h3>
            <kc-tooltip>For internal SPIs there are only built-in providers. It's not recommended to write your own custom providers as internal SPIs may change or be removed without notice.</kc-tooltip>

            <table class="table table-striped table-bordered">
                <thead>
                <tr>
                    <th>SPI</th>
                    <th>Providers</th>
                </tr>
                </thead>
                <tbody>
                <tr data-ng-repeat="spi in (serverInfo.providers | filter:{internal:true} | orderBy:'name')">
                    <td>{{spi.name}}</td>
                    <td>
                        <div data-ng-repeat="provider in (spi.implementations | orderBy:'toString()')">
                            {{provider}}
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </fieldset>
</div>