From f6f857eec2de2e7bc1a4a4ab2fef17530583e228 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 15 Aug 2014 15:02:26 -0400 Subject: [PATCH] Add US West region --- .../82297d834ad_add_us_west_location.py | 36 +++++++++++++++++++ static/js/app.js | 4 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 data/migrations/versions/82297d834ad_add_us_west_location.py diff --git a/data/migrations/versions/82297d834ad_add_us_west_location.py b/data/migrations/versions/82297d834ad_add_us_west_location.py new file mode 100644 index 000000000..59eb1f800 --- /dev/null +++ b/data/migrations/versions/82297d834ad_add_us_west_location.py @@ -0,0 +1,36 @@ +"""add US West location + +Revision ID: 82297d834ad +Revises: 47670cbeced +Create Date: 2014-08-15 13:35:23.834079 + +""" + +# revision identifiers, used by Alembic. +revision = '82297d834ad' +down_revision = '47670cbeced' + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import mysql +from data.model.sqlalchemybridge import gen_sqlalchemy_metadata +from data.database import all_models + + +def upgrade(): + schema = gen_sqlalchemy_metadata(all_models) + + op.bulk_insert(schema.tables['imagestoragelocation'], + [ + {'id':8, 'name':'s3_us_west_1'}, + ]) + + +def downgrade(): + schema = gen_sqlalchemy_metadata(all_models) + + op.execute( + (imagestoragelocation.delete() + .where(imagestoragelocation.c.name == op.inline_literal('s3_us_west_1'))) + + ) diff --git a/static/js/app.js b/static/js/app.js index 3bcbd2c7d..9c4095db6 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -5321,7 +5321,9 @@ quayApp.directive('locationView', function () { 'local_us': { 'country': 'US', 'data': 'quay-registry.s3.amazonaws.com', 'title': 'United States' }, 'local_eu': { 'country': 'EU', 'data': 'quay-registry-eu.s3-eu-west-1.amazonaws.com', 'title': 'Europe' }, - 's3_us_east_1': { 'country': 'US', 'data': 'quay-registry.s3.amazonaws.com', 'title': 'United States' }, + 's3_us_east_1': { 'country': 'US', 'data': 'quay-registry.s3.amazonaws.com', 'title': 'United States (East)' }, + 's3_us_west_1': { 'country': 'US', 'data': 'quay-registry-cali.s3.amazonaws.com', 'title': 'United States (West)' }, + 's3_eu_west_1': { 'country': 'EU', 'data': 'quay-registry-eu.s3-eu-west-1.amazonaws.com', 'title': 'Europe' }, 's3_ap_southeast_1': { 'country': 'SG', 'data': 'quay-registry-singapore.s3-ap-southeast-1.amazonaws.com', 'title': 'Singapore' },