Merge branch 'master' into pagesnew
This commit is contained in:
commit
86447c0a99
52 changed files with 553 additions and 211 deletions
|
@ -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;
|
||||
}]);
|
Reference in a new issue