From bfd273d16f48a23c98c8e678ad74da42bef7795b Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 8 Jan 2015 15:27:49 -0500 Subject: [PATCH] - Make validation a bit nicer: - Add timeout to the DB validation - Make DB validation exception handling a bit nicer - Move the DB validation error message - Fix bug around RADOS config default for Is Secure - Allow hiding of the validation box --- data/database.py | 4 ++- static/css/quay.css | 5 ++++ .../directives/config/config-setup-tool.html | 9 +++++- static/js/core-config-setup.js | 14 +++++++++ static/partials/super-user.html | 30 +++++++++---------- util/config/validator.py | 14 +++++++-- 6 files changed, 56 insertions(+), 20 deletions(-) diff --git a/data/database.py b/data/database.py index ab23b3d7d..1953b4a14 100644 --- a/data/database.py +++ b/data/database.py @@ -71,7 +71,9 @@ db_random_func = CallableProxy() def validate_database_url(url): - driver = _db_from_url(url, {}) + driver = _db_from_url(url, { + 'connect_timeout': 5 + }) driver.connect() driver.close() diff --git a/static/css/quay.css b/static/css/quay.css index 9d032549a..0ae6bf47b 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -4923,4 +4923,9 @@ i.slack-icon { border: 1px solid #eee; vertical-align: middle; padding: 4px; +} + +.modal-footer.alert { + text-align: left; + margin-bottom: -16px; } \ No newline at end of file diff --git a/static/directives/config/config-setup-tool.html b/static/directives/config/config-setup-tool.html index 63f9701e5..bd39b3f60 100644 --- a/static/directives/config/config-setup-tool.html +++ b/static/directives/config/config-setup-tool.html @@ -546,7 +546,7 @@ +