Fix Bug 1973: VIM Resources Type Overview issue in Dashboard
[osm/NG-UI.git] / src / app / vim-accounts / Resources-Overview / ResourcesOverviewComponent.html
1 <!--
2 Copyright 2020 TATA ELXSI
3
4 Licensed under the Apache License, Version 2.0 (the 'License');
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
17 -->
18 <div class="row">
19 <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
20 <div class="row d-flex flex-row justify-content-between px-3 py-2">
21 <div class="d-flex align-items-center header-style">{{resourcesData.name}}</div>
22 <span class="button">
23 <label class="switch ml-1">
24 <input type="checkbox" (change)="changeChartType($event.target.checked)">
25 <div class="slider round">
26 <span class="on">{{ 'PAGE.VIMDETAILS.DOUGHNUT' | translate }}</span>
27 <span class="off">{{ 'PAGE.VIMDETAILS.PIE' | translate }}</span>
28 </div>
29 </label>
30 </span>
31 </div>
32 <ng-container *ngFor="let showData of chartData">
33 <div class="header-style ml-3 mt-2">{{showData.heading}}</div>
34 <div class="row mt-2">
35 <div class="col-xs-{{12/showData.length}} col-sm-{{12/showData.length}} col-md-{{12/showData.length}} col-lg-{{12/showData.length}} col-xl-{{12/showData.length}}"
36 *ngFor="let list of showData.data;let i = index;">
37 <div class="chartData-card card text-center text-primary">
38 <canvas class="my-2"
39 baseChart
40 [data]="list.data"
41 [labels]="chartLabels"
42 [chartType]="chartType"
43 [options]="chartOptions"
44 [legend]="chartLegend"
45 [colors]="list.colorValues">
46 </canvas>
47 <div class="no-data" *ngIf="list.values.total === 0 || list.values.total === null">
48 <h4><strong>{{'PAGE.VIMDETAILS.NODATA' | translate}}</strong></h4>
49 </div>
50 <div class="card-body">
51 <h5 class="card-title"><strong>{{list.title}}</strong></h5>
52 <p class="card-text">
53 {{ (list.title === 'Floating IPs' ? 'PAGE.VIMDETAILS.ALLOCATED' : 'PAGE.VIMDETAILS.USED') | translate }}
54 {{list.values.used}}{{ list.title === 'RAM' || list.title === 'Volume Storage' ? list.values.used > 0 ? 'GB' : 'Bytes' : '' }}
55 of {{list.values.total}}{{ list.title === 'RAM' || list.title === 'Volume Storage' ? 'GB' : '' }}
56 </p>
57 </div>
58 </div>
59 </div>
60 </div>
61 </ng-container>
62 </div>
63 </div>