Make github trigger setup a bit nicer when there are a lot of repos
This commit is contained in:
parent
6e25eaaa99
commit
793b6f543c
3 changed files with 18 additions and 12 deletions
|
@ -19,6 +19,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scrollable-menu {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown.input-group-addon {
|
.dropdown.input-group-addon {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
<!-- Current selected info -->
|
<!-- Current selected info -->
|
||||||
<div class="selected-info" ng-show="nextStepCounter > 0">
|
<div class="selected-info" ng-show="nextStepCounter > 0">
|
||||||
<table style="width: 100%;">
|
<table style="width: 100%;">
|
||||||
<tr ng-show="currentRepo && nextStepCounter > 0">
|
<tr ng-show="state.currentRepo && nextStepCounter > 0">
|
||||||
<td width="200px">
|
<td width="200px">
|
||||||
Repository:
|
Repository:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="current-repo">
|
<div class="current-repo">
|
||||||
<img class="dropdown-select-icon github-org-icon"
|
<img class="dropdown-select-icon github-org-icon"
|
||||||
ng-src="{{ currentRepo.avatar_url ? currentRepo.avatar_url : '//www.gravatar.com/avatar/' }}">
|
ng-src="{{ state.currentRepo.avatar_url ? state.currentRepo.avatar_url : '//www.gravatar.com/avatar/' }}">
|
||||||
<a ng-href="https://github.com/{{ currentRepo.repo }}" target="_blank">{{ currentRepo.repo }}</a>
|
<a ng-href="https://github.com/{{ state.currentRepo.repo }}" target="_blank">{{ state.currentRepo.repo }}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -45,18 +45,18 @@
|
||||||
<div class="step-view" next-step-counter="nextStepCounter" current-step-valid="currentStepValid"
|
<div class="step-view" next-step-counter="nextStepCounter" current-step-valid="currentStepValid"
|
||||||
steps-completed="stepsCompleted()">
|
steps-completed="stepsCompleted()">
|
||||||
<!-- Repository select -->
|
<!-- Repository select -->
|
||||||
<div class="step-view-step" complete-condition="currentRepo" load-callback="loadRepositories(callback)"
|
<div class="step-view-step" complete-condition="state.currentRepo" load-callback="loadRepositories(callback)"
|
||||||
load-message="Loading Repositories">
|
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 GitHub repository that will trigger the build:</div>
|
||||||
<div class="dropdown-select" placeholder="'Select a repository'" selected-item="currentRepo"
|
<div class="dropdown-select" placeholder="'Enter or select a repository'" selected-item="state.currentRepo"
|
||||||
lookahead-items="repoLookahead">
|
lookahead-items="repoLookahead" allow-custom-input="true">
|
||||||
<!-- Icons -->
|
<!-- Icons -->
|
||||||
<i class="dropdown-select-icon none-icon fa fa-github fa-lg"></i>
|
<i class="dropdown-select-icon none-icon fa fa-github fa-lg"></i>
|
||||||
<img class="dropdown-select-icon github-org-icon"
|
<img class="dropdown-select-icon github-org-icon"
|
||||||
ng-src="{{ currentRepo.avatar_url ? currentRepo.avatar_url : '//www.gravatar.com/avatar/' }}">
|
ng-src="{{ state.currentRepo.avatar_url ? state.currentRepo.avatar_url : '//www.gravatar.com/avatar/' }}">
|
||||||
|
|
||||||
<!-- Dropdown menu -->
|
<!-- Dropdown menu -->
|
||||||
<ul class="dropdown-select-menu" role="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">
|
<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 }}
|
<img ng-src="{{ org.info.avatar_url }}" class="github-org-icon">{{ org.info.name }}
|
||||||
</li>
|
</li>
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
|
|
||||||
<div class="quay-spinner" ng-show="!locations && !locationError"></div>
|
<div class="quay-spinner" ng-show="!locations && !locationError"></div>
|
||||||
<div class="alert alert-warning" ng-show="locations && !locations.length">
|
<div class="alert alert-warning" ng-show="locations && !locations.length">
|
||||||
Warning: No Dockerfiles were found in {{ currentRepo.repo }}
|
Warning: No Dockerfiles were found in {{ state.currentRepo.repo }}
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-warning" ng-show="locationError">
|
<div class="alert alert-warning" ng-show="locationError">
|
||||||
{{ locationError }}
|
{{ locationError }}
|
||||||
|
|
|
@ -5263,6 +5263,7 @@ quayApp.directive('triggerSetupGithub', function () {
|
||||||
$scope.tagNames = null;
|
$scope.tagNames = null;
|
||||||
|
|
||||||
$scope.state = {
|
$scope.state = {
|
||||||
|
'currentRepo': null,
|
||||||
'branchTagFilter': '',
|
'branchTagFilter': '',
|
||||||
'hasBranchTagFilter': false,
|
'hasBranchTagFilter': false,
|
||||||
'isInvalidLocation': true,
|
'isInvalidLocation': true,
|
||||||
|
@ -5384,7 +5385,7 @@ quayApp.directive('triggerSetupGithub', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.selectRepo = function(repo, org) {
|
$scope.selectRepo = function(repo, org) {
|
||||||
$scope.currentRepo = {
|
$scope.state.currentRepo = {
|
||||||
'repo': repo,
|
'repo': repo,
|
||||||
'avatar_url': org['info']['avatar_url'],
|
'avatar_url': org['info']['avatar_url'],
|
||||||
'toString': function() {
|
'toString': function() {
|
||||||
|
@ -5435,8 +5436,8 @@ quayApp.directive('triggerSetupGithub', function () {
|
||||||
$scope.repoLookahead = repos;
|
$scope.repoLookahead = repos;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$watch('currentRepo', function(repo) {
|
$scope.$watch('state.currentRepo', function(repo) {
|
||||||
if (repo) {
|
if (repo) {
|
||||||
$scope.selectRepoInternal(repo);
|
$scope.selectRepoInternal(repo);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue