Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge master into develop. (#361)
Browse files Browse the repository at this point in the history
* enable refreshing page to clear session cache

* resolve problem of loading spinner not showing up after clicking reload button

* disable switching between shared and user's dashboard tabs while reloading

* Merging 2.3 to master (#360)

* Do not deserialize metrics wtih empty datapoint set, COUNT Transform fix.

* Remove commented code and Add missing file.

* enable refreshing page to clear session cache

* Dequeue more alerts in a single batch.

* resolve problem of loading spinner not showing up after clicking reload button

* disable switching between shared and user's dashboard tabs while reloading

* History objects stored in HBase.

* Update javadoc.

* Fix some unit tests.

* fix discovery service sdk constant (#274)

* fix discovery service sdk constant

* also fix test case

* HistoryServiceTest is now an Integration Test.

* Fix copy paste error.

* HBaseHistoryService singleton, dispose on system stop.

* AsyncHBase client objects now obtained through a factory so that there is only 1 instance of it in the system. Refactor code.

* Modify ArgusSDK to reflect History Service changes, refactor code.

* Sharing alerts

* Modify ArgusSDK/HistoryServiceTest.json to reflect the modified json output.

* Remove unused code.

* Add asynchbase property for HistoryIT test.

* Truncate field names before sending a message to GOC.

* Add Primary Key Auto Generation Annotation.

* Remove ensureTableExists checks

* Increase Wildcard limit to 25, throw an exception when the limit is exceeded, config changes for asynchbase.

* 1)Add isSRActionable field to Notification object. 2) This business logic is only used in GOCNotifier

* Fix SDK test for testUpdateNotification and testCreateNotification

* Adding custom text to notification

* Add checkbox for Is SR Actionable  Notification

* Fixing SDK test cases

* setting shared to default in Alert constructor

* Correcting formatting issues

* Correcting Formatting issues

* Send missing data notification when metrics list is empty

* Remove authorization validation for Shared alert

* bump dev version (#317)

* bump dev version

* autopromote release

* Update references to old salesforceEng/Argus github project.
Issue #314

* Update version to 2.3.0-SNAPSHOT (#331)

* Sharing notifications and triggers
  • Loading branch information
Tom Valine committed Dec 16, 2016
1 parent 046e058 commit 9031f52
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ArgusClient/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>argus</artifactId>
<groupId>com.salesforce.argus</groupId>
<version>2.2.1-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>argus-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ArgusCore/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>argus</artifactId>
<groupId>com.salesforce.argus</groupId>
<version>2.2.1-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>argus-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ArgusSDK/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>argus</artifactId>
<groupId>com.salesforce.argus</groupId>
<version>2.2.1-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>argus-sdk</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ArgusWebServices/pom.xml
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>argus</artifactId>
<groupId>com.salesforce.argus</groupId>
<version>2.2.1-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>argus-webservices</artifactId>
Expand Down
Expand Up @@ -210,9 +210,10 @@ public List<NotificationDto> getAllNotifications(@Context HttpServletRequest req

PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);

if (alert != null) {
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if (alert != null) {
return NotificationDto.transformToDto(alert.getNotifications());
}
throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
Expand Down Expand Up @@ -241,8 +242,10 @@ public List<TriggerDto> getAllTriggers(@Context HttpServletRequest req,
PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);

if (alert != null) {
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if (alert != null) {
return TriggerDto.transformToDto(alert.getTriggers());
}
throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);
Expand Down Expand Up @@ -275,9 +278,10 @@ public NotificationDto getNotificationById(@Context HttpServletRequest req,

PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);

if (alert != null) {
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if (alert != null) {
for (Notification notification : alert.getNotifications()) {
if (notification.getId().equals(notificationId)) {
return NotificationDto.transformToDto(notification);
Expand Down Expand Up @@ -315,8 +319,10 @@ public List<TriggerDto> getTriggersByNotificationId(@Context HttpServletRequest
PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);

if (alert != null) {
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if (alert != null) {
for (Notification notification : alert.getNotifications()) {
if (notification.getId().equals(notificationId)) {
return TriggerDto.transformToDto(notification.getTriggers());
Expand Down Expand Up @@ -354,8 +360,10 @@ public TriggerDto getTriggerById(@Context HttpServletRequest req,
PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);

if (alert != null) {
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if (alert != null) {
for (Trigger trigger : alert.getTriggers()) {
if (trigger.getId().equals(triggerId)) {
return TriggerDto.transformToDto(trigger);
Expand Down Expand Up @@ -397,9 +405,10 @@ public TriggerDto getTriggerByNotificationNTriggerId(@Context HttpServletRequest

PrincipalUser owner = validateAndGetOwner(req, null);
Alert alert = alertService.findAlertByPrimaryKey(alertId);

if (alert != null) {
if (alert != null && !alert.isShared()) {
validateResourceAuthorization(req, alert.getOwner(), owner);
}
if (alert != null) {
for (Notification notification : alert.getNotifications()) {
if (notification.getId().equals(notificationId)) {
for (Trigger trigger : notification.getTriggers()) {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@

<groupId>com.salesforce.argus</groupId>
<artifactId>argus</artifactId>
<version>2.2.1-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Argus</name>
Expand Down

0 comments on commit 9031f52

Please sign in to comment.