Implement new create and manager trigger UI
Implements the new trigger setup user interface, which is now a linear workflow found on its own page, rather than a tiny modal dialog Fixes #1187
This commit is contained in:
parent
21b09a7451
commit
8e863b8cf5
47 changed files with 1835 additions and 1068 deletions
65
static/partials/trigger-setup.html
Normal file
65
static/partials/trigger-setup.html
Normal file
|
@ -0,0 +1,65 @@
|
|||
<div class="resource-view trigger-setup-element"
|
||||
resources="[repositoryResource, triggerResource]"
|
||||
error-message="'Build trigger not found'">
|
||||
<div class="page-content">
|
||||
<div class="cor-title">
|
||||
<span class="cor-title-link">
|
||||
<a class="back-link" href="/repository/{{ repository.namespace }}/{{ repository.name }}?tab=builds">
|
||||
<i class="fa fa-hdd-o" style="margin-right: 4px"></i>
|
||||
{{ repository.namespace }}/{{ repository.name }}
|
||||
</a>
|
||||
</span>
|
||||
<span class="cor-title-content">
|
||||
<i class="fa" ng-class="getTriggerIcon()"></i>
|
||||
Setup Build Trigger: {{ getTriggerId() }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="co-main-content-panel" ng-show="state != 'activated' && trigger.is_active">
|
||||
<div class="co-alert co-alert-info">
|
||||
Trigger has already been activated.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="co-main-content-panel" ng-show="state == 'activated' || !trigger.is_active">
|
||||
<!-- state = activated -->
|
||||
<div class="activated" ng-if="state == 'activated'">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-6 col-sm-12 col-lg-6 content">
|
||||
<h3>Trigger has been successfully activated</h3>
|
||||
<div class="credentials" trigger="trigger"></div>
|
||||
<div class="button-bar">
|
||||
<a href="/repository/{{ repository.namespace }}/{{ repository.name }}?tab=builds">
|
||||
Return to {{ repository.namespace }}/{{ repository.name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /state = activated -->
|
||||
|
||||
<!-- state = managing or activating -->
|
||||
<div ng-if="state == 'managing' || state == 'activating'"
|
||||
ng-class="{'activating': state == 'activating'}">
|
||||
<!-- Select the correct flow -->
|
||||
<div ng-switch on="trigger.service">
|
||||
<!-- Custom Git -->
|
||||
<div ng-switch-when="custom-git">
|
||||
<div class="manage-trigger-custom-git" trigger="trigger"
|
||||
activate-trigger="activateTrigger(config, pull_robot)"></div>
|
||||
</div> <!-- /custom-git -->
|
||||
|
||||
<!-- Hosted Git (GitHub, Gitlab, BitBucket) -->
|
||||
<div ng-switch-default>
|
||||
<div class="manage-trigger-githost" trigger="trigger" repository="repository"
|
||||
activate-trigger="activateTrigger(config, pull_robot)"></div>
|
||||
</div> <!-- /hosted -->
|
||||
</div> <!-- /ngSwitch -->
|
||||
|
||||
<div class="activating-message" ng-show="state == 'activating'">
|
||||
<div class="cor-loader-inline"></div><b>Completing setup of the build trigger</b>
|
||||
</div>
|
||||
</div> <!-- /state = managing -->
|
||||
|
||||
</div> <!-- /co-main-content-panel -->
|
||||
</div>
|
||||
</div>
|
Reference in a new issue