Skip to content

Commit

Permalink
Merge pull request #1763 from anotherchrisberry/canary-hours
Browse files Browse the repository at this point in the history
move notificationHours binding to ctrl on canary stage
  • Loading branch information
anotherchrisberry committed Dec 1, 2015
2 parents 393d6a7 + 1216e59 commit 758c5ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h5>Analysis Config</h5>
</span>
</stage-config-field>
<stage-config-field label="Notification Hours" help-key="pipeline.config.canary.notificationHours" field-columns="3">
<input type="text" ng-model="notificationHours"
<input type="text" ng-model="canaryStageCtrl.notificationHours"
class="form-control input-sm" ng-change="canaryStageCtrl.splitNotificationHours()" />
</stage-config-field>
<stage-config-field label="Frequency" help-key="pipeline.config.canary.canaryInterval" field-columns="3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ module.exports = angular.module('spinnaker.netflix.pipeline.stage.canaryStage',
$scope.accounts = accounts;
});

$scope.notificationHours = $scope.stage.canary.canaryConfig.canaryAnalysisConfig.notificationHours.join(',');
this.notificationHours = $scope.stage.canary.canaryConfig.canaryAnalysisConfig.notificationHours.join(',');

this.splitNotificationHours = function() {
var hoursField = $scope.notificationHours || '';
this.splitNotificationHours = () => {
var hoursField = this.notificationHours || '';
$scope.stage.canary.canaryConfig.canaryAnalysisConfig.notificationHours = _.map(hoursField.split(','), function(str) {
if (!parseInt(str.trim()).isNaN) {
return parseInt(str.trim());
Expand Down

0 comments on commit 758c5ea

Please sign in to comment.