|
@@ -16,6 +16,8 @@
|
|
|
* limitations under the License.
|
|
|
*/
|
|
|
|
|
|
+var numericUtils = require('utils/number_utils');
|
|
|
+
|
|
|
App.MainAlertDefinitionConfigsController = Em.Controller.extend({
|
|
|
|
|
|
name: 'mainAlertDefinitionConfigsController',
|
|
@@ -289,8 +291,18 @@ App.MainAlertDefinitionConfigsController = Em.Controller.extend({
|
|
|
text: isWizard ? '' : this.getThresholdsProperty('critical', 'text'),
|
|
|
value: isWizard ? '' : this.getThresholdsProperty('critical', 'value')
|
|
|
}),
|
|
|
- App.AlertConfigProperties.ConnectionTimeout.create({
|
|
|
- value: alertDefinition.get('uri.connectionTimeout')
|
|
|
+ App.AlertConfigProperties.Parameter.create({
|
|
|
+ value: alertDefinition.get('uri.connectionTimeout'),
|
|
|
+ threshold: "CRITICAL",
|
|
|
+ name: 'connection_timeout',
|
|
|
+ label: 'Connection Timeout',
|
|
|
+ displayType: 'parameter',
|
|
|
+ apiProperty: 'source.uri.connection_timeout',
|
|
|
+ units: 'Seconds',
|
|
|
+ isValid: function () {
|
|
|
+ var value = this.get('value');
|
|
|
+ return numericUtils.isPositiveNumber(value);
|
|
|
+ }.property('value')
|
|
|
})
|
|
|
]);
|
|
|
|