From 99ec314f1888f326b2305be67da991c5316ce20f Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 14 Nov 2012 23:04:59 +0800 Subject: Bug 589322: deploy push extension --- .../hook/admin/admin-end_links_right.html.tmpl | 18 +++ .../hook/global/code-error-errors.html.tmpl | 25 ++++ .../hook/global/messages-messages.html.tmpl | 16 +++ .../hook/global/user-error-errors.html.tmpl | 11 ++ .../en/default/pages/push_config.html.tmpl | 134 +++++++++++++++++++++ .../template/en/default/pages/push_log.html.tmpl | 45 +++++++ .../en/default/pages/push_queues.html.tmpl | 102 ++++++++++++++++ .../en/default/pages/push_queues_view.html.tmpl | 80 ++++++++++++ .../Push/template/en/default/setup/strings.txt.pl | 11 ++ 9 files changed, 442 insertions(+) create mode 100644 extensions/Push/template/en/default/hook/admin/admin-end_links_right.html.tmpl create mode 100644 extensions/Push/template/en/default/hook/global/code-error-errors.html.tmpl create mode 100644 extensions/Push/template/en/default/hook/global/messages-messages.html.tmpl create mode 100644 extensions/Push/template/en/default/hook/global/user-error-errors.html.tmpl create mode 100644 extensions/Push/template/en/default/pages/push_config.html.tmpl create mode 100644 extensions/Push/template/en/default/pages/push_log.html.tmpl create mode 100644 extensions/Push/template/en/default/pages/push_queues.html.tmpl create mode 100644 extensions/Push/template/en/default/pages/push_queues_view.html.tmpl create mode 100644 extensions/Push/template/en/default/setup/strings.txt.pl (limited to 'extensions/Push/template') diff --git a/extensions/Push/template/en/default/hook/admin/admin-end_links_right.html.tmpl b/extensions/Push/template/en/default/hook/admin/admin-end_links_right.html.tmpl new file mode 100644 index 000000000..78e314ab2 --- /dev/null +++ b/extensions/Push/template/en/default/hook/admin/admin-end_links_right.html.tmpl @@ -0,0 +1,18 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% IF user.in_group('admin') %] +
+ Push +
+
+ Configuration
+ Queues
+ Log
+
+[% END %] diff --git a/extensions/Push/template/en/default/hook/global/code-error-errors.html.tmpl b/extensions/Push/template/en/default/hook/global/code-error-errors.html.tmpl new file mode 100644 index 000000000..515f00fa8 --- /dev/null +++ b/extensions/Push/template/en/default/hook/global/code-error-errors.html.tmpl @@ -0,0 +1,25 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% IF error == "push_invalid_payload" %] + [% title = "Invalid payload" %] + An invalid or empty payload was passed to Push. + +[% ELSIF error == "push_invalid_change_set" %] + [% title = "Invalid change_set" %] + An invalid or empty change_set was passed to Push. + +[% ELSIF error == "push_invalid_routing_key" %] + [% title = "Invalid routing_key" %] + An invalid or empty routing_key was passed to Push. + +[% ELSIF error == "push_invalid_connector" %] + [% title = "Invalid connector" %] + An invalid connector was passed to Push. + +[% END %] diff --git a/extensions/Push/template/en/default/hook/global/messages-messages.html.tmpl b/extensions/Push/template/en/default/hook/global/messages-messages.html.tmpl new file mode 100644 index 000000000..e4a016aee --- /dev/null +++ b/extensions/Push/template/en/default/hook/global/messages-messages.html.tmpl @@ -0,0 +1,16 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% IF message_tag == "push_config_updated" %] + Changes to the configuration have been saved. + Please allow up to 60 seconds for the change to be active. + +[% ELSIF message_tag == "push_message_deleted" %] + The message has been deleted. + +[% END %] diff --git a/extensions/Push/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/Push/template/en/default/hook/global/user-error-errors.html.tmpl new file mode 100644 index 000000000..2b8a1c4e0 --- /dev/null +++ b/extensions/Push/template/en/default/hook/global/user-error-errors.html.tmpl @@ -0,0 +1,11 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% IF error == "push_error" %] + [% error_message FILTER html %] +[% END %] diff --git a/extensions/Push/template/en/default/pages/push_config.html.tmpl b/extensions/Push/template/en/default/pages/push_config.html.tmpl new file mode 100644 index 000000000..6e6507a39 --- /dev/null +++ b/extensions/Push/template/en/default/pages/push_config.html.tmpl @@ -0,0 +1,134 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS global/header.html.tmpl + title = "Push Administration: Configuration" + javascript_urls = [ 'extensions/Push/web/admin.js' ] + style_urls = [ 'extensions/Push/web/admin.css' ] +%] + + + +
+ + + + + +[% PROCESS options + name = 'global', + config = push.config +%] + +[% FOREACH connector = connectors.list %] + [% PROCESS options + name = connector.name + config = connector.config + %] +[% END %] + + + + + + + + + + + + + + + + + + +
 
  + + +
   
