Cloud-CV/EvalAI

View on GitHub
frontend/src/views/web/auth/get-token.html

Summary

Maintainability
Test Coverage
<section class="ev-md-container-ui">
    <div class="ev-md-container ev-card-panel">
    <div class="row ht-wt-100p">
        <div class="col s12 m12">
            <div class="ev-card-body">
                <form name="getTokenForm" ng-submit="profile.getAuthToken(getTokenForm.$valid)">
                    <div class="pass-title">API Authentication Token</div>
                    <div class="token-width inline-list">
                        <input class="col s11 md-display-3" type="{{profile.inputType}}" readonly="true" value="{{profile.token}}"/>
                        <button class="col s1 btn ev-btn-dark waves-effect waves-dark grad-btn" ng-click="profile.showConfirmation()" ngclipboard data-clipboard-text="{{profile.token}}">
                            <i class="fa fa-clipboard" aria-hidden="true" alt="Copy to clipboard."></i>
                        </button>
                    </div>
                    <br>
                    <br>
                    <div class="pd-20"><strong>Expires at:</strong> {{profile.expiresAt | date:'medium'}} {{profile.expiresAtTimezone}} ({{profile.gmtZone}})</div>
                    <br>
                    <ul class="inline-list">
                        <li>
                            <a ng-click="profile.getAuthToken(false)" class="dark-link pointer"><strong>Cancel</strong></a>
                        </li>
                        <li>
                            <a ng-click="profile.downloadToken()" class="dark-link pointer"><strong>Download JSON</strong></a>
                        </li>
                        <li>
                            <a ng-click="profile.refreshToken()" class="dark-link pointer"><strong>Refresh Token</strong></a>
                        </li>
                        <li>
                            <button class="btn ev-btn-dark waves-effect waves-dark grad-btn-dark fs-14 grad-btn" ng-click="profile.hideShowPassword()" type="submit" value="submit">{{profile.status}} Token</button>
                        </li>
                    </ul>
                </form>
            </div>
        </div>
    </div>
    </div>
</section>