Skip to content

Commit 8c3b588

Browse files
Merge branch 'master-local' into master-dist
2 parents c99be9a + 9936ac9 commit 8c3b588

File tree

61 files changed

+321
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+321
-101
lines changed

dist/angular-patternfly.js

+59-13
Original file line numberDiff line numberDiff line change
@@ -3921,6 +3921,7 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
39213921
bindings: {
39223922
config: '<',
39233923
data: '<',
3924+
tooltip: '<',
39243925
chartHeight: '<?',
39253926
centerLabel: '<?',
39263927
onThresholdChange: '&'
@@ -3986,19 +3987,31 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
39863987
ctrl.donutTooltip = function () {
39873988
return {
39883989
contents: function (d) {
3989-
var tooltipHtml;
3990-
3990+
// Default to percent format
3991+
var tooltipContent =
3992+
'<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3993+
Math.round(d[0].ratio * 100) + '% ' + d[0].name +
3994+
'</span>';
39913995
if (ctrl.config.tooltipFn) {
3992-
tooltipHtml = '<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3993-
ctrl.config.tooltipFn(d) +
3994-
'</span>';
3995-
} else {
3996-
tooltipHtml = '<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3997-
Math.round(d[0].ratio * 100) + '%' + ' ' + ctrl.config.units + ' ' + d[0].name +
3998-
'</span>';
3996+
tooltipContent =
3997+
'<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3998+
ctrl.config.tooltipFn(d) +
3999+
'</span>';
4000+
} else if (ctrl.tooltip === "amount") {
4001+
tooltipContent =
4002+
'<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
4003+
d[0].value + ' ' + ctrl.config.units + ' ' + d[0].name +
4004+
'</span>';
4005+
} else if (ctrl.tooltip === "both") {
4006+
tooltipContent =
4007+
'<table class="c3-tooltip"><tbody><tr>' +
4008+
'<td>' +
4009+
d[0].value + ' ' + ctrl.config.units + ' ' + d[0].name +
4010+
'</td><td>' +
4011+
Math.round(d[0].ratio * 100) + '%' +
4012+
'</td></tr></tbody></table>';
39994013
}
4000-
4001-
return tooltipHtml;
4014+
return tooltipContent;
40024015
}
40034016
};
40044017
};
@@ -4257,6 +4270,14 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
42574270
* <li> 'none' - does not display the center label
42584271
* </ul>
42594272
*
4273+
* @param {string=} tooltip specifies the value to show in the tooltip when hovering Used or Available chart segments
4274+
* <strong>Values:</strong>
4275+
* <ul style='list-style-type: none'>
4276+
* <li> 'percent' - displays the Used or Available percentage of the Total in the tooltop (default)
4277+
* <li> 'amount' - displays the Used or Available amount and units in the tooltip
4278+
* <li> 'both' - displays both the percentage and amount in the tooltip
4279+
* </ul>
4280+
*
42604281
* @param {int=} chartHeight height of the donut chart
42614282
* @param {function (threshold)} on-threshold-change user defined function to handle when thresolds change <br/>
42624283
* <strong>'threshold' Values:</strong>
@@ -4317,9 +4338,30 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
43174338
<pf-donut-pct-chart config="pctConfig" data="pctData" center-label="pctLabel"></pf-donut-pct-chart>
43184339
</div>
43194340
<div class="col-md-3 text-center">
4320-
<label>center-label = 'none'</label>
4341+
<label>center-label = 'none'</label>
4342+
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel"></pf-donut-pct-chart>
4343+
</div>
4344+
</div>
4345+
4346+
<div class="row">
4347+
<div class="col-md-12">
4348+
<hr>
4349+
</div>
4350+
</div>
4351+
4352+
<div class="row">
4353+
<div class="col-md-4 text-center">
4354+
<label>tooltip = 'percent'</label>
43214355
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel"></pf-donut-pct-chart>
43224356
</div>
4357+
<div class="col-md-4 text-center">
4358+
<label>tooltip = 'amount'</label>
4359+
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel" tooltip="tooltipAmount"></pf-donut-pct-chart>
4360+
</div>
4361+
<div class="col-md-4 text-center">
4362+
<label>tooltip = 'both'</label>
4363+
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel" tooltip="tooltipBoth"></pf-donut-pct-chart>
4364+
</div>
43234365
</div>
43244366

43254367
<div class="row">
@@ -4505,6 +4547,10 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
45054547
$scope.noLabel = "none";
45064548

45074549
//start demo 3rd row
4550+
$scope.tooltipAmount = "amount";
4551+
$scope.tooltipBoth = "both";
4552+
4553+
//start demo 4th row
45084554
$scope.configOrientationLeft = {
45094555
'units': 'GB',
45104556
'thresholds':{'warning':'60','error':'90'},
@@ -4573,7 +4619,7 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
45734619
'total': '1000'
45744620
};
45754621

4576-
//start demo 4th row
4622+
//start demo 5th row
45774623
$scope.custConfig = {
45784624
'chartId': 'custChart',
45794625
'units': 'MHz',

dist/angular-patternfly.min.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/docs/grunt-scripts/angular-patternfly.js

+59-13
Original file line numberDiff line numberDiff line change
@@ -3921,6 +3921,7 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
39213921
bindings: {
39223922
config: '<',
39233923
data: '<',
3924+
tooltip: '<',
39243925
chartHeight: '<?',
39253926
centerLabel: '<?',
39263927
onThresholdChange: '&'
@@ -3986,19 +3987,31 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
39863987
ctrl.donutTooltip = function () {
39873988
return {
39883989
contents: function (d) {
3989-
var tooltipHtml;
3990-
3990+
// Default to percent format
3991+
var tooltipContent =
3992+
'<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3993+
Math.round(d[0].ratio * 100) + '% ' + d[0].name +
3994+
'</span>';
39913995
if (ctrl.config.tooltipFn) {
3992-
tooltipHtml = '<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3993-
ctrl.config.tooltipFn(d) +
3994-
'</span>';
3995-
} else {
3996-
tooltipHtml = '<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3997-
Math.round(d[0].ratio * 100) + '%' + ' ' + ctrl.config.units + ' ' + d[0].name +
3998-
'</span>';
3996+
tooltipContent =
3997+
'<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
3998+
ctrl.config.tooltipFn(d) +
3999+
'</span>';
4000+
} else if (ctrl.tooltip === "amount") {
4001+
tooltipContent =
4002+
'<span class="donut-tooltip-pf" style="white-space: nowrap;">' +
4003+
d[0].value + ' ' + ctrl.config.units + ' ' + d[0].name +
4004+
'</span>';
4005+
} else if (ctrl.tooltip === "both") {
4006+
tooltipContent =
4007+
'<table class="c3-tooltip"><tbody><tr>' +
4008+
'<td>' +
4009+
d[0].value + ' ' + ctrl.config.units + ' ' + d[0].name +
4010+
'</td><td>' +
4011+
Math.round(d[0].ratio * 100) + '%' +
4012+
'</td></tr></tbody></table>';
39994013
}
4000-
4001-
return tooltipHtml;
4014+
return tooltipContent;
40024015
}
40034016
};
40044017
};
@@ -4257,6 +4270,14 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
42574270
* <li> 'none' - does not display the center label
42584271
* </ul>
42594272
*
4273+
* @param {string=} tooltip specifies the value to show in the tooltip when hovering Used or Available chart segments
4274+
* <strong>Values:</strong>
4275+
* <ul style='list-style-type: none'>
4276+
* <li> 'percent' - displays the Used or Available percentage of the Total in the tooltop (default)
4277+
* <li> 'amount' - displays the Used or Available amount and units in the tooltip
4278+
* <li> 'both' - displays both the percentage and amount in the tooltip
4279+
* </ul>
4280+
*
42604281
* @param {int=} chartHeight height of the donut chart
42614282
* @param {function (threshold)} on-threshold-change user defined function to handle when thresolds change <br/>
42624283
* <strong>'threshold' Values:</strong>
@@ -4317,9 +4338,30 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
43174338
<pf-donut-pct-chart config="pctConfig" data="pctData" center-label="pctLabel"></pf-donut-pct-chart>
43184339
</div>
43194340
<div class="col-md-3 text-center">
4320-
<label>center-label = 'none'</label>
4341+
<label>center-label = 'none'</label>
4342+
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel"></pf-donut-pct-chart>
4343+
</div>
4344+
</div>
4345+
4346+
<div class="row">
4347+
<div class="col-md-12">
4348+
<hr>
4349+
</div>
4350+
</div>
4351+
4352+
<div class="row">
4353+
<div class="col-md-4 text-center">
4354+
<label>tooltip = 'percent'</label>
43214355
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel"></pf-donut-pct-chart>
43224356
</div>
4357+
<div class="col-md-4 text-center">
4358+
<label>tooltip = 'amount'</label>
4359+
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel" tooltip="tooltipAmount"></pf-donut-pct-chart>
4360+
</div>
4361+
<div class="col-md-4 text-center">
4362+
<label>tooltip = 'both'</label>
4363+
<pf-donut-pct-chart config="noneConfig" data="noneData" center-label="noLabel" tooltip="tooltipBoth"></pf-donut-pct-chart>
4364+
</div>
43234365
</div>
43244366

43254367
<div class="row">
@@ -4505,6 +4547,10 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
45054547
$scope.noLabel = "none";
45064548

45074549
//start demo 3rd row
4550+
$scope.tooltipAmount = "amount";
4551+
$scope.tooltipBoth = "both";
4552+
4553+
//start demo 4th row
45084554
$scope.configOrientationLeft = {
45094555
'units': 'GB',
45104556
'thresholds':{'warning':'60','error':'90'},
@@ -4573,7 +4619,7 @@ angular.module( 'patternfly.card' ).component('pfInfoStatusCard', {
45734619
'total': '1000'
45744620
};
45754621

4576-
//start demo 4th row
4622+
//start demo 5th row
45774623
$scope.custConfig = {
45784624
'chartId': 'custChart',
45794625
'units': 'MHz',

dist/docs/js/docs-setup.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/docs/partials/api/patternfly.autofocus.pfFocused.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/autofocus/autofocus.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/cc7e9f8/src/autofocus/autofocus.js#L39" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfFocused</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/autofocus/autofocus.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6e7de99/src/autofocus/autofocus.js#L39" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfFocused</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.canvas.component.pfCanvas.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvas.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/cc7e9f8/src/canvas-view/examples/canvas.js#L335" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvas</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvas.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6e7de99/src/canvas-view/examples/canvas.js#L335" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvas</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.canvas</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.canvas.component.pfCanvasEditor.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvasEditor.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/cc7e9f8/src/canvas-view/examples/canvasEditor.js#L344" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvasEditor</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/canvas-view/examples/canvasEditor.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6e7de99/src/canvas-view/examples/canvasEditor.js#L344" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCanvasEditor</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.canvas</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.card.component.pfAggregateStatusCard.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/aggregate-status/aggregate-status-card.component.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/cc7e9f8/src/card/aggregate-status/aggregate-status-card.component.js#L205" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfAggregateStatusCard</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/aggregate-status/aggregate-status-card.component.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6e7de99/src/card/aggregate-status/aggregate-status-card.component.js#L205" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfAggregateStatusCard</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.card</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.card.component.pfCard - Timeframe Filters.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-timeframe.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/cc7e9f8/src/card/examples/card-timeframe.js#L96" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Timeframe Filters</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-timeframe.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6e7de99/src/card/examples/card-timeframe.js#L96" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Timeframe Filters</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.card</code>
33
</span>
44
</div>

dist/docs/partials/api/patternfly.card.component.pfCard - Trends.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-trend.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/cc7e9f8/src/card/examples/card-trend.js#L167" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Trends</code>
1+
<a href="https://github.com/patternfly/angular-patternfly/edit/master/src/card/examples/card-trend.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/patternfly/angular-patternfly/blob/6e7de99/src/card/examples/card-trend.js#L167" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">pfCard - Trends</code>
22
<div><span class="hint">directive in module <code ng:non-bindable="">patternfly.card</code>
33
</span>
44
</div>

0 commit comments

Comments
 (0)