aboutsummaryrefslogtreecommitdiff
blob: 6640d5a9facfcbeb14ea9ee7311450379cabea69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2" ng-init="init()">
    
    <kc-tabs-clients></kc-tabs-clients>

    <table class="datatable table table-striped table-bordered dataTable no-footer">
        <thead>
            <tr>
                <th class="kc-table-actions" colspan="6">
                    <div class="form-inline">
                        <div class="form-group">
                            <div class="input-group">
                                <input type="text" placeholder="{{:: 'search.placeholder' | translate}}" data-ng-model="query.clientId" class="form-control search" onkeydown="if (event.keyCode == 13) document.getElementById('clientSearch').click()">
                                <div class="input-group-addon">
                                    <i class="fa fa-search" id="clientSearch" data-ng-click="firstPage()"></i>
                                </div>
                            </div>
                        </div>
                        
                        <div class="pull-right" data-ng-show="access.manageClients">
                            <a id="createClient" class="btn btn-default" href="#/create/client/{{realm.realm}}">{{:: 'create' | translate}}</a>
                            <a id="importClient" class="btn btn-default" href="#/import/client/{{realm.realm}}" data-ng-show="importButton">{{:: 'import' | translate}}</a>
                        </div>
                    </div>
                    <div data-ng-show="!searchLoaded" class="form-inline">
                        {{:: 'search.loading' | translate }}
                    </div>
                </th>
            </tr>
            <tr data-ng-hide="clients.length == 0">
                <th>{{:: 'client-id' | translate}}</th>
                <th>{{:: 'enabled' | translate}}</th>
                <th>{{:: 'base-url' | translate}}</th>
                <th colspan="3">{{:: 'actions' | translate}}</th>
            </tr>
        </thead>
        <tfoot data-ng-show="clients && (clients.length >= query.max || query.first > 0)">
            <tr>
                <td colspan="6">
                    <div class="table-nav">
                        <button data-ng-click="firstPage()" class="first" ng-disabled="query.first == 0">{{:: 'first-page' | translate}}</button>
                        <button data-ng-click="previousPage()" class="prev" ng-disabled="query.first == 0">{{:: 'previous-page' | translate}}</button>
                        <button data-ng-click="nextPage()" class="next" ng-disabled="clients.length < query.max">{{:: 'next-page' | translate}}</button>
                    </div>
                </td>
            </tr>
        </tfoot>
        <tbody>
            <tr ng-repeat="client in clients">
                <td><a href="#/realms/{{realm.realm}}/clients/{{client.id}}">{{client.clientId}}</a></td>
                <td translate="{{client.enabled}}"></td>
                <td ng-class="{'text-muted': !client.baseUrl}">
                    <a href="{{client.rootUrl | resolveClientRootUrl}}{{client.baseUrl}}" target="_blank" data-ng-show="client.baseUrl">{{client.rootUrl | resolveClientRootUrl}}{{client.baseUrl}}</a>
                    <span data-ng-hide="client.baseUrl">{{:: 'not-defined' | translate}}</span>
                </td>
                <td class="kc-action-cell" kc-open="/realms/{{realm.realm}}/clients/{{client.id}}">{{:: 'edit' | translate}}</td>
                <td class="kc-action-cell" data-ng-click="exportClient(client)">{{:: 'export' | translate}}</td>
                <td class="kc-action-cell" data-ng-show="client.access.manage" data-ng-click="removeClient(client)">{{:: 'delete' | translate}}</td>
            </tr>
            <tr data-ng-show="!clients || clients.length == 0">
                <td class="text-muted" data-ng-show="!clients" colspan="6">{{:: 'clients.instruction' | translate}}</td>
                <td class="text-muted" data-ng-show="searchLoaded && clients.length == 0 && lastSearch != null">{{:: 'no-results' | translate}}</td>
                <td class="text-muted" data-ng-show="searchLoaded && clients.length == 0 && lastSearch == null">{{:: 'no-clients-available' | translate}}</td>
            </tr>
        </tbody>
    </table>
</div>

<kc-menu></kc-menu>