Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #610 from lucasponce/HAWKULAR-748
Browse files Browse the repository at this point in the history
HAWKULAR-748 Error on empty notes
  • Loading branch information
mtho11 committed Oct 26, 2015
2 parents 0cd2c48 + 20c9e5c commit 3cb32bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ module HawkularMetrics {
resolvedNotes: this.comments
};

if (!resolvedAlerts.resolvedNotes || resolvedAlerts.resolvedNotes.length === 0) {
resolvedAlerts.resolvedNotes = 'Manually resolved';
}

this.HawkularAlertsManager.resolveAlerts(resolvedAlerts).then(() => {
this.isWorking = false;
this.getAlert(this._alertId);
Expand All @@ -162,6 +166,10 @@ module HawkularMetrics {
ackNotes: this.comments
};

if (!ackAlerts.ackNotes || ackAlerts.ackNotes.length === 0) {
ackAlerts.ackNotes = 'Manually acknowledged ';
}

this.HawkularAlertsManager.ackAlerts(ackAlerts).then(() => {
this.isWorking = false;
this.getAlert(this._alertId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module HawkularMetrics {
let resolvedAlerts = {
alertIds: resolveIdList,
resolvedBy: this.$rootScope.currentPersona.name,
resolvedNotes: 'Manually resolved '
resolvedNotes: 'Manually resolved'
};

this.HawkularAlertsManager.resolveAlerts(resolvedAlerts).then(() => {
Expand All @@ -174,7 +174,7 @@ module HawkularMetrics {
let ackAlerts = {
alertIds: ackIdList,
ackBy: this.$rootScope.currentPersona.name,
ackNotes: 'Manually acknowledged '
ackNotes: 'Manually acknowledged'
};

this.HawkularAlertsManager.ackAlerts(ackAlerts).then(() => {
Expand Down

0 comments on commit 3cb32bf

Please sign in to comment.