Merge branch 'master' into pagesnew

This commit is contained in:
Joseph Schorr 2015-03-05 14:22:10 -05:00
commit 86447c0a99
52 changed files with 553 additions and 211 deletions

View file

@ -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',

View file

@ -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];

View 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;
}]);