app.html 2.18 KB
<!-- app partial HTML -->
<div id="ov-app">
    <div class="tabular-header">
        <h2>Applications ({{ctrl.tableData.length}} total)</h2>
        <div class="ctrl-btns">
            <div class="refresh active"
                 icon icon-size="36" icon-id="refresh"
                 ng-click="refresh()"></div>
            <div class="separator"></div>
            <div id="app-install"    icon icon-size="36" icon-id="plus" class="active"></div>
            <div id="app-activate"   icon icon-size="36" icon-id="play"></div>
            <div id="app-deactivate" icon icon-size="36" icon-id="stop"></div>
            <div id="app-uninstall"  icon icon-size="36" icon-id="minus"></div>
        </div>

        <form id="app-form" method="POST" action="/onos/v1/applications/upload" enctype="multipart/form-data" style="display:none">
            <input type="file" id="file" accept=".oar">
            <button type="submit" id="app-upload">Upload</button>
        </form>
    </div>

    <table class="summary-list"
           onos-fixed-header
           onos-sortable-header
           sort-callback="sortCallback(requestParams)">
        <thead>
            <tr>
                <th colId="state" class="table-icon" sortable></th>
                <th colId="id" sortable>App ID </th>
                <th colId="version" sortable>Version </th>
                <th colId="origin" sortable>Origin </th>
                <th colId="desc" col-width="640px">Description </th>
            </tr>
        </thead>

        <tbody>
            <tr ng-hide="ctrl.tableData.length">
                <td class="nodata" colspan="5">
                    No Applications found
                </td>
            </tr>

            <tr ng-repeat="app in ctrl.tableData"
                ng-click="selectCallback($event, app)"
                ng-class="{selected: app === sel}"
                ng-repeat-done>
                <td class="table-icon">
                    <div icon icon-id="{{app._iconid_state}}"></div>
                </td>
                <td>{{app.id}}</td>
                <td>{{app.version}}</td>
                <td>{{app.origin}}</td>
                <td>{{app.desc}}</td>
            </tr>
        </tbody>
    </table>
</div>