Skip to content

Commit

Permalink
fix(artifacts): replace legacy-only Find Artifacts UI with Produces A…
Browse files Browse the repository at this point in the history
…rtifacts (#8160)
  • Loading branch information
maggieneterval committed Apr 13, 2020
1 parent f7be1d4 commit df9978f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
@@ -1,13 +1,6 @@
import { IController, IScope } from 'angular';

import {
ApplicationReader,
ExpectedArtifactService,
IExpectedArtifact,
IPipeline,
IStage,
PipelineConfigService,
} from 'core';
import { ApplicationReader, ExpectedArtifactService, IExpectedArtifact, IPipeline, PipelineConfigService } from 'core';

export interface IFindArtifactFromExecutionStage {
application: string;
Expand Down Expand Up @@ -84,12 +77,4 @@ export class FindArtifactFromExecutionCtrl implements IController {
public onApplicationSelect() {
this.loadPipelines();
}

public addExpectedArtifact = () => {
ExpectedArtifactService.addNewArtifactTo(this.stage);
};

public removeExpectedArtifact = (stage: IStage, expectedArtifact: IExpectedArtifact) => {
stage.expectedArtifacts = stage.expectedArtifacts.filter((a: IExpectedArtifact) => a.id !== expectedArtifact.id);
};
}
Expand Up @@ -41,18 +41,4 @@ <h4>Execution Options</h4>
<label> <input type="checkbox" ng-model="ctrl.stage.executionOptions.running" /> that are still running </label>
</div>
</div>
<h4>Match Artifacts</h4>
<expected-artifact
ng-repeat="artifact in ctrl.stage.expectedArtifacts"
context="ctrl.stage"
expected-artifact="artifact"
remove-expected-artifact="ctrl.removeExpectedArtifact"
/>
<div class="row">
<div class="col-md-12">
<button class="btn btn-block btn-add-trigger add-new" ng-click="ctrl.addExpectedArtifact()">
<span class="glyphicon glyphicon-plus-sign"></span> Add Artifact
</button>
</div>
</div>
</div>
Expand Up @@ -29,6 +29,7 @@ module(FIND_ARTIFACT_FROM_EXECUTION_STAGE, [])
{ type: 'requiredField', fieldName: 'pipeline', fieldLabel: 'Pipeline' },
{ type: 'requiredField', fieldName: 'application', fieldLabel: 'Application' },
],
producesArtifacts: true,
});
}
})
Expand Down

0 comments on commit df9978f

Please sign in to comment.