Skip to content

Commit

Permalink
Update with dev branch: fix filter and type selection issue
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan687 committed May 28, 2016
1 parent 62d6b00 commit 09424cb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
29 changes: 15 additions & 14 deletions site/dist/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions site/dist/main.min.js

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions site/src/js/homePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,6 @@ var HomePage = React.createClass({
setTimeout(this.getTotalRecord, 1000);
}
},
getCount: function() {
if(subsetESTypes.length) {
feed.countStream(subsetESTypes, function(total, fromStream, method) {
this.streamCallback(total, fromStream, method);
}.bind(this));
}
},
watchStock: function(typeName) {
this.setState({
sortInfo: {
Expand Down Expand Up @@ -438,7 +431,7 @@ var HomePage = React.createClass({
this.getStreamingData(subsetESTypes);
input_state.selectedType = subsetESTypes;
this.watchSelectedRecord();
this.getCount();
this.applyGetStream();
},
typeCounter: function() {
var typeInfo = this.state.typeInfo;
Expand Down
18 changes: 13 additions & 5 deletions site/src/js/table/dataTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,29 @@ var DataTable = React.createClass({
if ($this.props.infoObj.showing != 0) {
fixed = ['json'];
columns = ['json'];
initial_final_cols = [{column: 'json', type: ''}];
} else {
fixed = [];
columns = [];
initial_final_cols = [];
}

fullColumns = {
type: '',
columns: columns
columns: columns,
final_cols: initial_final_cols
}
for (var each in data) {
fullColumns.type = data[each]['_type'];
for (column in data[each]) {
if (fixed.indexOf(column) <= -1 && column != '_id' && column != '_type') {
if (fixed.indexOf(column) <= -1 && column != '_id' && column != '_type' && column != '_checked') {
if (fullColumns.columns.indexOf(column) <= -1) {
fullColumns.columns.push(column);
var obj = {
type: data[each]['_type'],
column: column
};
fullColumns.final_cols.push(obj);
}
}
}
Expand Down Expand Up @@ -101,9 +109,9 @@ var DataTable = React.createClass({
'row': renderRow
});
}
var renderColumns = fullColumns.columns.map(function(item) {
return (<Column _item={item} key={item}
_type={fullColumns.type}
var renderColumns = fullColumns.final_cols.map(function(item) {
return (<Column _item={item.column} key={item.column}
_type={item.type}
_sortInfo={$this.props.sortInfo}
handleSort={$this.props.handleSort}
mappingObj={$this.props.mappingObj}
Expand Down

0 comments on commit 09424cb

Please sign in to comment.