Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAYARA-1415 Added test notifiers admin console and command #1620

Merged
merged 12 commits into from
Jul 24, 2017
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ holder.
#include "/payaraExtras/notification/notificationConfigTabs.inc"
<sun:title id="propertyContentPage" title="$resource{i18ndn.notifier.datadog.configuration.pageTitle}"
helpText="$resource{i18ndn.notifier.datadog.configuration.pageHelpText}" >
<sun:button id = "test" text="$resource{i18ndn.notifier.datadog.buttons.test}">
<!command
mapCopy(source="#{pageSession.valueMap}" dest="#{pageSession.attrsMap}");
mapRemove(map="#{pageSession.attrsMap}" key="enabled");
mapRemove(map="#{pageSession.attrsMap}" key="dynamic");
gf.restRequest(endpoint="#{sessionScope.NOTIFICATION_CONFIG_URL}/test-datadog-notifier-configuration?target=#{pageSession.configName}" method="GET"
attrs="#{pageSession.attrsMap}" result="#{requestScope.result}");
if ("#{requestScope.result.data['exit_code']} = SUCCESS") {
prepareAlertMsg(summary="$resource{i18ndn.notifier.datadog.msg.success}", type="success");
}
/>
</sun:button>
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ notifier.datadog.configuration.pageHelpText=Enable and configure a Datadog notif
notifier.datadog.configuration.enabledLabel=Enabled
notifier.datadog.configuration.enabledLabelHelpText=Enables/Disables the Datadog notifier
notifier.datadog.configuration.keyLabel=Key
notifier.datadog.configuration.keyLabelHelpText=Datadog key
notifier.datadog.configuration.keyLabelHelpText=Datadog Key
notifier.datadog.msg.success=Success
notifier.datadog.buttons.test=Test
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
<!--
Copyright (c) 2017 Payara Foundation and/or its affiliates. All rights reserved.

DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://github.com/payara/Payara/blob/master/LICENSE.txt
See the License for the specific
language governing permissions and limitations under the License.

Copyright (c) 2017 Payara Foundation and/or its affiliates.
All rights reserved.
When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/legal/LICENSE.txt.

The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
or packager/legal/LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
GPL Classpath Exception:
The Payara Foundation designates this particular file as subject to the "Classpath"
exception as provided by the Payara Foundation in the GPL Version 2 section of the License
file that accompanied this code.

When distributing the software, include this License Header Notice in each
file and include the License file at packager/legal/LICENSE.txt.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"

Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->

<!initPage
Expand Down Expand Up @@ -46,6 +65,18 @@
#include "/payaraExtras/notification/notificationConfigTabs.inc"
<sun:title id="propertyContentPage" title="$resource{i18nemn.notifier.email.configuration.pageTitle}"
helpText="$resource{i18nemn.notifier.email.configuration.pageHelpText}" >
<sun:button id = "test" text="$resource{i18nemn.notifier.email.buttons.test}">
<!command
mapCopy(source="#{pageSession.valueMap}" dest="#{pageSession.attrsMap}");
mapRemove(map="#{pageSession.attrsMap}" key="enabled");
mapRemove(map="#{pageSession.attrsMap}" key="dynamic");
gf.restRequest(endpoint="#{sessionScope.NOTIFICATION_CONFIG_URL}/test-email-notifier-configuration?target=#{pageSession.configName}" method="GET"
attrs="#{pageSession.attrsMap}" result="#{requestScope.result}");
if ("#{requestScope.result.data['exit_code']} = SUCCESS") {
prepareAlertMsg(summary="$resource{i18nemn.notifier.email.msg.success}", type="success");
}
/>
</sun:button>
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2017 Payara Foundation and/or its affiliates.
# All rights reserved.
# Copyright (c) 2017 Payara Foundation and/or its affiliates. All rights reserved.
#
# The contents of this file are subject to the terms of the Common Development
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common Development
# and Distribution License("CDDL") (collectively, the "License"). You
# may not use this file except in compliance with the License. You can
# obtain a copy of the License at
# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
# or packager/legal/LICENSE.txt. See the License for the specific
# https://github.com/payara/Payara/blob/master/LICENSE.txt
# See the License for the specific
# language governing permissions and limitations under the License.
#
# When distributing the software, include this License Header Notice in each
# file and include the License file at packager/legal/LICENSE.txt.
# file and include the License file at glassfish/legal/LICENSE.txt.
#
# GPL Classpath Exception:
# The Payara Foundation designates this particular file as subject to the "Classpath"
# exception as provided by the Payara Foundation in the GPL Version 2 section of the License
# file that accompanied this code.
#
# Modifications:
# If applicable, add the following below the License Header, with the fields
# enclosed by brackets [] replaced by your own identifying information:
# "Portions Copyright [year] [name of copyright owner]"
#
# Contributor(s):
# If you wish your version of this file to be governed by only the CDDL or
# only the GPL Version 2, indicate your decision by adding "[Contributor]
# elects to include this software in this distribution under the [CDDL or GPL
# Version 2] license." If you don't indicate a single choice of license, a
# recipient has the option to distribute your version of this file under
# either the CDDL, the GPL Version 2 or to extend the choice of license to
# its licensees as provided above. However, if you add GPL Version 2 code
# and therefore, elected the GPL Version 2 license, then the option applies
# only if the new code is made subject to such option by the copyright
# holder.

