@@ -308,21 +308,38 @@ angular.module( 'patternfly.card' ).directive('pfAggregateStatusCard', function
308
308
309
309
<file name="index.html">
310
310
<div ng-controller="ChartCtrl">
311
- <div pf-card head-title="Card Title" sub-title="Card Subtitle" filter="filterConfigHeader" style="width: 50%">
312
- [Card Contents] <button>Click Me</button> Timeframe filter in header
311
+ <label class="label-title">Timeframe filter in header</label>
312
+ <div pf-card head-title="Card Title" sub-title="Card Subtitle" show-top-border="true" filter="filterConfigHeader" style="width: 50%">
313
+ Card Contents
313
314
</div>
314
315
316
+ <label class="label-title">Footer with Link & Timeframe filter</label>
315
317
<div pf-card head-title="Card Title" sub-title="Card Subtitle" show-top-border="true"
316
318
footer="footerConfig" filter="filterConfig" style="width: 50%">
317
- [ Card Contents] <button>Click Me</button> Footer with Link & Timeframe filter
319
+ Card Contents
318
320
</div>
319
321
322
+ <label class="label-title">Card With Single Trend Chart</label>
323
+ <div pf-card head-title="Cluster Utilization" show-top-border="true" footer="footerConfig" filter="filterConfig" style="width: 50%">
324
+ <div pf-trends-chart config="configSingle" chart-data="dataSingle"></div>
325
+ </div>
326
+
327
+ <label class="label-title">Card With Multiple Trends</label>
320
328
<div pf-card head-title="Performance" sub-title="Last 30 Days" show-top-border="false"
321
329
show-titles-separator="false" style="width: 65%" footer="actionBarConfig">
322
330
<div pf-trends-chart config="configVirtual" chart-data="dataVirtual"></div>
323
331
<div pf-trends-chart config="configPhysical" chart-data="dataPhysical"></div>
324
332
<div pf-trends-chart config="configMemory" chart-data="dataMemory"></div>
325
333
</div>
334
+
335
+ <label class="label-title">Card With Multiple Utilization Bars</label>
336
+ <div pf-card head-title="System Resources" show-top-border="true" style="width: 65%">
337
+ <div pf-utilization-bar-chart chart-data=data2 chart-title=title2 layout=layoutInline units=units2 threshold-error="85" threshold-warning="60"></div>
338
+ <div pf-utilization-bar-chart chart-data=data3 chart-title=title3 layout=layoutInline units=units3 threshold-error="85" threshold-warning="60"></div>
339
+ <div pf-utilization-bar-chart chart-data=data4 chart-title=title4 layout=layoutInline units=units4 threshold-error="85" threshold-warning="60"></div>
340
+ <div pf-utilization-bar-chart chart-data=data5 chart-title=title5 layout=layoutInline units=units5 threshold-error="85" threshold-warning="60"></div>
341
+ </div>
342
+
326
343
</div>
327
344
</file>
328
345
<file name="script.js">
@@ -362,6 +379,21 @@ angular.module( 'patternfly.card' ).directive('pfAggregateStatusCard', function
362
379
dates.push(new Date(today.getTime() - (d * 24 * 60 * 60 * 1000)));
363
380
}
364
381
382
+ $scope.configSingle = {
383
+ 'chartId' : 'example2TrendsChart',
384
+ 'title' : 'Storage Capacity',
385
+ 'layout' : 'compact',
386
+ 'valueType' : 'actual',
387
+ 'units' : 'TB',
388
+ 'tooltipType' : 'percentage'
389
+ };
390
+
391
+ $scope.dataSingle = {
392
+ 'total': '250',
393
+ 'xData': dates,
394
+ 'yData': ['used', '90', '20', '30', '20', '20', '10', '14', '20', '25', '68', '44', '56', '78', '56', '67', '88', '76', '65', '87', '76']
395
+ };
396
+
365
397
$scope.configVirtual = {
366
398
'chartId' : 'virtualTrendsChart',
367
399
'layout' : 'inline',
@@ -411,6 +443,40 @@ angular.module( 'patternfly.card' ).directive('pfAggregateStatusCard', function
411
443
alert("Footer Callback Fn Called");
412
444
}
413
445
}
446
+
447
+ $scope.title2 = 'Memory';
448
+ $scope.units2 = 'GB';
449
+
450
+ $scope.data2 = {
451
+ 'used': '25',
452
+ 'total': '100'
453
+ };
454
+
455
+ $scope.title3 = 'CPU Usage';
456
+ $scope.units3 = 'MHz';
457
+
458
+ $scope.data3 = {
459
+ 'used': '420',
460
+ 'total': '500',
461
+ };
462
+
463
+ $scope.title4 = 'Disk Usage';
464
+ $scope.units4 = 'TB';
465
+ $scope.data4 = {
466
+ 'used': '350',
467
+ 'total': '500',
468
+ };
469
+
470
+ $scope.title5 = 'Disk I/O';
471
+ $scope.units5 = 'I/Ops';
472
+ $scope.data5 = {
473
+ 'used': '450',
474
+ 'total': '500',
475
+ };
476
+
477
+ $scope.layoutInline = {
478
+ 'type': 'inline'
479
+ };
414
480
});
415
481
</file>
416
482
</example>
@@ -1721,13 +1787,6 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ["c3ChartDefau
1721
1787
<button ng-click="addDataPoint()">Add Data Point</button>
1722
1788
</div>
1723
1789
</div>
1724
- <hr class="col-md-12">
1725
- <div class="col-md-12">
1726
- <div pf-card head-title="Cluster Utilization" show-top-border="true"
1727
- footer="footerConfig" filter="filterConfig">
1728
- <div pf-trends-chart config="config2" chart-data="data"></div>
1729
- </div>
1730
- </div>
1731
1790
</div>
1732
1791
</file>
1733
1792
<file name="script.js">
@@ -1744,15 +1803,6 @@ angular.module('patternfly.charts').directive('pfSparklineChart', ["c3ChartDefau
1744
1803
'tooltipType' : 'percentage'
1745
1804
};
1746
1805
1747
- $scope.config2 = {
1748
- 'chartId' : 'example2TrendsChart',
1749
- 'title' : 'Storage Capacity',
1750
- 'layout' : 'compact',
1751
- 'valueType' : 'actual',
1752
- 'units' : 'TB',
1753
- 'tooltipType' : 'percentage'
1754
- };
1755
-
1756
1806
$scope.footerConfig = {
1757
1807
'iconClass' : 'fa fa-plus-circle',
1758
1808
'text' : 'Add New Cluster',
@@ -1889,32 +1939,20 @@ angular.module('patternfly.charts').directive('pfTrendsChart', function () {
1889
1939
<example module="patternfly.example">
1890
1940
<file name="index.html">
1891
1941
<div ng-controller="ChartCtrl">
1892
- <div pf-utilization-bar-chart chart-data=data1 chart-title=title1 units=units1></div>
1893
- <hr>
1894
- <div pf-card head-title="Utilization Bar Chart">
1895
- <div pf-utilization-bar-chart chart-data=data2 chart-title=title2 units=units2 threshold-error="85" threshold-warning="60"></div>
1896
- <div pf-utilization-bar-chart chart-data=data3 chart-title=title3 units=units3 threshold-error="85" threshold-warning="60"></div>
1897
- <div pf-utilization-bar-chart chart-data=data4 chart-title=title4 units=units4 threshold-error="85" threshold-warning="60"></div>
1898
- <div pf-utilization-bar-chart chart-data=data5 chart-title=title5 units=units5 threshold-error="85" threshold-warning="60"></div>
1899
- </div>
1900
-
1901
- <hr>
1902
- <label><strong>layout='inline'</strong></label>
1903
- <div pf-card head-title="Utilization Bar Chart">
1904
- <div pf-utilization-bar-chart chart-data=data2 chart-title=title2short layout=layoutInline units=units2 threshold-error="85" threshold-warning="60"></div>
1905
- <div pf-utilization-bar-chart chart-data=data3 chart-title=title3 layout=layoutInline units=units3 threshold-error="85" threshold-warning="60"></div>
1906
- <div pf-utilization-bar-chart chart-data=data4 chart-title=title4 layout=layoutInline units=units4 threshold-error="85" threshold-warning="60"></div>
1907
- <div pf-utilization-bar-chart chart-data=data5 chart-title=title5 layout=layoutInline units=units5 threshold-error="85" threshold-warning="60"></div>
1908
- </div>
1909
1942
1910
- <hr>
1911
- <label><strong>layout='inline', footer-label-format='percent', and custom chart-footer labels</strong></label>
1912
- <div pf-card head-title="Utilization Bar Chart">
1913
- <div pf-utilization-bar-chart chart-data=data2 chart-title=title2short layout=layoutInline footer-label-format='percent' units=units2 threshold-error="85" threshold-warning="60"></div>
1914
- <div pf-utilization-bar-chart chart-data=data3 chart-title=title3 layout=layoutInline footer-label-format='percent' units=units3 threshold-error="85" threshold-warning="60"></div>
1915
- <div pf-utilization-bar-chart chart-data=data4 chart-title=title4 chart-footer=footer1 layout=layoutInline units=units4 threshold-error="85" threshold-warning="60"></div>
1916
- <div pf-utilization-bar-chart chart-data=data5 chart-title=title5 chart-footer=footer2 layout=layoutInline units=units5 threshold-error="85" threshold-warning="60"></div>
1917
- </div>
1943
+ <label class="label-title">Default Layout, no Thresholds</label>
1944
+ <div pf-utilization-bar-chart chart-data=data1 chart-title=title1 units=units1></div>
1945
+ <br>
1946
+ <label class="label-title">Inline Layouts with Error, Warning, and Ok Thresholds</label>
1947
+ <div pf-utilization-bar-chart chart-data=data5 chart-title=title5 layout=layoutInline units=units5 threshold-error="85" threshold-warning="60"></div>
1948
+ <div pf-utilization-bar-chart chart-data=data3 chart-title=title3 layout=layoutInline units=units3 threshold-error="85" threshold-warning="60"></div>
1949
+ <div pf-utilization-bar-chart chart-data=data2 chart-title=title2 layout=layoutInline units=units2 threshold-error="85" threshold-warning="60"></div>
1950
+ <br>
1951
+ <label class="label-title">layout='inline', footer-label-format='percent', and custom chart-footer labels</label>
1952
+ <div pf-utilization-bar-chart chart-data=data2 chart-title=title2 layout=layoutInline footer-label-format='percent' units=units2 threshold-error="85" threshold-warning="60"></div>
1953
+ <div pf-utilization-bar-chart chart-data=data3 chart-title=title3 layout=layoutInline footer-label-format='percent' units=units3 threshold-error="85" threshold-warning="60"></div>
1954
+ <div pf-utilization-bar-chart chart-data=data4 chart-title=title4 chart-footer=footer1 layout=layoutInline units=units4 threshold-error="85" threshold-warning="60"></div>
1955
+ <div pf-utilization-bar-chart chart-data=data5 chart-title=title5 chart-footer=footer2 layout=layoutInline units=units5 threshold-error="85" threshold-warning="60"></div>
1918
1956
</div>
1919
1957
</file>
1920
1958
@@ -1931,8 +1969,7 @@ angular.module('patternfly.charts').directive('pfTrendsChart', function () {
1931
1969
'total': '24'
1932
1970
};
1933
1971
1934
- $scope.title2 = 'Memory Utilization';
1935
- $scope.title2short = 'Memory';
1972
+ $scope.title2 = 'Memory';
1936
1973
$scope.units2 = 'GB';
1937
1974
1938
1975
$scope.data2 = {
0 commit comments