Skip to content

Commit

Permalink
#76 Fix the date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jan 13, 2017
1 parent 563af84 commit dbd9a6b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ui/app/scripts/controllers/case/CaseListCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
});
}
} else if (filterDef.type === 'date') {
date = moment(value, ['YYYYMMDDTHHmmZZ', 'DD-MM-YYYY HH:mm']);
date = moment(value);
this.uiSrv.activeFilters[field] = {
value: {
from: date.hour(0).minutes(0).seconds(0).toDate(),
Expand All @@ -107,7 +107,7 @@
}]
};
} else if (filterDef.type === 'date') {
date = moment(value, ['YYYYMMDDTHHmmZZ', 'DD-MM-YYYY HH:mm']);
date = moment(value);
this.uiSrv.activeFilters[field] = {
value: {
from: date.hour(0).minutes(0).seconds(0).toDate(),
Expand Down
4 changes: 2 additions & 2 deletions ui/app/scripts/controllers/case/CaseObservablesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
});
}
} else if (filterDef.type === 'date') {
date = moment(value, ['YYYYMMDDTHHmmZZ', 'DD-MM-YYYY HH:mm']);
date = moment(value);
$scope.uiSrv.activeFilters[field] = {
value: {
from: date.hour(0).minutes(0).seconds(0).toDate(),
Expand All @@ -112,7 +112,7 @@
}]
};
} else if (filterDef.type === 'date') {
date = moment(value, ['YYYYMMDDTHHmmZZ', 'DD-MM-YYYY HH:mm']);
date = moment(value);
$scope.uiSrv.activeFilters[field] = {
value: {
from: date.hour(0).minutes(0).seconds(0).toDate(),
Expand Down
6 changes: 5 additions & 1 deletion ui/app/views/partials/case/case.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ <h4>List of cases ({{$vm.list.total || 0}} of {{$vm.caseStats.count}})</h4>
<td class="nowrap">
<user user-id="currentCase.owner" icon-only="true" icon-size="m"></user>
</td>
<td>{{currentCase.startDate | showDate}}</td>
<td>
<a href ng-click="$vm.addFilterValue('startDate', currentCase.startDate)">
<span tooltip="{{currentCase.startDate | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{currentCase.startDate | shortDate}}</span>
</a>
</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ <h4>List of observables ({{artifacts.total || 0}} of {{artifactStats.count}})</h
<a href="" ng-click="addFilterValue('dataType', artifact.dataType)"><span ng-bind="artifact.dataType"></span></a>
</td>
<td class="wrap clickable" ng-click="openArtifact(artifact)">{{(artifact.data | fang) || (artifact.attachment.name | fang)}}</td>
<td class="clickable" ng-switch="countReports(artifact)">
<span ng-switch-when="0">
<td ng-switch="countReports(artifact)">
<span ng-switch-when="0" class="clickable">
<a href ng-click="runAllOnObservable(artifact)">Run all analyzers</a>
</span>
<span ng-switch-default>
Expand Down

0 comments on commit dbd9a6b

Please sign in to comment.