Not Synced
- {{ repository.last_sync.ended_at | date:"short" }}
+
N/A
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html
index 2bfa82b4254..d6c6200b338 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html
@@ -41,7 +41,7 @@
{{ historyText(version) }}
- ({{ version.last_event.created_at | date:'short' }})
+ ()
|
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html
index d13e039adf3..6ced929dce3 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html
@@ -38,7 +38,7 @@
- {{ errata.severity }}
|
{{ errata.hosts_available_count || 0 }} |
- {{ errata.updated | date:'shortDate'}} |
+ |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html
index c2a02ab8b43..384dbfa10d1 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html
@@ -47,7 +47,7 @@ Content Views
No
- {{ contentView.last_published | date:"medium" }}
+
Not yet published
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js b/engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
new file mode 100644
index 00000000000..677efe80a90
--- /dev/null
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js
@@ -0,0 +1,50 @@
+/**
+ * @ngdoc module
+ * @name Bastion.dates
+ *
+ * @description
+ * Module providing directives for formatting dates.
+ */
+angular.module('Bastion.dates', [
+ 'Bastion',
+ 'react'
+]);
+
+angular.module('Bastion.dates').factory('componentRegistry',
+ ['$window', function($window) {
+ return $window.tfm.componentRegistry;
+ }]
+);
+
+angular.module('Bastion.dates').factory('dateComponent',
+ ['componentRegistry', function(componentRegistry) {
+ return function(componentName) {
+ var dateWrapper = componentRegistry.wrapperFactory().with('i18n').wrapper;
+ return dateWrapper(componentRegistry.getComponent(componentName).type);
+ };
+ }]
+);
+
+angular.module('Bastion.dates').directive('date',
+ ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
+ return reactDirective(dateComponent('IsoDate'), ['date']);
+ }]
+);
+
+angular.module('Bastion.dates').directive('shortDateTime',
+ ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
+ return reactDirective(dateComponent('ShortDateTime'), ['date', 'seconds']);
+ }]
+);
+
+angular.module('Bastion.dates').directive('longDateTime',
+ ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
+ return reactDirective(dateComponent('LongDateTime'), ['date', 'seconds']);
+ }]
+);
+
+angular.module('Bastion.dates').directive('relativeDate',
+ ['dateComponent', 'reactDirective', function(dateComponent, reactDirective) {
+ return reactDirective(dateComponent('RelativeDateTime'), ['date']);
+ }]
+);
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html
index 9e9072940e9..a87cfa71b99 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html
@@ -28,7 +28,7 @@
Yes
No
|
- {{ contentView.last_published | date:'longDate' }} |
+ |
{{ contentView.repositories.length || 0 }} |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html
index c4df9a8b4c3..26aee3d2c95 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html
@@ -50,7 +50,8 @@
- {{ errata.severity | errataSeverity}}
{{ errata.hosts_available_count || 0 }} |
- {{ errata.updated | date:'shortDate'}} |
+
+ |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js b/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js
index dd5fbee37c1..64be8d8f4e9 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js
@@ -17,5 +17,6 @@ angular.module('Bastion.environments', [
'Bastion.ostree-branches',
'Bastion.puppet-modules',
'Bastion.repositories',
- 'Bastion.content-views'
+ 'Bastion.content-views',
+ 'Bastion.dates'
]);
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html
index 23f5e524491..ec37f6ec7b2 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html
@@ -24,10 +24,10 @@ {{ errata.title }}
{{ errata.severity | errataSeverity }}
Issued
- {{ errata.issued | date:'shortDate' }}
+
Last Updated On
- {{ errata.updated | date:'shortDate' }}
+
Reboot Suggested?
{{ errata.reboot_suggested | booleanToYesNo }}
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js b/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js
index 7fb8c2854ab..b59c2a23ffb 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js
@@ -12,5 +12,6 @@ angular.module('Bastion.errata', [
'Bastion.common',
'Bastion.i18n',
'Bastion.components.formatters',
- 'Bastion.tasks'
+ 'Bastion.tasks',
+ 'Bastion.dates'
]);
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html
index 5cbc1d7bf5d..9e07fd50f55 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html
@@ -101,7 +101,7 @@
{{ errata.hosts_applicable_count || 0 }} Applicable,
{{ errata.hosts_available_count || 0 }} Installable
- {{ errata.updated | date:'shortDate'}} |
+ |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html
index 6bb4d966573..5da0014bd41 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html
@@ -68,10 +68,10 @@ Sync Plan Management
| {{ syncPlan.name }} |
- {{ syncPlan.sync_date | date:'medium' }} |
+ |
{{ syncPlan.enabled }} |
{{ syncPlan.interval | translate | capitalize }} |
- {{ syncPlan.next_sync | date:'medium' }} |
+ |
@@ -84,4 +84,4 @@ Sync Plan Management
Done
-
\ No newline at end of file
+
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
index 6fb91312b87..eab1ccc64f3 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html
@@ -248,13 +248,14 @@ Sync Status
Not Synced
-
- {{ repository.last_sync_words }} Ago ({{ repository.last_sync.ended_at | date:'medium' }} Local Time)
+
+
+ ( Local Time)
Next Sync
-
- {{ repository.product.sync_plan.next_sync | date:'medium' }} (Server Time)
+
+ (Server Time)
Synced manually, no interval set.
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html
index f7cbb59a3e4..41ba3e5940b 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html
@@ -87,13 +87,14 @@ Sync Status
Last Sync
-
- {{ product.last_sync_words }} Ago ({{ product.sync_status.finish_time | date:'medium' }} Local Time)
+
+
+ ( Local Time)
Next Sync
-
- {{ product.sync_plan.next_sync | date:'medium' }} (Server Time)
+
+ (Server Time)
Synced manually, no interval set.
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html
index 723365662b1..abf4e60dd1c 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html
@@ -1,6 +1,7 @@
-
-
- Last synced {{ product.last_sync_words }} ago.
+
+
+ Last synced
+ .
-
Never synced
+
Never synced
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html
index 0aba2519472..e7e5a16f804 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html
@@ -8,7 +8,7 @@
Subscription Info
Description
{{ subscription.description }}
-
+
Virt-Who Usage Required
Subscription Info
{{ subscription | subscriptionConsumedFilter }}
Starts
- {{ subscription.start_date | date:"short" }}
+
Ends
- {{ subscription.end_date | date:"short" }}
+
Product ID
{{ subscription.product_id }}
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html
index 30f3934ccdb..ea0deb7f97c 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html
@@ -19,12 +19,12 @@ Subscription Details
Generated On
- {{ manifestImport.generatedDate | date:"short" }}
+
Last Updated
- {{ upstream.updated | date:"short" }}
+
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html
index 67c35d5b13a..b6dbe10dd9c 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html
@@ -11,7 +11,7 @@
{{ status.statusMessage }}
- {{ status.created | date:"short" }} |
+ |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html
index fa34e8ce5fa..b6db41c723d 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html
@@ -1,2 +1,2 @@
-{{ subscription.start_date | date:"shortDate" }}{{ checkFutureDate(subscription.start_date) }}
+{{ checkFutureDate(subscription.start_date) }}
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html
index b2dcea7fc97..41f3ab3b71a 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html
@@ -51,7 +51,7 @@ Subscriptions
|
|
- {{ subscription.end_date | date:"shortDate" }} |
+ |
{{ subscription.support_level }} |
{{ subscription.contract_number }} |
{{ subscription.account_number }} |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html
index d436c42d272..dfb105daa3c 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html
@@ -42,7 +42,7 @@ Basic Information
Next Sync
- {{ syncPlan.next_sync | date:'medium' }}
+
Recurring Logic
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html
index a0f7e1c23e8..ee35ff62480 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html
@@ -43,10 +43,10 @@ Sync Plans
{{ syncPlan.description }} |
- {{ syncPlan.sync_date | date:'medium' }} |
+ |
{{ syncPlan.enabled }} |
{{ syncPlan.interval | translate | capitalize }} |
- {{ syncPlan.next_sync | date:'medium' }} |
+ |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html
index 2ca84cdadc1..19d697485f6 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html
@@ -8,10 +8,10 @@ Task Details
{{ task.username }}
Started At
-
{{ task.started_at | date:"short" }}
+
Finished At
-
{{ task.ended_at | date:"short" }}
+
Parameters
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html
index 2991f47377c..4f83a198f9f 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html
@@ -32,7 +32,7 @@
{{ task.username }} |
- {{ task.started_at | date:"short" }} |
+ |
diff --git a/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html b/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html
index 63f06a3892f..b49dabe0a74 100644
--- a/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html
+++ b/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html
@@ -22,7 +22,7 @@
{{ task.humanized.input | taskInputShort | taskInputCompile }}
- {{ task.started_at | date:"short" }} |
+ |
diff --git a/engines/bastion_katello/lib/bastion_katello/engine.rb b/engines/bastion_katello/lib/bastion_katello/engine.rb
index e4e297762d3..59e6cbfab16 100644
--- a/engines/bastion_katello/lib/bastion_katello/engine.rb
+++ b/engines/bastion_katello/lib/bastion_katello/engine.rb
@@ -14,7 +14,12 @@ class Engine < ::Rails::Engine
Bastion.register_plugin(
:name => 'bastion_katello',
- :javascript => 'bastion_katello/bastion_katello',
+ :javascript => proc do
+ [
+ javascript_include_tag(*webpack_asset_paths('katello_common', :extension => 'js'), "data-turbolinks-track" => true),
+ javascript_include_tag('bastion_katello/bastion_katello')
+ ]
+ end,
:stylesheet => 'bastion_katello/bastion_katello',
:pages => %w(
activation_keys
diff --git a/package.json b/package.json
index b6337682c59..92374172d31 100644
--- a/package.json
+++ b/package.json
@@ -58,6 +58,8 @@
"lodash": "^4.17.5",
"patternfly": "^3.41.1",
"patternfly-react": "^2.5.1",
+ "angular": "1.5.5",
+ "ngreact": "^0.5.0",
"prop-types": "^15.6.0",
"query-string": "^6.1.0",
"react": "^16.4.0",
diff --git a/webpack/common_index.js b/webpack/common_index.js
new file mode 100644
index 00000000000..851f3e628ce
--- /dev/null
+++ b/webpack/common_index.js
@@ -0,0 +1,6 @@
+/* eslint import/no-unresolved: [2, { ignore: [foremanReact/*] }] */
+/* eslint-disable import/no-extraneous-dependencies */
+/* eslint-disable import/extensions */
+/* eslint-disable import/no-unresolved */
+
+require('ngreact');