X-Git-Url: http://git.squeep.com/?p=websub-hub;a=blobdiff_plain;f=src%2Ftemplate%2Ftemplate-helper.js;h=3fd371035d0ab4989bcfbf771839f5d6431a5f11;hp=a3e113179928d3a878400c9b9c513961a930f2c9;hb=e3bce15e1777f5d7b03b7ba15444ca4335ec9bde;hpb=3aaef7251093bda0c2842ef3eb3f793a31d4699b
diff --git a/src/template/template-helper.js b/src/template/template-helper.js
index a3e1131..3fd3710 100644
--- a/src/template/template-helper.js
+++ b/src/template/template-helper.js
@@ -18,17 +18,17 @@ function renderTopicRow(topic, subscribers, detailsLink = true) {
return `
${detailsLink ? '' : ''}${topic.url}${detailsLink ? '' : ''} |
${subscribers.length} |
- ${TemplateHelper.dateOrNot(topic.created, 'Unknown')} |
+ ${TemplateHelper.dateFormat(topic.created, 'End of Time', 'Beginning of Time', 'Unknown')} |
${TemplateHelper.secondsToPeriod(topic.leaseSecondsPreferred)} |
${TemplateHelper.secondsToPeriod(topic.leaseSecondsMin)} |
${TemplateHelper.secondsToPeriod(topic.leaseSecondsMax)} |
${topic.publisherValidationUrl ? topic.publisherValidationUrl : 'None'} |
${topic.isActive} |
${topic.isDeleted} |
- ${TemplateHelper.dateOrNot(topic.lastPublish, 'Never')} |
- ${TemplateHelper.dateOrNot(topic.contentFetchNextAttempt, 'Next Publish')} |
+ ${TemplateHelper.dateFormat(topic.lastPublish, 'End of Time', 'Never', 'Never')} |
+ ${TemplateHelper.dateFormat(topic.contentFetchNextAttempt, 'Next Publish', 'Pending', 'Next Publish')} |
${topic.contentFetchAttemptsSinceSuccess} |
- ${TemplateHelper.dateOrNot(topic.contentUpdated, 'Never')} |
+ ${TemplateHelper.dateFormat(topic.contentUpdated, 'End of Time', 'Never', 'Never')} |
${topic.contentType} |
${topic.id} |
`;
@@ -55,7 +55,7 @@ function renderTopicRowHeader() {
Content Fetch Failures |
Content Updated |
Content Type |
- ID |
+ Internal Id |
`;
}
@@ -73,16 +73,16 @@ function renderSubscriptionRow(subscription) {
}
return `
${subscription.callback} |
- ${TemplateHelper.dateOrNot(subscription.created, 'Unknown')} |
- ${TemplateHelper.dateOrNot(subscription.verified, 'Never')} |
- ${TemplateHelper.dateOrNot(subscription.expires, 'Never')} |
+ ${TemplateHelper.dateFormat(subscription.created, 'End of Time', 'Beginning of Time', 'Unknown')} |
+ ${TemplateHelper.dateFormat(subscription.verified, 'End of Time', 'Never', 'Never')} |
+ ${TemplateHelper.dateFormat(subscription.expires, 'Never', 'Beginning of Time', 'Never')} |
${!!subscription.secret} |
${subscription.signatureAlgorithm} |
${subscription.httpRemoteAddr} |
${subscription.httpFrom} |
- ${TemplateHelper.dateOrNot(subscription.contentDelivered, 'Never')} |
+ ${TemplateHelper.dateFormat(subscription.contentDelivered, 'End of Time', 'Never', 'Never')} |
${subscription.deliveryAttemptsSinceSuccess} |
- ${TemplateHelper.dateOrNot(subscription.deliveryNextAttempt, 'Next Publish')} |
+ ${TemplateHelper.dateFormat(subscription.deliveryNextAttempt, 'End of Time', 'Next Publish', 'Next Publish')} |
${subscription.id} |
`;
}
@@ -105,7 +105,7 @@ function renderSubscriptionRowHeader() {
Content Delivered |
Content Delivery Failures |
Next Delivery |
- ID |
+ Internal Id |
`;
}