notifier.email.tabs.tabText=Email
notifier.email.tabs.tabToolTip=Email Notification Configuration
Expand All @@ -26,3 +46,5 @@ notifier.email.configuration.jndiNameLabel=JavaMail JNDI Name
notifier.email.configuration.jndiNameLabelHelpText=The JNDI name of the JavaMail session
notifier.email.configuration.toLabel=Target Address
notifier.email.configuration.toLabelHelpText=Email address that notifications are to be sent to
notifier.email.msg.success=Success
notifier.email.buttons.test=Test
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
<!--
Copyright (c) 2017 Payara Foundation and/or its affiliates. All rights reserved.

DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://github.com/payara/Payara/blob/master/LICENSE.txt
See the License for the specific
language governing permissions and limitations under the License.

Copyright (c) 2017 Payara Foundation and/or its affiliates.
All rights reserved.
When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/legal/LICENSE.txt.

The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
or packager/legal/LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
GPL Classpath Exception:
The Payara Foundation designates this particular file as subject to the "Classpath"
exception as provided by the Payara Foundation in the GPL Version 2 section of the License
file that accompanied this code.

When distributing the software, include this License Header Notice in each
file and include the License file at packager/legal/LICENSE.txt.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"

Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->

<!initPage
Expand Down Expand Up @@ -47,7 +66,19 @@
#include "/payaraExtras/notification/notificationConfigTabs.inc"
<sun:title id="propertyContentPage" title="$resource{i18nebn.notifier.eventbus.configuration.pageTitle}"
helpText="$resource{i18nebn.notifier.eventbus.configuration.pageHelpText}" >
<!facet pageButtonsTop>
<sun:button id = "test" text="$resource{i18nebn.notifier.eventbus.buttons.test}">
<!command
mapCopy(source="#{pageSession.valueMap}" dest="#{pageSession.attrsMap}");
mapRemove(map="#{pageSession.attrsMap}" key="enabled");
mapRemove(map="#{pageSession.attrsMap}" key="dynamic");
gf.restRequest(endpoint="#{sessionScope.NOTIFICATION_CONFIG_URL}/test-eventbus-notifier-configuration?target=#{pageSession.configName}" method="GET"
attrs="#{pageSession.attrsMap}" result="#{requestScope.result}");
if ("#{requestScope.result.data['exit_code']} = SUCCESS") {
prepareAlertMsg(summary="$resource{i18nebn.notifier.eventbus.msg.success}", type="success");
}
/>
</sun:button>
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) submitAndDisable(this, '$resource{i18n.button.Processing}'); return false;" >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2017 Payara Foundation and/or its affiliates.
# All rights reserved.
# Copyright (c) 2017 Payara Foundation and/or its affiliates. All rights reserved.
#
# The contents of this file are subject to the terms of the Common Development
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common Development
# and Distribution License("CDDL") (collectively, the "License"). You
# may not use this file except in compliance with the License. You can
# obtain a copy of the License at
# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
# or packager/legal/LICENSE.txt. See the License for the specific
# https://github.com/payara/Payara/blob/master/LICENSE.txt
# See the License for the specific
# language governing permissions and limitations under the License.
#
# When distributing the software, include this License Header Notice in each
# file and include the License file at packager/legal/LICENSE.txt.
# file and include the License file at glassfish/legal/LICENSE.txt.
#
# GPL Classpath Exception:
# The Payara Foundation designates this particular file as subject to the "Classpath"
# exception as provided by the Payara Foundation in the GPL Version 2 section of the License
# file that accompanied this code.
#
# Modifications:
# If applicable, add the following below the License Header, with the fields
# enclosed by brackets [] replaced by your own identifying information:
# "Portions Copyright [year] [name of copyright owner]"
#
# Contributor(s):
# If you wish your version of this file to be governed by only the CDDL or
# only the GPL Version 2, indicate your decision by adding "[Contributor]
# elects to include this software in this distribution under the [CDDL or GPL
# Version 2] license." If you don't indicate a single choice of license, a
# recipient has the option to distribute your version of this file under
# either the CDDL, the GPL Version 2 or to extend the choice of license to
# its licensees as provided above. However, if you add GPL Version 2 code
# and therefore, elected the GPL Version 2 license, then the option applies
# only if the new code is made subject to such option by the copyright
# holder.

