jenkins-bot has submitted this change and it was merged.
Change subject: Cleanup old notification config
......................................................................
Cleanup old notification config
Bug: T121612
Change-Id: Ib93d606347347de986815e9d259bbcf520389c1e
---
M OpenStackManager.php
D OpenStackManagerNotificationFormatter.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 0 insertions(+), 60 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/OpenStackManager.php b/OpenStackManager.php
index 49430de..fa62101 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -216,7 +216,6 @@
$wgAutoloadClasses['ApiListNovaProjects'] = $dir .
'api/ApiListNovaProjects.php';
$wgAutoloadClasses['ApiListNovaInstances'] = $dir .
'api/ApiListNovaInstances.php';
$wgAutoloadClasses['Spyc'] = $dir . 'Spyc.php';
-$wgAutoloadClasses['OpenStackManagerNotificationFormatter'] = $dir .
'OpenStackManagerNotificationFormatter.php';
$wgAutoloadClasses['EchoOpenStackManagerPresentationModel'] = $dir .
'EchoOpenStackManagerPresentationModel.php';
$wgAutoloadClasses['OpenStackManagerEvent'] = $dir .
'OpenStackManagerEvent.php';
$wgSpecialPages['NovaInstance'] = 'SpecialNovaInstance';
@@ -367,55 +366,27 @@
&$notifications, &$notificationCategories
) {
$notifications['osm-instance-build-completed'] = array(
- 'formatter-class' => 'OpenStackManagerNotificationFormatter',
'presentation-model' => 'EchoOpenStackManagerPresentationModel',
'category' => 'osm-instance-build-completed',
'section' => 'message',
- 'icon' => 'placeholder',
- 'payload' => array( 'summary' ),
- 'email-subject-message' =>
'notification-osm-instance-build-completed-email-subject',
- 'email-subject-params' => array( 'instance' ),
- 'email-body-batch-message' =>
'notification-osm-instance-build-completed-email-body-batch',
- 'email-body-batch-params' => array( 'agent', 'title',
'instance' ),
);
$notifications['osm-instance-reboot-completed'] = array(
- 'formatter-class' => 'OpenStackManagerNotificationFormatter',
'presentation-model' => 'EchoOpenStackManagerPresentationModel',
'category' => 'osm-instance-reboot-completed',
'section' => 'message',
- 'icon' => 'placeholder',
- 'payload' => array( 'summary' ),
- 'email-subject-message' =>
'notification-osm-instance-reboot-completed-email-subject',
- 'email-subject-params' => array( 'instance' ),
- 'email-body-batch-message' =>
'notification-osm-instance-reboot-completed-email-body-batch',
- 'email-body-batch-params' => array( 'agent', 'title',
'instance' ),
);
$notifications['osm-instance-deleted'] = array(
- 'formatter-class' => 'OpenStackManagerNotificationFormatter',
'presentation-model' => 'EchoOpenStackManagerPresentationModel',
'category' => 'osm-instance-deleted',
'section' => 'message',
- 'icon' => 'trash',
- 'payload' => array( 'summary' ),
- 'email-subject-message' =>
'notification-osm-instance-deleted-email-subject',
- 'email-subject-params' => array( 'instance' ),
- 'email-body-batch-message' =>
'notification-osm-instance-deleted-email-body-batch',
- 'email-body-batch-params' => array( 'agent', 'title',
'instance' ),
);
$notifications['osm-projectmembers-add'] = array(
- 'formatter-class' => 'OpenStackManagerNotificationFormatter',
'presentation-model' => 'EchoOpenStackManagerPresentationModel',
'category' => 'osm-projectmembers-add',
'section' => 'message',
- 'icon' => 'placeholder',
- 'payload' => array( 'summary' ),
- 'email-subject-message' =>
'notification-osm-projectmember-added-email-subject',
- 'email-subject-params' => array(),
- 'email-body-batch-message' =>
'notification-osm-projectmember-added-email-body-batch',
- 'email-body-batch-params' => array( 'agent', 'title' ),
);
return true;
diff --git a/OpenStackManagerNotificationFormatter.php
b/OpenStackManagerNotificationFormatter.php
deleted file mode 100644
index 9330a2b..0000000
--- a/OpenStackManagerNotificationFormatter.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-class OpenStackManagerNotificationFormatter extends EchoBasicFormatter {
- protected function processParam( $event, $param, $message, $user ) {
- if ( $param === 'instance' ) {
- $instance = $event->getExtraParam( 'instanceName' );
- if ( $instance ) {
- $message->params( $instance );
- } else {
- $message->params( '' );
- }
- } else {
- parent::processParam( $event, $param, $message, $user );
- }
- }
-}
diff --git a/i18n/en.json b/i18n/en.json
index 0d62945..ca6e793 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -402,14 +402,6 @@
"right-manageproject": "Manage OpenStack projects and roles",
"action-manageproject": "manage OpenStack projects and roles",
"right-loginviashell": "Login via shell",
- "notification-osm-instance-deleted-email-subject": "Instance \"$1\"
deleted on {{SITENAME}}",
- "notification-osm-instance-deleted-email-body-batch": "$1
{{GENDER:$1|deleted}} instance \"$3\" in project [[$2]]",
- "notification-osm-instance-build-completed-email-subject": "Instance
\"$1\" built on {{SITENAME}}",
- "notification-osm-instance-build-completed-email-body-batch": "$1
{{GENDER:$1|built}} instance \"$3\" in project [[$2]]",
- "notification-osm-instance-reboot-completed-email-subject": "Instance
\"$1\" rebooted on {{SITENAME}}",
- "notification-osm-instance-reboot-completed-email-body-batch": "$1
{{GENDER:$1|rebooted}} instance \"$3\" in project [[$2]]",
- "notification-osm-projectmember-added-email-subject": "You were added
to a project on {{SITENAME}}",
- "notification-osm-projectmember-added-email-body-batch": "$1
{{GENDER:$1|added}} you to project [[$2]]",
"notification-header-osm-instance-build-completed": "Instance \"$4\"
built in project $3.",
"notification-header-osm-instance-reboot-completed": "Instance \"$4\"
was rebooted in project $3.",
"notification-header-osm-instance-deleted": "Instance \"$4\" was
deleted in project $3.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 219d75f..d3d0f1d 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -416,14 +416,6 @@
"right-manageproject": "{{doc-right|manageproject}}\n\nThis is about
OpenStack roles.",
"action-manageproject": "{{doc-action|manageproject}}\n\nThis is about
OpenStack roles.",
"right-loginviashell": "{{doc-right|loginviashell}}\n\nThis is a right
needed to be added to a project.",
- "notification-osm-instance-deleted-email-subject": "Email subject for
the instance deletion notification.\nParameters:\n* $1 - instance",
- "notification-osm-instance-deleted-email-body-batch": "Email
notification for instance deletion.\nParameters:\n* $1 - agent\n* $2 -
project\n* $3 - instance",
- "notification-osm-instance-build-completed-email-subject": "Email
subject for instance build completion.\nParameters:\n* $1 - instance",
- "notification-osm-instance-build-completed-email-body-batch": "Email
notification for instance build completion.\nParameters:\n* $1 - agent\n* $2 -
project\n* $3 - instance",
- "notification-osm-instance-reboot-completed-email-subject": "Email
subject for instance reboot completion.\nParameters:\n* $1 - instance",
- "notification-osm-instance-reboot-completed-email-body-batch": "Email
notification for instance reboot completion.\nParameters:\n* $1 - agent\n* $2 -
project\n* $3 - instance",
- "notification-osm-projectmember-added-email-subject": "Email subject
for the new project membership notification.",
- "notification-osm-projectmember-added-email-body-batch": "Email
notification for new project membership.\n* $1 - agent\n* $2 - project",
"notification-header-osm-instance-build-completed": "Header text for a
notification when an instance has finished building. Parameters:\n* $1 is that
user's name (not suitable for GENDER).\n* $2 is the user's name for use in
GENDER.\n* $3 is the project name.\n* $4 is the instance name.\n* $5 - name of
the user viewing the notification, can be used for GENDER",
"notification-header-osm-instance-reboot-completed": "Header text for a
notification when an instance has finished rebooting. Parameters:\n* $1 is that
user's name (not suitable for GENDER).\n* $2 is the user's name for use in
GENDER.\n* $3 is the project name.\n* $4 is the instance name.\n* $5 - name of
the user viewing the notification, can be used for GENDER",
"notification-header-osm-instance-deleted": "Header text for a
notification when an instance is deleted. Parameters:\n* $1 is that user's name
(not suitable for GENDER).\n* $2 is the user's name for use in GENDER.\n* $3 is
the project name.\n* $4 is the instance name.\n* $5 - name of the user viewing
the notification, can be used for GENDER",
--
To view, visit https://gerrit.wikimedia.org/r/300072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib93d606347347de986815e9d259bbcf520389c1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits