Skip to content

Commit

Permalink
Chart data retruns empty chart for uknwonwn chart types
Browse files Browse the repository at this point in the history
  • Loading branch information
PanSpagetka committed Oct 4, 2017
1 parent 9bb941a commit d6f8352
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/assets/javascripts/miq_application.js
Expand Up @@ -1536,7 +1536,12 @@ function rbacGroupLoadTab(id) {

function chartData(type, data, data2) {
if (type === undefined) {
return;
return {data :{columns: []}};
}

var config = _.cloneDeep(ManageIQ.charts.c3config[type]);
if (config === undefined) {
return {data :{columns: []}};
}

if (_.isObject(data.miq)) {
Expand Down Expand Up @@ -1607,7 +1612,7 @@ function chartData(type, data, data2) {
};
}

var config = _.cloneDeep(ManageIQ.charts.c3config[type]);

// some PatternFly default configs define contents function, but it breaks formatting
if (_.isObject(config.tooltip)) {
config.tooltip.contents = undefined;
Expand Down

0 comments on commit d6f8352

Please sign in to comment.