-
Notifications
You must be signed in to change notification settings - Fork 906
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3256 from jrsquared/isolated-testing-target-stage
(netflix) Add Isolated Testing Target stage
- Loading branch information
Showing
11 changed files
with
395 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/scripts/modules/netflix/pipeline/stage/isolatedTestingTarget/editVip.modal.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import {module} from 'angular'; | ||
import {IModalServiceInstance} from 'angular-ui-bootstrap'; | ||
|
||
class EditVipModalCtrl { | ||
public cancel: (reason?: any) => void; | ||
public invalid: boolean = false; | ||
public errorMessage: string = null; | ||
|
||
constructor(public vip: string, private $uibModalInstance: IModalServiceInstance) { | ||
this.cancel = $uibModalInstance.dismiss; | ||
} | ||
|
||
public update(): void { | ||
if (this.vip.length === 0) { | ||
this.invalid = true; | ||
this.errorMessage = 'VIP must have a value'; | ||
} else { | ||
this.$uibModalInstance.close(this.vip); | ||
} | ||
} | ||
} | ||
|
||
export const EDIT_VIP_MODAL_CONTROLLER = 'spinnaker.netflix.pipeline.stage.isolatedTestingTarget.editVip'; | ||
|
||
module(EDIT_VIP_MODAL_CONTROLLER, []) | ||
.controller('EditVipModalCtrl', EditVipModalCtrl); | ||
|
26 changes: 26 additions & 0 deletions
26
app/scripts/modules/netflix/pipeline/stage/isolatedTestingTarget/editVip.modal.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<div modal-page class="flex-fill"> | ||
<modal-close dismiss="$dismiss()"></modal-close> | ||
<div class="modal-header"> | ||
<h3>Edit VIP</h3> | ||
</div> | ||
<div class="modal-body flex-fill"> | ||
<form role="form" name="form" class="form-horizontal flex-fill"> | ||
<div class="flex-fill"> | ||
<input type="text" class="form-control" ng-model="vm.vip"/> | ||
</div> | ||
</form> | ||
<div class="row"> | ||
<div class="form-group row slide-in" ng-if="vm.invalid"> | ||
<div class="col-sm-9 col-sm-offset-3 error-message"> | ||
Error: {{vm.errorMessage}} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button class="btn btn-default" ng-click="vm.cancel()">Cancel</button> | ||
<button class="btn btn-primary" | ||
ng-click="vm.update()"> | ||
<span class="glyphicon glyphicon-ok-circle"></span> Update | ||
</button> | ||
</div> | ||
</div> |
61 changes: 61 additions & 0 deletions
61
...ipts/modules/netflix/pipeline/stage/isolatedTestingTarget/isolatedTestingTargetStage.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<div class="form-horizontal isolated-testing-target-config-view"> | ||
<h4>Isolated Testing Target Config</h4> | ||
|
||
<h5>Owner</h5> | ||
<div class="horizontal-rule"></div> | ||
<stage-config-field label="Email"> | ||
<input type="email" required ng-model="stage.owner" | ||
class="form-control input-sm" /> | ||
</stage-config-field> | ||
|
||
<h5>Clusters<help-field key="pipeline.config.isolatedTestingTarget.clusters"></help-field></h5> | ||
<div class="horizontal-rule"></div> | ||
<div class="row"> | ||
<div style="margin: 10px 10px 0px 50px;"> | ||
<div class="well well-sm"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Location</th> | ||
<th>New Cluster</th> | ||
<th>VIPs <help-field key="pipeline.config.isolatedTestingTarget.vips"></th> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="cluster in stage.clusters"> | ||
<td> | ||
<account-tag account="cluster.account"></account-tag> | ||
{{isolatedTestingTargetStageCtrl.getRegion(cluster)}} | ||
</td> | ||
<td> | ||
{{isolatedTestingTargetStageCtrl.getClusterName(cluster)}} | ||
<br/> | ||
<a href ng-click="isolatedTestingTargetStageCtrl.editCluster(cluster, $index)">Edit</a> | ||
</td> | ||
<td> | ||
<strong>Overridden:</strong> {{isolatedTestingTargetStageCtrl.getClusterOldVIPs(cluster)}} <a href ng-click="isolatedTestingTargetStageCtrl.editVip(cluster, 'oldVip')">Edit</a> | ||
<br/> | ||
<strong>New:</strong> {{isolatedTestingTargetStageCtrl.getClusterNewVIPs(cluster)}} <a href ng-click="isolatedTestingTargetStageCtrl.editVip(cluster, 'newVip')">Edit</a> | ||
</td> | ||
<td> | ||
<a href ng-click="isolatedTestingTargetStageCtrl.deleteCluster($index);"> | ||
<span class="glyphicon glyphicon-trash" uib-tooltip="Delete Cluster"></span> | ||
</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<td colspan="4"> | ||
<button class="btn btn-block btn-sm add-new" ng-click="isolatedTestingTargetStageCtrl.addCluster()"> | ||
<span class="glyphicon glyphicon-plus-sign"></span> Add cluster | ||
</button> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
13 changes: 13 additions & 0 deletions
13
...modules/netflix/pipeline/stage/isolatedTestingTarget/isolatedTestingTargetStage.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {module} from 'angular'; | ||
|
||
import {ACCOUNT_SERVICE} from 'core/account/account.service'; | ||
import {NAMING_SERVICE} from 'core/naming/naming.service'; | ||
import {ISOLATED_TESTING_TARGET_STAGE} from './isolatedTestingTargetStage'; | ||
|
||
export const ISOLATED_TESTING_TARGET_STAGE_MODULE = 'spinnaker.netflix.pipeline.stage.isolatedTestingTarget'; | ||
|
||
module(ISOLATED_TESTING_TARGET_STAGE_MODULE, [ | ||
ISOLATED_TESTING_TARGET_STAGE, | ||
ACCOUNT_SERVICE, | ||
NAMING_SERVICE, | ||
]); |
Oops, something went wrong.