Skip to content

Commit

Permalink
#1583 Remove the showDate filter
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Feb 25, 2021
1 parent 21f5354 commit 3d26c86
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</div>
<div class="text-success" ng-show="item.case.status !== 'Open'">
<small>
(Closed at {{item.case.endDate | showDate}} as <strong>{{$cmp.CaseResolutionStatus[item.case.resolutionStatus]}}</strong>)
(Closed at {{item.case.endDate | shortDate}} as <strong>{{$cmp.CaseResolutionStatus[item.case.resolutionStatus]}}</strong>)
</small>
</div>
<div class="text-danger" ng-if="item.case.mergeFrom">
Expand All @@ -137,7 +137,7 @@

<div class="case-date">
<a href ng-click="$cmp.addFilterValue('_createdAt', item.case._createdAt)">
<span uib-tooltip="{{item.case._createdAt | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.case._createdAt | shortDate}}</span>
<span uib-tooltip="{{item.case._createdAt | shortDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.case._createdAt | shortDate}}</span>
</a>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h4>
<td>
<div>
<a href ng-click="$vm.addFilterValue('_createdAt', template._createdAt)">
<span uib-tooltip="{{template._createdAt | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{template._createdAt | shortDate}}</span>
<span uib-tooltip="{{template._createdAt | shortDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{template._createdAt | shortDate}}</span>
</a>
</div>
</td>
Expand Down
9 changes: 7 additions & 2 deletions frontend/app/views/components/org/config.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,21 @@
<label class="col-lg-3 col-md-4 control-label">Define the default date format used to display dates</label>
<div class="col-lg-6 col-md-8">
<input class="form-control" type="text" name="defaultDateFormat" ng-model="$ctrl.configs['defaultDateFormat']">
<span>Result: <code>{{$ctrl.date | amDateFormat:$ctrl.configs['defaultDateFormat']}}</code></span>
<span>Result preview: <code>{{$ctrl.date | amDateFormat:$ctrl.configs['defaultDateFormat']}}</code></span>

<div class="mt-xxs">
<label>More examples:</label>
<ul class="list-unstyled">
<li><em class="text-bold">YYYY-MM-DD HH:mm</em> results in <code>{{$ctrl.date | amDateFormat:'YYYY-MM-DD HH:mm'}}</code></li>
<li><em class="text-bold">DD/MM/YYYY HH:mm</em> results in <code>{{$ctrl.date | amDateFormat:'DD/MM/YYYY HH:mm'}}</code></li>
<li><em class="text-bold">DD.MM.YY HH:mm:ss</em> results in <code>{{$ctrl.date | amDateFormat:'DD.MM.YY HH:mm:ss'}}</code></li>
<li><em class="text-bold">MM-DD-YYYY HH:mm:ss</em> results in <code>{{$ctrl.date | amDateFormat:'MM-DD-YYYY HH:mm:ss'}}</code></li>
<li><em class="text-bold">MM-DD-YYYY HH:mm:ssZ</em> results in <code>{{$ctrl.date | amDateFormat:'MM-DD-YYYY HH:mm:ssZ'}}</code></li>
<li><em class="text-bold">ddd, MMM Do, YYYY H:mm Z</em> results in <code>{{$ctrl.date | amDateFormat:'ddd, MMM Do, YYYY H:mm Z'}}</code></li>
</ul>
<div class="mt-xxs">
<span>For more details about the format <a href="https://momentjs.com/docs/#/displaying/format/" target="_blank">click here</a></span>
</div>

</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/directives/search/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div>
<span>
<i class="fa fa-calendar"></i> Date:
<strong class="text-muted">{{value.date | showDate}}</strong>
<strong class="text-muted">{{value.date | shortDate}}</strong>
</span>
<span class="ml-xxs">
<i class="fa fa-certificate"></i> Type:
Expand All @@ -29,7 +29,7 @@
<span class="ml-xxs">
<i class="glyphicon glyphicon-pushpin"></i> Attributes:
<strong class="text-muted">{{value.artifacts.length}}</strong>
</span>
</span>
</div>
<div class="mt-xs wrap" ng-if="value.tags.length>0">
<strong>Tags:</strong><tag-list data="value.tags"></tag-list>
Expand Down
10 changes: 5 additions & 5 deletions frontend/app/views/directives/search/audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
by <user-info value="value.createdBy" field="name"></user-info>

<i class="glyphicon glyphicon-calendar ml-xxs"></i>
Occurred on <span ng-bind="value.startDate | showDate"> </span>
Occurred on <span ng-bind="value.startDate | shortDate"> </span>
</div>

<div ng-switch="value.objectType">
Expand All @@ -23,17 +23,17 @@
</a>
</div>
<div>
<i class="glyphicon glyphicon-user"></i>
<i class="glyphicon glyphicon-user"></i>
<user-info value="value.stats.owner" field="name"></user-info>

<i class="glyphicon glyphicon-calendar ml-xxs"></i>
<span ng-bind="value.stats.startDate | showDate"></span>
<span ng-bind="value.stats.startDate | shortDate"></span>

<span ng-if="value.stats.endDate" class="text-success">
(
<strong>Closed</strong>
on
{{value.stats.endDate | showDate}}
{{value.stats.endDate | shortDate}}
as
<strong>{{value.stats.resolutionStatus}}</strong>)
</span>
Expand Down Expand Up @@ -80,7 +80,7 @@
<div>
<span>
<i class="fa fa-calendar"></i> Date:
<strong class="text-muted">{{value.stats.date | showDate}}</strong>
<strong class="text-muted">{{value.stats.date | shortDate}}</strong>
</span>
<span class="ml-xxs">
<i class="fa fa-certificate"></i> Type:
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/directives/search/case.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<user-info value="value.owner" field="name"></user-info>

<i class="glyphicon glyphicon-calendar ml-xxs"></i>
<span ng-bind="value.startDate | showDate"></span>
<span ng-bind="value.startDate | shortDate"></span>

<span ng-if="value.endDate" class="text-success">
(
<strong>Closed</strong>
on
{{value.endDate | showDate}}
{{value.endDate | shortDate}}
as
<strong>{{value.resolutionStatus}}</strong>)
</span>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/directives/search/observable-job.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<user-info value="base.createdBy" field="name"></user-info>

<i class="glyphicon glyphicon-calendar ml-xxs"></i>
Started on <span ng-bind="value.startDate | showDate"> </span>
Started on <span ng-bind="value.startDate | shortDate"> </span>

<span ng-if="value.endDate" class="text-success">
(
<strong>Finished</strong>
on
{{value.endDate | showDate}}
{{value.endDate | shortDate}}
as
<strong>{{value.status}}</strong>)
</span>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/directives/search/observable.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</a>
</div>
<div>
<i class="glyphicon glyphicon-user"></i>
<i class="glyphicon glyphicon-user"></i>
<user-info value="value.createdBy" field="name"></user-info>

<i class="glyphicon glyphicon-calendar ml-xxs"></i>
<span ng-bind="value.startDate | showDate"></span>
<span ng-bind="value.startDate | shortDate"></span>
</div>
<div class="mt-xs wrap" ng-if="value.tags.length>0">
<strong>Tags:</strong><tag-list data="value.tags"></tag-list>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/directives/search/task-log.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<div>
<i class="glyphicon glyphicon-calendar"></i>
<span ng-bind="value.startDate | showDate"></span>
<span ng-bind="value.startDate | shortDate"></span>

<i class="glyphicon glyphicon-pushpin ml-xxs"></i>
<span class="wrap" ng-bind="value.case_task.title"></span>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/directives/search/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
</a>
</div>
<div>
<i class="glyphicon glyphicon-user"></i>
<i class="glyphicon glyphicon-user"></i>
<user-info value="value.owner" field="name"></user-info>

<i class="glyphicon glyphicon-calendar ml-xxs" ng-if="value.startDate"></i>
<span ng-bind="value.startDate | showDate"></span>
<span ng-bind="value.startDate | shortDate"></span>
</div>
<div class="mt-xs wrap">
<span ng-bind="(value.description || 'No Description') | limitTo: 250"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h3 class="box-title">
</span>
<span>
<i class="glyphicon glyphicon-calendar"></i>
<span class="mr-xxxs">{{$vm.org.createdAt | showDate}}</span>
<span class="mr-xxxs">{{$vm.org.createdAt | shortDate}}</span>
</span>
<span ng-if="$vm.org.links.length > 0">
<i class="fa fa-link"></i>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/partials/admin/organisation/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h3 class="box-title">List of organisations</h3>
<td class="clearfix">
<user user-id="org.createdBy" icon-only="false" icon-size="m"></user>
</td>
<td>{{org.createdAt | showDate}}</td>
<td>{{org.createdAt | shortDate}}</td>
<td>
<span class="mr-xs text-primary">
<a ui-sref="app.administration.organisations-details({organisation: org.name})">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3 class="modal-title">Manage organisation links</h3>
{{org.name}}
</td>
<td>
{{org.createdAt | showDate}}
{{org.createdAt | shortDate}}
</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/partials/alert/event.dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h4 class="text-primary">
</span>
<span class="ml-xxs">
<strong><i class="fa fa-calendar"></i> Date: </strong>
<span>{{dialog.event.date | showDate}}</span>
<span>{{dialog.event.date | shortDate}}</span>
</span>
<span class="ml-xxs">
<strong><i class="fa fa-certificate"></i> Type: </strong>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/alert/event.similarity.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
<div class="text-success" ng-show="item.status !== 'Open'">
<small>
(Closed at {{item.endDate | showDate}} as <strong>{{dialog.CaseResolutionStatus[item.resolutionStatus]}}</strong>)
(Closed at {{item.endDate | shortDate}} as <strong>{{dialog.CaseResolutionStatus[item.resolutionStatus]}}</strong>)
</small>
</div>
<div class="text-danger" ng-if="item.mergeFrom">
Expand All @@ -53,7 +53,7 @@
</div>

<div class="case-date">
<span uib-tooltip="{{item.startDate | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.startDate | shortDate}}</span>
<span uib-tooltip="{{item.startDate | shortDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.startDate | shortDate}}</span>
</div>

<div class="case-similarity">
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/case/case.close.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ <h3 class="modal-title">Close Case #{{caze.number}}</h3>
<i class="text-success glyphicon glyphicon-ok"></i>
</td>
<td>{{task.title}}</td>
<td><user-info value="task.owner" field="name"></user-info><br>{{task.startDate | showDate}}</td>
<td><user-info value="task.owner" field="name"></user-info><br>{{task.startDate | shortDate}}</td>
</tr>

<tr ng-if="task.status == 'InProgress'" ng-class="{true:'warning'}[task.flag]">
<td align="center">
<i class=" glyphicon" ng-class="{true:'text-yellow glyphicon-flag', false:'text-primary glyphicon-play'}[task.flag]"></i>
</td>
<td>{{task.title}}</td>
<td><user-info value="task.owner" field="name"></user-info><br>{{task.startDate | showDate}}</td>
<td><user-info value="task.owner" field="name"></user-info><br>{{task.startDate | shortDate}}</td>
</tr>

<tr ng-if="task.status == 'Waiting'">
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/case/case.details.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h4 class="vpad10 text-primary">Basic Information</h4>
<updatable-date on-update="updateField('startDate', newValue)" value="caze.startDate"></updatable-date>
</dd>
<dd ng-if="!canEdit">
{{caze.startDate | showDate}}
{{caze.startDate | shortDate}}
</dd>
</dl>

Expand All @@ -84,7 +84,7 @@ <h4 class="vpad10 text-primary">Basic Information</h4>
<updatable-date on-update="updateField('endDate', newValue)" value="caze.endDate"></updatable-date>
</dd>
<dd class="text-success" ng-if="!canEdit">
{{caze.endDate | showDate}}
{{caze.endDate | shortDate}}
</dd>
</dl>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/case/case.links.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</div>
<div class="text-success" ng-show="item.status !== 'Open'">
<small>
(Closed at {{item.endDate | showDate}} as <strong>{{CaseResolutionStatus[item.resolutionStatus]}}</strong>)
(Closed at {{item.endDate | shortDate}} as <strong>{{CaseResolutionStatus[item.resolutionStatus]}}</strong>)
</small>
</div>
<div class="text-danger" ng-if="item.mergeFrom">
Expand All @@ -83,7 +83,7 @@
</div>

<div class="case-date" ng-switch="item.status">
<span uib-tooltip="{{item.startDate | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.startDate | shortDate}}</span><br/>
<span uib-tooltip="{{item.startDate | shortDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{item.startDate | shortDate}}</span><br/>
<case-duration ng-switch-when="Resolved" start="item.startDate" end="item.endDate" icon="fa-clock-o"></case-duration>
<case-duration ng-switch-when="Open" start="item.startDate" icon="fa-clock-o"></case-duration>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/case/case.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h3 class="box-title">List of cases ({{$vm.list.total || 0}} of {{$vm.caseCount}

<div class="text-success" ng-show="currentCase.status !== 'Open'">
<small>
(Closed at {{currentCase.endDate | showDate}} as <strong>{{$vm.CaseResolutionStatus[currentCase.resolutionStatus]}}</strong>)
(Closed at {{currentCase.endDate | shortDate}} as <strong>{{$vm.CaseResolutionStatus[currentCase.resolutionStatus]}}</strong>)
</small>
</div>
<div class="text-danger" ng-if="currentCase.mergeFrom">
Expand Down Expand Up @@ -132,7 +132,7 @@ <h3 class="box-title">List of cases ({{$vm.list.total || 0}} of {{$vm.caseCount}
<td>
<div>
<a href ng-click="$vm.addFilterValue('startDate', currentCase.startDate)">
<span uib-tooltip="{{currentCase.startDate | showDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{currentCase.startDate | shortDate}}</span>
<span uib-tooltip="{{currentCase.startDate | shortDate}}" tooltip-popup-delay="500" tooltip-placement="bottom">{{currentCase.startDate | shortDate}}</span>
</a>
</div>
<div ng-switch="currentCase.status">
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/case/case.merge.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ <h4>{{c.title}}</h4>
</span>
<span class="ml-xxs">
<i class="glyphicon glyphicon-calendar"></i>
<span>{{c.startDate | showDate}}</span>&nbsp;&nbsp;
<span>{{c.startDate | shortDate}}</span>&nbsp;&nbsp;
<span ng-show="isCaseClosed()" class="text-success">(Closed at
{{c.endDate | showDate}}
{{c.endDate | shortDate}}
as
<strong>{{CaseResolutionStatus[c.resolutionStatus]}}</strong>)</span>
</span>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/views/partials/case/details/related.cases.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h4 class="vpad10 text-primary">Related cases</h4>
<div>
<h5>Newest (<a href ui-sref="app.case.details({caseId:links[0].id})">Case # {{newestLink.caseId}} - {{newestLink.title}}</a>)</h5>
<div>
Created on <strong>{{newestLink.startDate | showDate:'YYYY-MM-DD'}}</strong>
Created on <strong>{{newestLink.startDate | shortDate:'YYYY-MM-DD'}}</strong>
</div>
<div>
Shares <strong><ng-pluralize count="newestLink.linksCount" when="{'one': '1 observable', 'other': '{} observables'}"></ng-pluralize></strong>
Expand All @@ -21,7 +21,7 @@ <h5>Newest (<a href ui-sref="app.case.details({caseId:links[0].id})">Case # {{ne
<div ng-show="links.length > 1">
<h5>Oldest (<a href ui-sref="app.case.details({caseId:oldestLink.id})">Case # {{oldestLink.caseId}} - {{oldestLink.title}}</a>)</h5>
<div>
Created on <strong>{{oldestLink.startDate | showDate:'YYYY-MM-DD'}}</strong>
Created on <strong>{{oldestLink.startDate | shortDate:'YYYY-MM-DD'}}</strong>
</div>
<div>
Shares
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h4 class="pv-xxs pr-xxs text-primary">
<i class="glyphicon" ng-class="{ Failure:'glyphicon-warning-sign text-warning', Success:'glyphicon-ok text-success', InProgress:'fa fa-cog fa-spin', Waiting:'fa fa-cog fa-spin'}[job.status]"></i>
</span>

<a href ng-click="showReport(job.id)" uib-tooltip="View report">{{(job.endDate || job.startDate) | showDate}}</a> ({{job.cortexId}})
<a href ng-click="showReport(job.id)" uib-tooltip="View report">{{(job.endDate || job.startDate) | shortDate}}</a> ({{job.cortexId}})
</li>
</ul>
</td>
Expand Down Expand Up @@ -96,7 +96,7 @@ <h4 class="pv-xxs pr-xxs text-primary">
<div class="row observable-report" ng-if="report">
<div class="col-md-12">
<h4 class="pad10 text-primary">
Report <small>for {{report.template}} analysis of {{(report.endDate || report.startDate) | showDate}}</small>
Report <small>for {{report.template}} analysis of {{(report.endDate || report.startDate) | shortDate}}</small>
<span class="pull-right">
<small><a href class="text-primary" ng-click="showRaw = !showRaw">{{showRaw ? 'Hide': 'Show'}} Raw Report</a></small>
<small class="mh-xxxs">|</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h4 class="vpad10 text-primary">

<dl class="dl-horizontal clear">
<dt class="pull-left">Date added</dt>
<dd>{{artifact.startDate | showDate}}</dd>
<dd>{{artifact.startDate | shortDate}}</dd>
</dl>

<dl class="dl-horizontal clear">
Expand Down
Loading

0 comments on commit 3d26c86

Please sign in to comment.