notifier.eventbus.tabs.tabText=Event Bus
notifier.eventbus.tabs.tabToolTip=Event Bus Notification Configuration
Expand All @@ -24,4 +44,5 @@ notifier.eventbus.configuration.enabledLabel=Enabled
notifier.eventbus.configuration.enabledLabelHelpText=Enables/Disables the Event Bus notifier
notifier.eventbus.configuration.topicNameLabel=Topic Name
notifier.eventbus.configuration.topicNameLabelHelpText=The name of the topic

notifier.eventbus.msg.success=Success
notifier.eventbus.buttons.test=Test
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2017 Payara Foundation and/or its affiliates.
# All rights reserved.
# Copyright (c) 2017 Payara Foundation and/or its affiliates. All rights reserved.
#
# The contents of this file are subject to the terms of the Common Development
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common Development
# and Distribution License("CDDL") (collectively, the "License"). You
# may not use this file except in compliance with the License. You can
# obtain a copy of the License at
# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
# or packager/legal/LICENSE.txt. See the License for the specific
# https://github.com/payara/Payara/blob/master/LICENSE.txt
# See the License for the specific
# language governing permissions and limitations under the License.
#
# When distributing the software, include this License Header Notice in each
# file and include the License file at packager/legal/LICENSE.txt.
# file and include the License file at glassfish/legal/LICENSE.txt.
#
# GPL Classpath Exception:
# The Payara Foundation designates this particular file as subject to the "Classpath"
# exception as provided by the Payara Foundation in the GPL Version 2 section of the License
# file that accompanied this code.
#
# Modifications:
# If applicable, add the following below the License Header, with the fields
# enclosed by brackets [] replaced by your own identifying information:
# "Portions Copyright [year] [name of copyright owner]"
#
# Contributor(s):
# If you wish your version of this file to be governed by only the CDDL or
# only the GPL Version 2, indicate your decision by adding "[Contributor]
# elects to include this software in this distribution under the [CDDL or GPL
# Version 2] license." If you don't indicate a single choice of license, a
# recipient has the option to distribute your version of this file under
# either the CDDL, the GPL Version 2 or to extend the choice of license to
# its licensees as provided above. However, if you add GPL Version 2 code
# and therefore, elected the GPL Version 2 license, then the option applies
# only if the new code is made subject to such option by the copyright
# holder.

notifier.hipchat.tabs.tabText=HipChat
notifier.hipchat.tabs.tabToolTip=HipChat Notification Configuration
Expand All @@ -26,5 +46,5 @@ notifier.hipchat.configuration.roomNameLabel=Room Name
notifier.hipchat.configuration.roomNameLabelHelpText=The HipChat room name
notifier.hipchat.configuration.tokenLabel=Token
notifier.hipchat.configuration.tokenLabelHelpText=The HipChat token


notifier.hipchat.msg.success=Success
notifier.hipchat.buttons.test=Test
Loading