Skip to content

Commit

Permalink
Added license to alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
Viliam Rockai committed Feb 19, 2015
1 parent 3c7a071 commit cf65eeb
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 1 deletion.
159 changes: 159 additions & 0 deletions dist/hawkular-ui-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,165 @@ var hawkularRest;
hawkularRest._module = angular.module('hawkular.services', ['ngResource']);
})(hawkularRest || (hawkularRest = {}));

var hawkularRest;
(function (hawkularRest) {
hawkularRest._module.provider('HawkularAlert', function () {
this.host = 'localhost';
this.port = 8080;
this.setHost = function (host) {
this.host = host;
return this;
};
this.setPort = function (port) {
this.port = port;
return this;
};
this.$get = ['$resource', function ($resource) {
var prefix = 'http://' + this.host + ':' + this.port;
var factory = {};
factory.Alert = $resource(prefix + '/hawkular/alerts', {}, {
reload: {
method: 'GET',
url: prefix + '/hawkular/alerts/reload'
}
});
factory.Trigger = $resource(prefix + '/hawkular/alerts/triggers/:triggerId', {
triggerId: '@triggerId'
}, {
save: {
method: 'POST',
url: prefix + '/hawkular/alerts/triggers/'
},
put: {
method: 'PUT'
},
conditions: {
method: 'GET',
url: prefix + '/hawkular/alerts/triggers/:triggerId/conditions',
isArray: true,
params: {
triggerId: '@triggerId'
}
}
});
factory.Dampening = $resource(prefix + '/hawkular/alerts/trigger/dampening/:triggerId', {
triggerId: '@triggerId'
}, {
save: {
method: 'POST',
url: prefix + '/hawkular/alerts/trigger/dampening/'
},
put: {
method: 'PUT'
}
});
factory.AvailabilityCondition = $resource(prefix + '/hawkular/alerts/conditions/availability/:conditionId', {
conditionId: '@conditionId'
}, {
put: {
method: 'PUT'
},
trigger: {
method: 'GET',
url: prefix + '/hawkular/alerts/conditions/availability/trigger/:triggerId',
isArray: true,
params: {
triggerId: '@triggerId'
}
}
});
factory.CompareCondition = $resource(prefix + '/hawkular/alerts/conditions/compare/:conditionId', {
conditionId: '@conditionId'
}, {
put: {
method: 'PUT'
},
trigger: {
method: 'GET',
url: prefix + '/hawkular/alerts/conditions/compare/trigger/:triggerId',
isArray: true,
params: {
triggerId: '@triggerId'
}
}
});
factory.StringCondition = $resource(prefix + '/hawkular/alerts/conditions/string/:conditionId', {
conditionId: '@conditionId'
}, {
put: {
method: 'PUT'
},
trigger: {
method: 'GET',
url: prefix + '/hawkular/alerts/conditions/string/trigger/:triggerId',
isArray: true,
params: {
triggerId: '@triggerId'
}
}
});
factory.ThresholdCondition = $resource(prefix + '/hawkular/alerts/conditions/threshold/:conditionId', {
conditionId: '@conditionId'
}, {
put: {
method: 'PUT'
},
trigger: {
method: 'GET',
url: prefix + '/hawkular/alerts/conditions/threshold/trigger/:triggerId',
isArray: true,
params: {
triggerId: '@triggerId'
}
}
});
factory.ThresholdRangeCondition = $resource(prefix + '/hawkular/alerts/conditions/range/:conditionId', {
conditionId: '@conditionId'
}, {
put: {
method: 'PUT'
},
trigger: {
method: 'GET',
url: prefix + '/hawkular/alerts/conditions/range/trigger/:triggerId',
isArray: true,
params: {
triggerId: '@triggerId'
}
}
});
factory.NotifierType = $resource(prefix + '/hawkular/alerts/notifierType/:notifierType', {
notifierType: '@notifierType'
}, {
get: {
method: 'GET',
isArray: true
}
});
factory.Notifier = $resource(prefix + '/hawkular/alerts/notifiers/:notifierId', {
notifierId: '@notifierId'
}, {
put: {
method: 'PUT',
url: prefix + '/hawkular/alerts/notifiers/:notifierId',
params: {
notifierId: '@notifierId'
}
},
notifierType: {
method: 'GET',
isArray: true,
url: prefix + '/hawkular/alerts/notifiers/type/:notifierType',
params: {
notifierType: '@notifierType'
}
}
});
return factory;
}];
});
})(hawkularRest || (hawkularRest = {}));

var hawkularRest;
(function (hawkularRest) {
hawkularRest._module.provider('HawkularInventory', function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/hawkular-ui-service.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/rest/hawkRest-alert-provider.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/// Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
/// and other contributors as indicated by the @author tags.
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.

/**
* @ngdoc provider
* @name hawkular.rest.HawkularAlert
Expand Down

0 comments on commit cf65eeb

Please sign in to comment.