Skip to content

Commit

Permalink
fix(core): fix restore to this version behavior on pipeline config (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Jan 17, 2018
1 parent fabfc6a commit 7d5663b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h3>

<div class="row main-footer fixed-footer">
<div class="col-md-3">
<button is-visible="!pipeline.locked && viewState.isDirty" class="btn btn-default"
<button is-visible="!pipeline.locked && viewState.isDirty && !viewState.saving" class="btn btn-default"
analytics-on="click"
analytics-category="Pipeline Config"
analytics-event="Revert changes clicked"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ module.exports = angular.module('spinnaker.core.pipeline.config.pipelineConfigur
currentConfig: () => $scope.viewState.isDirty ? JSON.parse(angular.toJson($scope.pipeline)) : null,
}
}).result.then(newConfig => {
$scope.renderablePipeline = newConfig;
$scope.pipeline = newConfig;
$scope.$broadcast('pipeline-json-edited');
this.savePipeline();
}).catch(() => {});
};
Expand Down

0 comments on commit 7d5663b

Please sign in to comment.