in dashboardv2/public/js/views/profile/ProfileTableLayoutView.js [182:348]
getAuditTableColumns: function() {
var that = this;
return this.profileCollection.constructor.getTableCols({
name: {
label: "Name",
cell: "Html",
editable: false,
sortable: true,
sortType: 'toggle',
direction: 'ascending',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
return '<div><a href="#!/detailPage/' + model.get('guid') + '?profile=true">' + rawValue + '</a></div>';
}
})
},
type: {
label: "Type",
cell: "String",
editable: false,
sortable: true,
sortType: 'toggle',
},
nonNullData: {
label: "% NonNull",
cell: "Html",
editable: false,
sortable: true,
sortType: 'toggle',
width: "180",
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
if (rawValue < 50) {
var barClass = ((rawValue > 30) && (rawValue <= 50)) ? "progress-bar-warning" : "progress-bar-danger";
} else {
var barClass = "progress-bar-success";
}
return '<div class="progress cstm_progress" title="' + rawValue + '%"><div class="progress-bar ' + barClass + ' cstm_success-bar progress-bar-striped" style="width:' + rawValue + '%">' + rawValue + '%</div></div>'
}
})
},
distributionDecile: {
label: "Distribution",
cell: "Html",
editable: false,
sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var sparkarray = [];
var distibutionObj = Utils.getProfileTabType(model.toJSON());
if (distibutionObj) {
_.each(distibutionObj.actualObj, function(obj) {
sparkarray.push(obj.count);
})
}
return '<span data-guid="' + model.get('guid') + '" class="sparklines" sparkType="bar" sparkBarColor="#38BB9B" values="' + sparkarray.join(',') + '"></span>'
}
})
},
cardinality: {
label: "Cardinality",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle'
},
minValue: {
label: "Min",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var profileObj = Utils.getProfileTabType(model.toJSON(), true);
if (profileObj && profileObj.type === "numeric") {
return rawValue;
}
return "-";
}
})
},
maxValue: {
label: "Max",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var profileObj = Utils.getProfileTabType(model.toJSON(), true);
if (profileObj && profileObj.type === "numeric") {
return rawValue;
}
return "-";
}
})
},
averageLength: {
label: "Average Length",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var profileObj = Utils.getProfileTabType(model.toJSON(), true);
if (profileObj && profileObj.type === "string") {
return rawValue;
}
return "-";
}
})
},
maxLength: {
label: "Max Length",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var profileObj = Utils.getProfileTabType(model.toJSON(), true);
if (profileObj && profileObj.type === "string") {
return rawValue;
}
return "-";
}
})
},
meanValue: {
label: "Mean",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var profileObj = Utils.getProfileTabType(model.toJSON(), true);
if (profileObj && profileObj.type === "numeric") {
return rawValue;
}
return "-";
}
})
},
medianValue: {
label: "Median",
cell: "Number",
editable: false,
sortable: true,
sortType: 'toggle',
formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) {
var profileObj = Utils.getProfileTabType(model.toJSON(), true);
if (profileObj && profileObj.type === "numeric") {
return rawValue;
}
return "-";
}
})
}
}, this.profileCollection);
}