Merge pull request #2517 from alecmerdler/fix-triggers

Fix Build Trigger UI
This commit is contained in:
Alec Merdler 2017-04-06 17:07:43 -07:00 committed by GitHub
commit 7ce92aa1f3
4 changed files with 41 additions and 42 deletions

View file

@ -11,7 +11,7 @@ import { Input, Component, OnChanges, SimpleChanges } from 'ng-metadata/core';
export class ContextPathSelectComponent implements OnChanges {
// FIXME: Use one-way data binding
@Input('=') public currentContext: string;
@Input('=') public currentContext: string = '';
@Input('=') public isValidContext: boolean;
@Input('=') public contexts: string[];
private isUnknownContext: boolean = true;

View file

@ -1,5 +1,6 @@
<div class="dockerfile-path-select-element">
<div class="dropdown-select" placeholder="'Enter path containing a Dockerfile'"
<div class="dropdown-select"
placeholder="'Enter path containing a Dockerfile'"
selected-item="$ctrl.selectedPath"
lookahead-items="$ctrl.paths"
handle-input="$ctrl.setPath(input)"

View file

@ -11,7 +11,7 @@ import { Input, Component, OnChanges, SimpleChanges } from 'ng-metadata/core';
export class DockerfilePathSelectComponent implements OnChanges {
// FIXME: Use one-way data binding
@Input('=') public currentPath: string;
@Input('=') public currentPath: string = '';
@Input('=') public isValidPath: boolean;
@Input('=') public paths: string[];
@Input('=') public supportsFullListing: boolean;

View file

@ -1,13 +1,12 @@
<div class="manage-trigger-githost-element manage-trigger-control">
<linear-workflow
done-title="Create Trigger"
(on-workflow-complete)="$ctrl.createTrigger($event)">
<linear-workflow done-title="Create Trigger"
(on-workflow-complete)="$ctrl.createTrigger($event)">
<!-- Section: Namespace -->
<linear-workflow-section class="row"
section-id="namespace"
section-title="{{ 'Select ' + $ctrl.namespaceTitle }}"
section-valid="$ctrl.local.selectedNamespace">
section-id="namespace"
section-title="{{ 'Select ' + $ctrl.namespaceTitle }}"
section-valid="$ctrl.local.selectedNamespace">
<div class="col-lg-7 col-md-7 col-sm-12 main-col"
ng-if="$ctrl.local.namespaces">
<h3>Select {{ $ctrl.namespaceTitle }}</h3>
@ -81,9 +80,9 @@
<!-- Section: Repository -->
<linear-workflow-section class="row"
section-id="repo"
section-title="Select Repository"
section-valid="$ctrl.local.selectedRepository">
section-id="repo"
section-title="Select Repository"
section-valid="$ctrl.local.selectedRepository">
<div class="col-lg-7 col-md-7 col-sm-12 main-col" ng-if="$ctrl.local.repositories">
<h3>Select Repository</h3>
@ -180,9 +179,9 @@
<!-- Section: Trigger Options -->
<linear-workflow-section class="row"
section-id="triggeroptions"
section-title="Configure Trigger"
section-valid="$ctrl.local.triggerOptions">
section-id="triggeroptions"
section-title="Configure Trigger"
section-valid="$ctrl.local.triggerOptions">
<div class="col-lg-7 col-md-7 col-sm-12 main-col" ng-if="$ctrl.local.repositoryRefs">
<h3>Configure Trigger</h3>
<strong>
@ -202,7 +201,10 @@
</div>
<div class="radio">
<label>
<input type="radio" name="optionRadio" ng-model="$ctrl.local.triggerOptions.hasBranchTagFilter" ng-value="true">
<input type="radio"
name="optionRadio"
ng-model="$ctrl.local.triggerOptions.hasBranchTagFilter"
ng-value="true">
<div class="title">Trigger only on branches and tags matching a regular expression</div>
<div class="description">Only build container images for a subset of branches and/or tags.</div>
<div class="extended" ng-if="$ctrl.local.triggerOptions.hasBranchTagFilter">
@ -214,10 +216,9 @@
ng-model="$ctrl.local.triggerOptions.branchTagFilter"
required>
<div class="description">Examples: heads/master, tags/tagname, heads/.+</div>
<regex-match-view
items="$ctrl.local.repositoryFullRefs"
regex="$ctrl.local.triggerOptions.branchTagFilter"
ng-if="$ctrl.local.triggerOptions.branchTagFilter"></regex-match-view>
<regex-match-view items="$ctrl.local.repositoryFullRefs"
regex="$ctrl.local.triggerOptions.branchTagFilter"
ng-if="$ctrl.local.triggerOptions.branchTagFilter"></regex-match-view>
</td>
</tr>
</table>
@ -239,9 +240,9 @@
<!-- Section: Dockerfile Location -->
<linear-workflow-section class="row"
section-id="dockerfilelocation"
section-title="Select Dockerfile"
section-valid="$ctrl.local.hasValidDockerfilePath">
section-id="dockerfilelocation"
section-title="Select Dockerfile"
section-valid="$ctrl.local.hasValidDockerfilePath">
<div class="col-lg-7 col-md-7 col-sm-12 main-col"
ng-if="$ctrl.local.dockerfileLocations.status == 'error'">
<div class="co-alert co-alert-warning">
@ -255,12 +256,10 @@
Please select the location of the Dockerfile to build when this trigger is invoked
</strong>
<dockerfile-path-select
current-path="$ctrl.local.dockerfilePath"
paths="$ctrl.local.dockerfileLocations.dockerfile_paths"
supports-full-listing="true"
is-valid-path="$ctrl.local.hasValidDockerfilePath">
</dockerfile-path-select>
<dockerfile-path-select current-path="$ctrl.local.dockerfilePath"
paths="$ctrl.local.dockerfileLocations.dockerfile_paths"
supports-full-listing="true"
is-valid-path="$ctrl.local.hasValidDockerfilePath"></dockerfile-path-select>
</div>
<div class="col-lg-8 col-md-8 col-sm-12 main-col"
@ -272,11 +271,11 @@
</div>
</linear-workflow-section><!-- /Section: Dockerfile Location -->
<!-- Section: Context Location -->
<!-- Section: Context Location -->
<linear-workflow-section class="row"
section-id="contextlocation"
section-title="Select Docker Context"
section-valid="$ctrl.local.hasValidContextLocation">
section-id="contextlocation"
section-title="Select Docker Context"
section-valid="$ctrl.local.hasValidContextLocation">
<div class="col-lg-7 col-md-7 col-sm-12 main-col"
ng-if="$ctrl.local.dockerfileLocations.status == 'error'">
<div class="co-alert co-alert-warning">
@ -290,12 +289,10 @@
Please select the context for the docker build
</strong>
<context-path-select
current-context="$ctrl.local.dockerContext"
current-path="$ctrl.local.dockerfilePath"
contexts="$ctrl.local.contexts"
is-valid-context="$ctrl.local.hasValidContextLocation">
</context-path-select>
<context-path-select current-context="$ctrl.local.dockerContext"
current-path="$ctrl.local.dockerfilePath"
contexts="$ctrl.local.contexts"
is-valid-context="$ctrl.local.hasValidContextLocation"></context-path-select>
</div>
<div class="col-lg-8 col-md-8 col-sm-12 main-col"
@ -309,9 +306,10 @@
<!-- Section: Robot Account -->
<linear-workflow-section class="row"
section-id="verification"
section-title="Robot Account"
section-valid="$ctrl.local.triggerAnalysis.status != 'error' && ($ctrl.local.triggerAnalysis.status != 'requiresrobot' || $ctrl.local.robotAccount != null)">
section-id="verification"
section-title="Robot Account"
section-valid="$ctrl.local.triggerAnalysis.status != 'error' &&
($ctrl.local.triggerAnalysis.status != 'requiresrobot' || $ctrl.local.robotAccount != null)">
<!-- Error -->
<div class="col-lg-7 col-md-7 col-sm-12 main-col"
ng-if="$ctrl.local.triggerAnalysis.status == 'error'">