diff --git a/hyperglass/static/js/hyperglass.js b/hyperglass/static/js/hyperglass.js index f1d9cfe..a5a9abe 100644 --- a/hyperglass/static/js/hyperglass.js +++ b/hyperglass/static/js/hyperglass.js @@ -17,16 +17,16 @@ dropdown.addEventListener('click', function(event) { var btn_copy = document.getElementById('btn-copy'); var clipboard = new ClipboardJS(btn_copy); clipboard.on('success', function(e) { - console.log(e); - $('#btn-copy').addClass('is-success').addClass('is-outlined'); - $('#copy-icon').removeClass('icofont-ui-copy').addClass('icofont-check'); - setTimeout(function(){ - $('#btn-copy').removeClass('is-success').removeClass('is-outlined'); - $('#copy-icon').removeClass('icofont-check').addClass('icofont-ui-copy'); - }, 1000) + console.log(e); + $('#btn-copy').addClass('is-success').addClass('is-outlined'); + $('#copy-icon').removeClass('icofont-ui-copy').addClass('icofont-check'); + setTimeout(function() { + $('#btn-copy').removeClass('is-success').removeClass('is-outlined'); + $('#copy-icon').removeClass('icofont-check').addClass('icofont-ui-copy'); + }, 1000) }); clipboard.on('error', function(e) { - console.log(e); + console.log(e); }); function bgpHelpASPath() { @@ -181,30 +181,20 @@ function submitForm() { target_input.addClass('is-danger'); target_error.html(`
-
-
- Authentication Error -
-
- ${response.responseText} -
-
+
+ ${response.responseText} +
`); - }, + }, 405: function(response, code) { clearPage(); target_error.show() target_input.addClass('is-warning'); target_error.html(`
-
-
- Input Not Allowed -
-
- ${response.responseText} -
-
+
+ ${response.responseText} +
`); }, 415: function(response, code) { @@ -213,19 +203,24 @@ function submitForm() { target_input.addClass('is-danger'); target_error.html(`
-
-
- Invalid Input -
-
- ${response.responseText} -
-
+
+ ${response.responseText} +
`); }, 429: function(response, code) { clearPage(); $("#ratelimit").addClass("is-active"); + }, + 504: function(response, code) { + clearPage(); + target_error.show() + target_error.html(` +
+
+ ${response.responseText} +
+ `); } } })