diff --git a/.jshintrc b/.jshintrc
index 3ed9f59504..0239abbde6 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -23,7 +23,8 @@
"it": false,
"expect": false,
"context": false,
- "describe": false
+ "describe": false,
+ "moment": false
},
"strict": false,
"quotmark": false,
diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js
index ed0a3b7ab8..2ee0160c33 100644
--- a/awx/ui/static/js/app.js
+++ b/awx/ui/static/js/app.js
@@ -179,7 +179,8 @@ var tower = angular.module('Tower', [
'CreateCustomInventoryHelper',
'CustomInventoryListDefinition',
'AdhocHelper',
- 'features'
+ 'features',
+ 'longDateFilter'
])
.constant('AngularScheduler.partials', urlPrefix + 'lib/angular-scheduler/lib/')
diff --git a/awx/ui/static/js/controllers/Home.js b/awx/ui/static/js/controllers/Home.js
index e3a8c2dd38..d130501828 100644
--- a/awx/ui/static/js/controllers/Home.js
+++ b/awx/ui/static/js/controllers/Home.js
@@ -422,7 +422,7 @@ export function HomeGroups($log, $scope, $filter, $compile, $location, $routePar
html += "
| \n";
- html += "" + ($filter('date')(row.finished,'MM/dd HH:mm:ss')).replace(/ /,' ') + " | ";
+ html += "" + ($filter('longDate')(row.finished)).replace(/ /,' ') + " | ";
html += "" + ellipsis(row.name) + " | ";
html += "\n";
@@ -457,7 +457,7 @@ export function HomeGroups($log, $scope, $filter, $compile, $location, $routePar
data.results.forEach( function(row) {
html += "";
html += " | ";
- html += "" + ($filter('date')(row.last_updated,'MM/dd HH:mm:ss')).replace(/ /,' ') + " | ";
+ html += "" + ($filter('longDate')(row.last_updated)).replace(/ /,' ') + " | ";
html += "" + ellipsis(row.summary_fields.group.name) + " | ";
html += "
\n";
});
diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js
index 688f1f1fd4..9c56d8bc03 100644
--- a/awx/ui/static/js/controllers/Inventories.js
+++ b/awx/ui/static/js/controllers/Inventories.js
@@ -202,7 +202,7 @@ export function InventoriesList($scope, $rootScope, $location, $log,
html += "\n";
html += " | \n";
- html += "" + ($filter('date')(row.finished,'MM/dd HH:mm:ss')).replace(/ /,' ') + " | ";
+ html += "" + ($filter('longDate')(row.finished)).replace(/ /,' ') + " | ";
html += "" + ellipsis(row.name) + " | ";
html += "
\n";
@@ -238,7 +238,7 @@ export function InventoriesList($scope, $rootScope, $location, $log,
if (row.related.last_update) {
html += "";
html += " | ";
- html += "" + ($filter('date')(row.last_updated,'MM/dd HH:mm:ss')).replace(/ /,' ') + " | ";
+ html += "" + ($filter('longDate')(row.last_updated)).replace(/ /,' ') + " | ";
html += "" + ellipsis(row.summary_fields.group.name) + " | ";
html += "
\n";
}
diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js
index 8c6253ae87..df254daa1c 100644
--- a/awx/ui/static/js/controllers/JobEvents.js
+++ b/awx/ui/static/js/controllers/JobEvents.js
@@ -175,7 +175,7 @@ export function JobEventsList($sce, $filter, $scope, $rootScope, $location, $log
}
//cDate = new Date(set[i].created);
//set[i].created = FormatDate(cDate);
- set[i].created = $filter('date')(set[i].created, 'MM/dd HH:mm:ss');
+ set[i].created = $filter('longDate')(set[i].created);
}
// Need below lookup to get inventory_id, which is not on event record. Plus, good idea to get status and name
@@ -360,4 +360,4 @@ export function JobEventsEdit($scope, $rootScope, $compile, $location, $log, $ro
JobEventsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'JobEventsForm', 'GenerateForm',
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ClearScope', 'GetBasePath', 'FormatDate', 'EventView', 'Wait'
-];
\ No newline at end of file
+];
diff --git a/awx/ui/static/js/filters.js b/awx/ui/static/js/filters.js
index aaf9f04c17..676295312d 100644
--- a/awx/ui/static/js/filters.js
+++ b/awx/ui/static/js/filters.js
@@ -1,7 +1,9 @@
-import sanitizeFilter from 'tower/filters/sanitize/xss-sanitizer.filter';
-import capitalizeFilter from 'tower/filters/capitalize.filter';
+import sanitizeFilter from 'tower/shared/xss-sanitizer.filter';
+import capitalizeFilter from 'tower/shared/capitalize.filter';
+import longDateFilter from 'tower/shared/long-date.filter';
export {
sanitizeFilter,
- capitalizeFilter
+ capitalizeFilter,
+ longDateFilter
};
diff --git a/awx/ui/static/js/forms/LogViewerStatus.js b/awx/ui/static/js/forms/LogViewerStatus.js
index d3dc26c118..a1b25e1e72 100644
--- a/awx/ui/static/js/forms/LogViewerStatus.js
+++ b/awx/ui/static/js/forms/LogViewerStatus.js
@@ -38,13 +38,13 @@ export default
"started": {
label: "Started",
type: "date",
- "filter": "date:'MM/dd/yy HH:mm:ss'",
+ "filter": "longDate",
readonly: true
},
"finished": {
label: "Finished",
type: "date",
- "filter": "date:'MM/dd/yy HH:mm:ss'",
+ "filter": "longDate",
readonly: true
},
"elapsed": {
diff --git a/awx/ui/static/js/helpers/EventViewer.js b/awx/ui/static/js/helpers/EventViewer.js
index ff76bffc3d..65a7ab2452 100644
--- a/awx/ui/static/js/helpers/EventViewer.js
+++ b/awx/ui/static/js/helpers/EventViewer.js
@@ -423,10 +423,10 @@ export default
else if (key === "start" || key === "end" || key === "created") {
if (!/Z$/.test(itm)) {
itm = itm.replace(/\ /,'T') + 'Z';
- html += $filter('date')(itm, 'MM/dd/yy HH:mm:ss.sss');
+ html += $filter('longDate')(itm);
}
else {
- html += $filter('date')(itm, 'MM/dd/yy HH:mm:ss');
+ html += $filter('longDate')(itm);
}
}
else if (key === "host_name" && event.host_id) {
diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js
index 19e32cdcba..ff6636c33a 100644
--- a/awx/ui/static/js/helpers/Hosts.js
+++ b/awx/ui/static/js/helpers/Hosts.js
@@ -121,7 +121,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', listGenerator.name,
". Click for details\" data-placement=\"top\">\n";
- html += "" + ($filter('date')(job.finished,'MM/dd HH:mm:ss')).replace(/ /,' ') + " | \n";
+ html += "" + ($filter('longDate')(job.finished)).replace(/ /,' ') + " | \n";
html += " |