+ +
+ +[% INCLUDE global/footer.html.tmpl %] + +[% BLOCK options %] + + [% name FILTER ucfirst FILTER html %] +
+ + [% FOREACH option = config.options %] + [% class = name _ '_tr' IF option.name != 'enabled' %] + + + [% IF option.required %] + *  + [% END %] + [% option.label FILTER html %] + + + [% IF option.type == 'string' %] + + + [% ELSIF option.type == 'password' %] + + + [% ELSIF option.type == 'select' %] + + + [% ELSE %] + unsupported option type '[% option.type FILTER html %]' + [% END %] + + [% IF option.help %] + [% option.help FILTER html %] + [% ELSE %] +   + [% END %] + + [% END %] + [% IF name != 'global' %] + + [% END %] +[% END %] diff --git a/extensions/Push/template/en/default/pages/push_log.html.tmpl b/extensions/Push/template/en/default/pages/push_log.html.tmpl new file mode 100644 index 000000000..a51cb22cf --- /dev/null +++ b/extensions/Push/template/en/default/pages/push_log.html.tmpl @@ -0,0 +1,45 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS global/header.html.tmpl + title = "Push Administration: Logs" + javascript_urls = [ 'extensions/Push/web/admin.js' ] + style_urls = [ 'extensions/Push/web/admin.css' ] +%] +[% logs = push.log %] + + + +[% IF logs.count %] + + + + + + + +[% END %] + +[% FOREACH log = logs.list %] + + + + + + + +[% END %] + + + + + +
ConnectorEvent TimestampProcessed TimestampStatusMessage
[% log.connector FILTER html %][% log.push_ts FILTER time FILTER html %][% log.processed_ts FILTER time FILTER html %][% log.result_string FILTER html %][% log.data FILTER html %]
 
+ +[% INCLUDE global/footer.html.tmpl %] + diff --git a/extensions/Push/template/en/default/pages/push_queues.html.tmpl b/extensions/Push/template/en/default/pages/push_queues.html.tmpl new file mode 100644 index 000000000..67f079f92 --- /dev/null +++ b/extensions/Push/template/en/default/pages/push_queues.html.tmpl @@ -0,0 +1,102 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS global/header.html.tmpl + title = "Push Administration: Queues" + javascript_urls = [ 'extensions/Push/web/admin.js' ] + style_urls = [ 'extensions/Push/web/admin.css' ] +%] + + + +[% PROCESS show_queue + queue = push.queue + title = 'Pending' + pending = 1 +%] + +[% FOREACH connector = push.connectors.list %] + [% NEXT UNLESS connector.enabled %] + [% PROCESS show_queue + queue = connector.backlog + title = connector.name _ ' Backlog' + pending = 0 + %] +[% END %] + +
+ +[% INCLUDE global/footer.html.tmpl %] + +[% BLOCK show_queue %] + [% count = queue.count %] + + + [% title FILTER html %] Queue ([% count FILTER html %]) + + [% IF queue.backoff && count %] + + Next Attempt: [% queue.backoff.next_attempt_ts FILTER time %] + + [% ELSE %] +   + [% END %] + + + [% IF count %] + + Timestamp + Change Set + [% IF pending %] + Routing Key + [% ELSE %] + Routing Key + Last Attempt + Attempts + Last Error + [% END %] +   + + [% END %] + + [% FOREACH message = queue.list('limit', 10) %] + + [% message.push_ts FILTER html %] + [% message.change_set FILTER html %] + [% IF pending %] + [% message.routing_key FILTER html %] + [% ELSE %] + [% message.routing_key FILTER html %] + [% IF message.attempt_ts %] + [% message.attempt_ts FILTER time %] + [% message.attempts FILTER html %] + + [% IF message.last_error.length > 40 %] + [% last_error = message.last_error.substr(0, 40) _ '...' %] + [% ELSE %] + [% last_error = message.last_error %] + [% END %] + [% last_error FILTER html %] + [% ELSE %] + - + - + - + [% END %] + [% END %] + + View + + + [% END %] + + +   + +[% END %] diff --git a/extensions/Push/template/en/default/pages/push_queues_view.html.tmpl b/extensions/Push/template/en/default/pages/push_queues_view.html.tmpl new file mode 100644 index 000000000..0e8449b0c --- /dev/null +++ b/extensions/Push/template/en/default/pages/push_queues_view.html.tmpl @@ -0,0 +1,80 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS global/header.html.tmpl + title = "Push Administration: Queues: Payload" + javascript_urls = [ 'extensions/Push/web/admin.js' ] + style_urls = [ 'extensions/Push/web/admin.css' ] +%] + +[% IF !message_obj %] + Return + [% RETURN %] +[% END %] + + + + + + + + + + + + + + + + + + + + + + + + +[% IF message_obj.attempts %] + + + + + + + + + + + + +[% END %] + + + + + + + + + +
Connector[% message_obj.connector || '-' FILTER html %]
Message ID[% message_obj.message_id FILTER html %]
Push Time[% message_obj.push_ts FILTER time FILTER html %]
Change Set[% message_obj.change_set FILTER html %]
Routing Key[% message_obj.routing_key FILTER html %]
Attempts[% message_obj.attempts FILTER html %]
Last Attempt Time[% message_obj.attempt_ts FILTER time FILTER html %]
Last Error[% message_obj.last_error FILTER html %]
+ [% IF json %] +
[% json FILTER html %]
+ [% ELSE %] +
[% message_obj.payload FILTER html %]
+ [% END %] +
+ Return | + Delete +
+ +[% INCLUDE global/footer.html.tmpl %] diff --git a/extensions/Push/template/en/default/setup/strings.txt.pl b/extensions/Push/template/en/default/setup/strings.txt.pl new file mode 100644 index 000000000..bb135f5bb --- /dev/null +++ b/extensions/Push/template/en/default/setup/strings.txt.pl @@ -0,0 +1,11 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is "Incompatible With Secondary Licenses", as +# defined by the Mozilla Public License, v. 2.0. + +%strings = ( + feature_push_amqp => 'Push: AMQP Support', + feature_push_stomp => 'Push: STOMP Support', +); -- cgit v1.2.3-24-g4f1b