summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole3/frontend/src/app/pages/client/client.component.html
blob: 81c0a3ac311ef29d60484a5d92dafba7d3239603 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<section class="content-header">
    <h1 translate="{{client.name||'new_client'}}">
    </h1>
    <ol class="breadcrumb">
        <li><a [routerLink]="'/app/dashboard'"><i class="fa fa-dashboard"></i> {{'dashboard'|translate}}</a></li>
        <li><a [routerLink]="'/app/ous'"><i class="fa fa-th"></i> {{'ous'|translate}}</a></li>
        <li class="active" translate="client"></li>
    </ol>
</section>
<section fixed-toolboxbar class="toolboxbar">
    <div>
        <div class="col-md-12">
            <div class="box-tools pull-right">
                <button class="btn btn-primary" translate="save" (click)="save()"></button>
            </div>
        </div>
    </div>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <mk-box class="box box-primary" [isRemovable]="false" [isCollapsable]="false">
                <mk-box-header class="box-header with-border">
                    <h3 class="box-title" translate="client_data"></h3>
                    <div class="box-tools pull-right">
                        <div class="btn-group" *ngIf="client.id !== 0">
                            <app-og-information-options></app-og-information-options>
                            <app-og-commands-options></app-og-commands-options>
                        </div>
                    </div>
                </mk-box-header>
                <mk-box-content>
                    <form role="form" name="Form">
                        <app-form-input [formType]="form" [cols]="2" [model]="client"></app-form-input>
                    </form>
                </mk-box-content>
                <mk-box-footer>
                    <mk-box class="box box-default box-solid" [isRemovable]="false" *ngFor="let diskConfig of client.disksConfig">
                        <mk-box-header class="box-header with-border">
                            <div class="row">
                                <div class="col-md-4">
                                    <span translate="num_disk"></span>: <b>{{diskConfig.disk}}</b>
                                </div>
                                <div class="col-md-4">
                                    <span translate="part_table"></span>: <b>{{diskConfig.parttable}}</b>
                                </div>
                                <div class="col-md-4">
                                    <span translate="size"></span>: <b>{{getSizeInGB(diskConfig.size)}} GB</b>
                                </div>
                            </div>
                            <!-- /.box-tools -->
                        </mk-box-header>
                        <!-- /.box-header -->
                        <mk-box-content class="box-body">
                            <div class="row">
                                <div class="col-md-8">
                                    <table class="table table-condensed table-striped">
                                        <tbody>
                                        <tr>
                                            <th translate="partition"></th>
                                            <th translate="part_type"></th>
                                            <th translate="filesystem"></th>
                                            <th translate="size"></th>
                                            <th translate="usage"></th>
                                            <th translate="os"></th>
                                        </tr>
                                        </tbody>
                                        <ng-container *ngFor="let partition of diskConfig.partitions">
                                            <tbody *ngIf="partition.size > 0">
                                            <tr ng-class="{'odd': $index%2 == 0, 'even': $index%2 != 0}">
                                                <td>{{partition.numPartition}}</td>
                                                <td>{{partition.parttype}}</td>
                                                <td>{{partition.filesystem}}</td>
                                                <td>{{getSizeInGB(partition.size)}} GB</td>
                                                <td><span class="badge"
                                                          [ngClass]="getPartitionUsageClass(partition.usage)">{{partition.usage}}
                                                    %</span></td>
                                                <td>{{partition.osName}}</td>
                                            </tr>
                                            <tr *ngIf="partition.partitionCode == 'ca' && partition.cacheContent.files.length > 0"
                                                class="client-cache-info"
                                                ng-class="{'odd': $index%2 == 0, 'even': $index%2 != 0}">
                                                <td colspan="6">
                                                    <span style="font-weight: bold" translate="cache_content"></span>
                                                    <table class="table">
                                                        <thead>
                                                        <tr>
                                                            <th translate="type"></th>
                                                            <th translate="name"></th>
                                                            <th translate="size"></th>
                                                        </tr>
                                                        </thead>
                                                        <tbody>
                                                        <tr *ngFor="let file of partition.cacheContent.files">
                                                            <td>{{file.type}}</td>
                                                            <td>{{file.name}}</td>
                                                            <td>{{file.size}}</td>
                                                        </tr>
                                                        <tr>
                                                            <td style="font-weight: bold" translate="free_space"
                                                                colspan="2"></td>
                                                            <td>{{partition.cacheContent.freeSpace}}</td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </ng-container>
                                    </table>
                                </div>
                                <div class="col-md-4">
                                    <!--flot dataset="diskConfig.diskChartData" options="diskConfig.diskChartOptions" height="200px"></flot-->
                                    <div class="chart" >
                                        <canvas baseChart
                                                [data]="diskConfig.diskChartData"
                                                [labels]="diskConfig.diskChartLabels"
                                                [colors]="diskConfig.diskPieChartColors"
                                                [chartType]="'pie'"
                                                [plugins]="pluginDataLabels"
                                                [options]="diskConfig.diskChartOptions">
                                        </canvas>
                                    </div>
                                </div>
                            </div>
                        </mk-box-content>
                        <!-- /.box-body -->
                    </mk-box>
                </mk-box-footer>
            </mk-box>
        </div>
    </div>
</section>