Merge branch 'master' into pagesnew
This commit is contained in:
commit
86447c0a99
52 changed files with 553 additions and 211 deletions
29
static/css/directives/ui/quay-service-status.css
Normal file
29
static/css/directives/ui/quay-service-status.css
Normal file
|
@ -0,0 +1,29 @@
|
|||
.quay-service-status-indicator {
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 6px;
|
||||
background: #eee;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.quay-service-status-description {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.quay-service-status-indicator.none {
|
||||
background: #2fcc66;
|
||||
}
|
||||
|
||||
.quay-service-status-indicator.minor {
|
||||
background: #f1c40f;
|
||||
}
|
||||
|
||||
.quay-service-status-indicator.major {
|
||||
background: #e67e22;
|
||||
}
|
||||
|
||||
.quay-service-status-indicator.critical {
|
||||
background: #e74c3c;
|
||||
}
|
|
@ -23,6 +23,47 @@
|
|||
}
|
||||
}
|
||||
|
||||
.announcement a {
|
||||
color: lightblue;
|
||||
}
|
||||
|
||||
.announcement {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
|
||||
display: block;
|
||||
background: rgba(8, 61, 95, 0.6);
|
||||
min-height: 45px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
line-height: 45px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.announcement.inline {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.announcement .spacer {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
}
|
||||
|
||||
.announcement img {
|
||||
height: 45px;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.announcement .plus {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.scrollable-menu {
|
||||
max-height: 400px;
|
||||
overflow: auto;
|
||||
|
@ -496,6 +537,11 @@ i.toggle-icon:hover {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.docker-auth-dialog .download-cfg.not-supported {
|
||||
font-size: 14px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.docker-auth-dialog .download-cfg {
|
||||
float: left;
|
||||
padding-top: 6px;
|
||||
|
@ -1511,38 +1557,6 @@ i.toggle-icon:hover {
|
|||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.landing .announcement {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
|
||||
display: block;
|
||||
background: rgba(8, 61, 95, 0.6);
|
||||
min-height: 45px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
line-height: 45px;
|
||||
}
|
||||
|
||||
.landing .announcement .spacer {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
}
|
||||
|
||||
.landing .announcement img {
|
||||
height: 45px;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.landing .announcement .plus {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.landing {
|
||||
color: white;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@
|
|||
<tr>
|
||||
<td>Mail Sender:</td>
|
||||
<td>
|
||||
<input class="form-control" type="email" ng-model="config.DEFAULT_MAIL_SENDER"
|
||||
<input class="form-control" type="email" ng-model="config.MAIL_DEFAULT_SENDER"
|
||||
placeholder="E-mail address"></span>
|
||||
<div class="help-text">
|
||||
E-mail address from which all e-mails are sent. If not specified,
|
||||
|
|
|
@ -81,9 +81,19 @@
|
|||
</span>
|
||||
<input type="url" class="form-control" ng-model="currentConfig[field.name]" ng-switch-when="url" required>
|
||||
<input type="text" class="form-control" ng-model="currentConfig[field.name]" ng-switch-when="string" required>
|
||||
<input type="text" class="form-control" ng-model="currentConfig[field.name]" ng-switch-when="regex" required
|
||||
ng-pattern="getPattern(field)"
|
||||
placeholder="{{ field.placeholder }}">
|
||||
<div ng-switch-when="regex">
|
||||
<input type="text" class="form-control" ng-model="currentConfig[field.name]"
|
||||
ng-pattern="getPattern(field)"
|
||||
placeholder="{{ field.placeholder }}"
|
||||
ng-name="field.name"
|
||||
id="{{ field.name }}"
|
||||
required>
|
||||
|
||||
<div class="alert alert-warning" style="margin-top: 10px; margin-bottom: 10px"
|
||||
ng-if="field.regex_fail_message && hasRegexMismatch(createForm.$error, field.name)">
|
||||
<span ng-bind-html="field.regex_fail_message"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="entity-search" namespace="repository.namespace"
|
||||
placeholder="''"
|
||||
current-entity="currentConfig[field.name]"
|
||||
|
@ -91,7 +101,8 @@
|
|||
allowed-entities="['user', 'team', 'org']"
|
||||
ng-switch-when="entity"></div>
|
||||
|
||||
<div ng-if="getHelpUrl(field, currentConfig)" style="margin-top: 10px">
|
||||
<div ng-if="getHelpUrl(field, currentConfig)"
|
||||
style="margin-top: 10px; margin-bottom: 10px">
|
||||
See: <a href="{{ getHelpUrl(field, currentConfig) }}" target="_blank">{{ getHelpUrl(field, currentConfig) }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
<i class="fa fa-download"></i>
|
||||
<a href="javascript:void(0)" ng-click="downloadCfg(shownRobot)">Download .dockercfg file</a>
|
||||
</span>
|
||||
<span class="download-cfg not-supported" ng-show="!isDownloadSupported()">
|
||||
.dockercfg download not supported in this browser
|
||||
</span>
|
||||
<div class="clipboard-copied-message" style="display: none">
|
||||
Copied
|
||||
</div>
|
||||
|
|
7
static/directives/quay-service-status-bar.html
Normal file
7
static/directives/quay-service-status-bar.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="announcement inline" ng-show="indicator != 'none' && indicator != 'loading'">
|
||||
<div ng-repeat="incident in incidents">
|
||||
<span class="quay-service-status-indicator" ng-class="indicator"
|
||||
ng-if="indicator != 'loading'"></span>
|
||||
<a ng-href="{{ incident.shortlink }}" class="quay-service-status-description">{{ incident.name }}</a>
|
||||
</div>
|
||||
</div>
|
6
static/directives/quay-service-status.html
Normal file
6
static/directives/quay-service-status.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<span class="quay-service-status-element">
|
||||
<span class="quay-service-status-indicator" ng-class="indicator"
|
||||
ng-if="indicator != 'loading'"></span>
|
||||
<span class="cor-loader-inline" ng-if="indicator == 'loading'"></span>
|
||||
<a href="http://status.quay.io" class="quay-service-status-description">{{ description }}</a>
|
||||
</span>
|
11
static/js/directives/ng-name.js
Normal file
11
static/js/directives/ng-name.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Adds an ng-name attribute which sets the name of a form field. Using the normal name field
|
||||
* in Angular 1.3 works, but we're still on 1.2.
|
||||
*/
|
||||
angular.module('quay').directive('ngName', function () {
|
||||
return function (scope, element, attr) {
|
||||
scope.$watch(attr.ngName, function (name) {
|
||||
element.attr('name', name);
|
||||
});
|
||||
};
|
||||
});
|
|
@ -38,6 +38,23 @@ angular.module('quay').directive('createExternalNotificationDialog', function ()
|
|||
$scope.unauthorizedEmail = false;
|
||||
};
|
||||
|
||||
$scope.hasRegexMismatch = function(err, fieldName) {
|
||||
if (!err.pattern) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < err.pattern.length; ++i) {
|
||||
var current = err.pattern[i];
|
||||
var value = current.$viewValue;
|
||||
var elem = $element.find('#' + fieldName);
|
||||
if (value == elem[0].value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.createNotification = function() {
|
||||
if (!$scope.currentConfig.email) {
|
||||
$scope.performCreateNotification();
|
||||
|
|
22
static/js/directives/ui/quay-service-status-bar.js
Normal file
22
static/js/directives/ui/quay-service-status-bar.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* An element which displays the current status of the service as an announcement bar.
|
||||
*/
|
||||
angular.module('quay').directive('quayServiceStatusBar', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/quay-service-status-bar.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($scope, $element, StatusService) {
|
||||
$scope.indicator = 'loading';
|
||||
|
||||
StatusService.getStatus(function(data) {
|
||||
$scope.indicator = data['status']['indicator'];
|
||||
$scope.incidents = data['incidents'];
|
||||
});
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
24
static/js/directives/ui/quay-service-status.js
Normal file
24
static/js/directives/ui/quay-service-status.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* An element which displays the current status of the service.
|
||||
*/
|
||||
angular.module('quay').directive('quayServiceStatus', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/quay-service-status.html',
|
||||
replace: false,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($scope, $element, StatusService) {
|
||||
$scope.indicator = 'loading';
|
||||
$scope.description = '';
|
||||
|
||||
StatusService.getStatus(function(data) {
|
||||
$scope.indicator = data['status']['indicator'];
|
||||
$scope.incidents = data['incidents'];
|
||||
$scope.description = data['status']['description'];
|
||||
});
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -523,7 +523,7 @@ ImageHistoryTree.prototype.pruneUnreferenced_ = function(node) {
|
|||
}
|
||||
|
||||
if (!node.tags) {
|
||||
return true;
|
||||
return node.children.length == 0;
|
||||
}
|
||||
|
||||
return (node.children.length == 0 && node.tags.length == 0);
|
||||
|
|
|
@ -101,8 +101,11 @@ function(Config, Features) {
|
|||
'fields': [
|
||||
{
|
||||
'name': 'room_id',
|
||||
'type': 'string',
|
||||
'title': 'Room ID #'
|
||||
'type': 'regex',
|
||||
'title': 'Room ID #',
|
||||
'regex': '^[0-9]+$',
|
||||
'help_url': 'https://hipchat.com/admin/rooms',
|
||||
'regex_fail_message': 'We require the HipChat room <b>number</b>, not name.'
|
||||
},
|
||||
{
|
||||
'name': 'notification_token',
|
||||
|
|
|
@ -120,7 +120,7 @@ function(KeyService, UserService, CookieService, ApiService, Features, Config) {
|
|||
};
|
||||
|
||||
planService.getPlans = function(callback, opt_includePersonal) {
|
||||
planService.verifyLoaded(function() {
|
||||
planService.verifyLoaded(function(plans) {
|
||||
var filtered = [];
|
||||
for (var i = 0; i < plans.length; ++i) {
|
||||
var plan = plans[i];
|
||||
|
|
40
static/js/services/status-service.js
Normal file
40
static/js/services/status-service.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* Helper service for retrieving the statuspage status of the quay service.
|
||||
*/
|
||||
angular.module('quay').factory('StatusService', ['Features', function(Features) {
|
||||
if (!Features.BILLING) {
|
||||
return;
|
||||
}
|
||||
|
||||
var STATUSPAGE_PAGE_ID = '8szqd6w4s277';
|
||||
var STATUSPAGE_SRC = 'https://statuspage-production.s3.amazonaws.com/se-v2.js';
|
||||
var statusPageHandler = null;
|
||||
var statusPageData = null;
|
||||
var callbacks = [];
|
||||
|
||||
var handleGotData = function(data) {
|
||||
if (!data) { return; }
|
||||
statusPageData = data;
|
||||
|
||||
for (var i = 0; i < callbacks.length; ++i) {
|
||||
callbacks[i](data);
|
||||
}
|
||||
|
||||
callbacks = [];
|
||||
};
|
||||
|
||||
$.getScript(STATUSPAGE_SRC, function(){
|
||||
statusPageHandler = new StatusPage.page({ page: STATUSPAGE_PAGE_ID });
|
||||
statusPageHandler.summary({
|
||||
success : handleGotData
|
||||
});
|
||||
});
|
||||
|
||||
var statusService = {};
|
||||
statusService.getStatus = function(callback) {
|
||||
callbacks.push(callback);
|
||||
handleGotData(statusPageData);
|
||||
};
|
||||
|
||||
return statusService;
|
||||
}]);
|
|
@ -1,15 +1,4 @@
|
|||
<div class="jumbotron landing">
|
||||
<div class="announcement">
|
||||
<span class="hidden-xs-inline">
|
||||
<img src="/static/img/white_horizontal.png" style="height: 40px">
|
||||
<span class="plus">+</span>
|
||||
<img src="/static/img/coreos-wordmark-horiz-white.svg">
|
||||
</span>
|
||||
|
||||
<span class="spacer"></span>
|
||||
Quay.io is now part of CoreOS! <a href="https://coreos.com/blog/CoreOS-enterprise-docker-registry/" target="_blank">Read the blog post.</a>
|
||||
</div>
|
||||
|
||||
<div class="landing-background" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
|
||||
<div class="landing-filter" ng-class="user.anonymous ? 'landing': 'signedin'"></div>
|
||||
<div class="landing-content">
|
||||
|
|
Reference in a new issue