Work in progress: bitbucket support
This commit is contained in:
parent
c480fb2105
commit
5cc91ed202
11 changed files with 352 additions and 259 deletions
88
static/css/directives/ui/trigger-setup-githost.css
Normal file
88
static/css/directives/ui/trigger-setup-githost.css
Normal file
|
@ -0,0 +1,88 @@
|
|||
.trigger-setup-githost-element .ref-reference {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-reference span {
|
||||
cursor: pointer;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-reference:hover {
|
||||
color: #3276b1;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-reference:hover span {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-reference.match {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-reference.match span {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-filter {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-filter span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .selected-info {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .org-icon {
|
||||
width: 20px;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element li.repo-listing i {
|
||||
margin-right: 10px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element li.org-header {
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .matching-refs {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-matches {
|
||||
padding-left: 70px;
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .ref-matches .kind {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .matching-refs.tags li:before {
|
||||
content: "\f02b";
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .matching-refs.branches li:before {
|
||||
content: "\f126";
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
|
||||
.trigger-setup-githost-element .matching-refs li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
|
@ -3768,95 +3768,6 @@ pre.command:before {
|
|||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-reference {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-reference span {
|
||||
cursor: pointer;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-reference:hover {
|
||||
color: #3276b1;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-reference:hover span {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-reference.match {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-reference.match span {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-filter {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-filter span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .selected-info {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .github-org-icon {
|
||||
width: 20px;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element li.github-repo-listing i {
|
||||
margin-right: 10px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element li.github-org-header {
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .matching-refs {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-matches {
|
||||
padding-left: 70px;
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .ref-matches .kind {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .matching-refs.tags li:before {
|
||||
content: "\f02b";
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .matching-refs.branches li:before {
|
||||
content: "\f126";
|
||||
font-family: FontAwesome;
|
||||
}
|
||||
|
||||
.trigger-setup-github-element .matching-refs li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.setup-trigger-directive-element .dockerfile-found-content {
|
||||
margin-left: 32px;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,14 @@
|
|||
<!-- Trigger-specific setup -->
|
||||
<div class="trigger-description-element trigger-option-section" ng-switch on="trigger.service">
|
||||
<div ng-switch-when="github">
|
||||
<div class="trigger-setup-github" repository="repository" trigger="trigger"
|
||||
<div class="trigger-setup-githost" repository="repository" trigger="trigger"
|
||||
kind="github"
|
||||
next-step-counter="nextStepCounter" current-step-valid="state.stepValid"
|
||||
analyze="checkAnalyze(isValid)"></div>
|
||||
</div>
|
||||
<div ng-switch-when="bitbucket">
|
||||
<div class="trigger-setup-githost" repository="repository" trigger="trigger"
|
||||
kind="bitbucket"
|
||||
next-step-counter="nextStepCounter" current-step-valid="state.stepValid"
|
||||
analyze="checkAnalyze(isValid)"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="trigger-setup-github-element">
|
||||
<div class="trigger-setup-githost-element">
|
||||
<!-- Current selected info -->
|
||||
<div class="selected-info" ng-show="nextStepCounter > 0">
|
||||
<table style="width: 100%;">
|
||||
|
@ -8,9 +8,17 @@
|
|||
</td>
|
||||
<td>
|
||||
<div class="current-repo">
|
||||
<img class="dropdown-select-icon github-org-icon"
|
||||
<img class="dropdown-select-icon org-icon"
|
||||
ng-src="{{ state.currentRepo.avatar_url ? state.currentRepo.avatar_url : '/static/img/empty.png' }}">
|
||||
<a ng-href="https://github.com/{{ state.currentRepo.repo }}" target="_blank">{{ state.currentRepo.repo }}</a>
|
||||
|
||||
<!-- Kind Switch -->
|
||||
<a ng-href="https://github.com/{{ state.currentRepo.repo }}" target="_blank" ng-if="kind == 'github'">
|
||||
{{ state.currentRepo.repo }}
|
||||
</a>
|
||||
<a ng-href="https://bitbucket.org/{{ state.currentRepo.repo }}" target="_blank" ng-if="kind == 'bitbucket'">
|
||||
{{ state.currentRepo.repo }}
|
||||
</a>
|
||||
<!-- /Kind Switch -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -47,21 +55,23 @@
|
|||
<!-- Repository select -->
|
||||
<div class="step-view-step" complete-condition="state.currentRepo" load-callback="loadRepositories(callback)"
|
||||
load-message="Loading Repositories">
|
||||
<div style="margin-bottom: 12px">Please choose the GitHub repository that will trigger the build:</div>
|
||||
<div style="margin-bottom: 12px">Please choose the repository that will trigger the build:</div>
|
||||
<div class="dropdown-select" placeholder="'Enter or select a repository'" selected-item="state.currentRepo"
|
||||
lookahead-items="repoLookahead" allow-custom-input="true">
|
||||
<!-- Icons -->
|
||||
<i class="dropdown-select-icon none-icon fa fa-github fa-lg"></i>
|
||||
<img class="dropdown-select-icon github-org-icon"
|
||||
<i class="dropdown-select-icon none-icon fa fa-lg" ng-class="'fa-' + kind"></i>
|
||||
<img class="dropdown-select-icon org-icon"
|
||||
ng-src="{{ state.currentRepo.avatar_url ? state.currentRepo.avatar_url : '/static/image/empty.png' }}">
|
||||
|
||||
<!-- Dropdown menu -->
|
||||
<ul class="dropdown-select-menu scrollable-menu" role="menu">
|
||||
<li ng-repeat-start="org in orgs" role="presentation" class="dropdown-header github-org-header">
|
||||
<img ng-src="{{ org.info.avatar_url }}" class="github-org-icon">{{ org.info.name }}
|
||||
<li ng-repeat-start="org in orgs" role="presentation" class="dropdown-header org-header">
|
||||
<img ng-src="{{ org.info.avatar_url }}" class="org-icon">{{ org.info.name }}
|
||||
</li>
|
||||
<li ng-repeat="repo in org.repos" class="github-repo-listing">
|
||||
<a href="javascript:void(0)" ng-click="selectRepo(repo, org)"><i class="fa fa-github fa-lg"></i> {{ repo }}</a>
|
||||
<li ng-repeat="repo in org.repos" class="repo-listing">
|
||||
<a href="javascript:void(0)" ng-click="selectRepo(repo, org)">
|
||||
<i class="fa fa-lg" ng-class="'fa-' + kind"></i> {{ repo }}
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation" class="divider" ng-repeat-end ng-show="$index < orgs.length - 1"></li>
|
||||
</ul>
|
|
@ -1,16 +1,17 @@
|
|||
/**
|
||||
* An element which displays github-specific setup information for its build triggers.
|
||||
* An element which displays hosted Git (GitHub, Bitbucket)-specific setup information for its build triggers.
|
||||
*/
|
||||
angular.module('quay').directive('triggerSetupGithub', function () {
|
||||
angular.module('quay').directive('triggerSetupGithost', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/trigger-setup-github.html',
|
||||
templateUrl: '/static/directives/trigger-setup-githost.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'repository': '=repository',
|
||||
'trigger': '=trigger',
|
||||
'kind': '@kind',
|
||||
|
||||
'nextStepCounter': '=nextStepCounter',
|
||||
'currentStepValid': '=currentStepValid',
|
Reference in a new issue