superdesk/superdesk-client-core

View on GitHub
scripts/apps/profiling/views/profiling.html

Summary

Maintainability
Test Coverage
<section class="main-section profiling-data">
    <div class="preview-layout" ng-class="{closed: !selected.preview}">
        <div class="list-pane">
            <header>
                <div class="sortbar pull-left">
                    <span class="lab pull-left" translate>Profile:</span>
                    <div class="dropdown pull-left" dropdown>
                        <button class="dropdown__toggle" dropdown__toggle>
                            {{ profile_names[current_profile] }}
                            <span ng-if="!current_profile">{{ :: 'none' | translate }}</span>
                            <b class="dropdown__caret"></b>
                        </button>
                        <ul class="dropdown__menu">
                            <li ng-repeat="profile in profiles">
                                <a href="" ng-click="loadProfile(profile)">{{ profile_names[profile] }}</a>
                            </li>
                        </ul>
                    </div>
                </div>

                <div class="refresh-box">
                    <button class="btn btn--primary pull-right" ng-click="reset()">{{ :: 'Reset' | translate}}</button>
                    <button ng-click="reload()" class="pull-right" tooltip="{{:: 'Refresh' | translate}}" tooltip-placement="left"><i class="icon-refresh"></i></button>
                    <span class="pull-right">{{ :: 'Last refreshed at' | translate}}: {{ lastRefreshedAt | date:'dd-MM-yyyy HH:mm:ss' }}</span>
                </div>
            </header>
            <div class="content">
                <div sd-shadow>
                    <table class="table styled-table">
                        <thead>
                            <tr>
                                <th translate>No of calls</th>
                                <th translate>Total time</th>
                                <th translate>Time per call</th>
                                <th translate>Cumulative time</th>
                                <th translate>Cumulative time per call</th>
                                <th translate>File name/line</th>
                                <th translate>Function</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="profile_item in profiling_data">
                                <td>{{ profile_item.ncalls}}</td>
                                <td>{{ profile_item.tottime}}</td>
                                <td>{{ profile_item.percall}}</td>
                                <td>{{ profile_item.cumtime}}</td>
                                <td>{{ profile_item.percall_cumtime}}</td>
                                <td>{{ profile_item.filename_lineno}}</td>
                                <td>{{ profile_item.func_name}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>