Skip to content
Snippets Groups Projects
Commit d792ad30 authored by Stavros Sachtouris's avatar Stavros Sachtouris Committed by Giorgos Korfiatis
Browse files

GUI bugfix: stop deactivating Pithos menu button

parent c834374e
No related branches found
No related tags found
No related merge requests found
...@@ -43,25 +43,23 @@ function set_dialogue(msg, terms, response) { ...@@ -43,25 +43,23 @@ function set_dialogue(msg, terms, response) {
function refresh_endpoints(identity_url) { function refresh_endpoints(identity_url) {
$.post(identity_url + '/tokens', function(data) { $.post(identity_url + '/tokens', function(data) {
var endpoints = data.access.serviceCatalog var endpoints = data.access.serviceCatalog;
global.pithos_ui = null; global.url_error = global.url_error || null;
global.account_ui = null;
global.url_error = null;
$.each(endpoints, function(i, endpoint) { $.each(endpoints, function(i, endpoint) {
switch(endpoint.type) { switch(endpoint.type) {
case 'object-store': try { case 'object-store': try {
global.pithos_ui = null;
global.pithos_ui = endpoint['endpoints'][0]['SNF:uiURL']; global.pithos_ui = endpoint['endpoints'][0]['SNF:uiURL'];
} catch(err) { console.log('Failed to get pithos_ui ' + err); } } catch(err) { console.log('Failed to get pithos_ui ' + err); }
break; break;
case 'account': try { case 'account': try {
global.account_ui = null;
global.account_ui = endpoint['endpoints'][0]['SNF:uiURL']; global.account_ui = endpoint['endpoints'][0]['SNF:uiURL'];
} catch(err) { console.log('Failed to get account_ui ' + err); } } catch(err) { console.log('Failed to get account_ui ' + err); }
break; break;
} }
}); });
}).fail(function(xhr, status, msg) { }).fail(function(xhr, status, msg) {
global.pithos_ui = null;
global.account_ui = null;
global.url_error = xhr.status + ' ' + msg; global.url_error = xhr.status + ' ' + msg;
console.log(xhr.status + ' ' + xhr.responseText); console.log(xhr.status + ' ' + xhr.responseText);
}); });
...@@ -87,22 +85,10 @@ function check_auth(identity_url, token) { ...@@ -87,22 +85,10 @@ function check_auth(identity_url, token) {
}); });
} }
function get_pithos_ui() { function get_pithos_ui() {return global.pithos_ui || null;}
if (global.pithos_ui) return global.pithos_ui;
return null;
}
function get_account_ui() { function get_account_ui() {return global.account_ui || null;}
if (global.account_ui) return global.account_ui;
return null;
}
function get_url_error() { function get_url_error() {return global.url_error || null;}
if (global.url_error) return global.url_error;
return null;
}
function get_auth_error() { function get_auth_error() {return global.auth_error || null;}
if (global.auth_error) return global.auth_error; \ No newline at end of file
return null;
}
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"SETTINGS": "Ρυθμίσεις", "SETTINGS": "Ρυθμίσεις",
"SETTINGSOPEN": "Ανοιχτό παράθυρο ρυθμίσεων", "SETTINGSOPEN": "Ανοιχτό παράθυρο ρυθμίσεων",
"ABOUT": "Σχετικά", "ABOUT": "Σχετικά",
"QUIT": "Κλείσιμο Agkyra" "QUIT": "Τερματισμός Agkyra"
}, },
"NOTIFIER": { "NOTIFIER": {
"info": "Agkyra", "info": "Agkyra",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment