1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

get ajax timeout from user config [skip ci]

This commit is contained in:
checktheroads
2019-08-23 08:47:19 -07:00
parent af2ecfdd49
commit e337913cbe
2 changed files with 8 additions and 6 deletions

View File

@@ -219,6 +219,7 @@ class General(BaseSettings):
redis_host: Union[str, IPvAnyNetwork] = "localhost"
redis_port: int = 6379
requires_ipv6_cidr: List[str] = ["cisco_ios", "cisco_nxos"]
query_timeout: int = 15
class Branding(BaseSettings):

View File

@@ -8,6 +8,7 @@ const animsition = require('animsition');
const ClipboardJS = require('clipboard');
const frontEndConfig = require('./frontend.json');
const cfgGeneral = frontEndConfig.general;
const inputMessages = frontEndConfig.messages;
const pageContainer = $('#hg-page-container');
const formContainer = $('#hg-form');
@@ -86,7 +87,7 @@ queryType.selectpicker({
footerTermsBtn.popover({
html: true,
trigger: 'focus',
trigger: 'focus click',
template: footerPopoverTemplate,
placement: 'top',
content: $('#hg-footer-terms-html').html(),
@@ -94,7 +95,7 @@ footerTermsBtn.popover({
footerHelpBtn.popover({
html: true,
trigger: 'focus',
trigger: 'focus click',
placement: 'top',
template: footerPopoverTemplate,
content: $('#hg-footer-help-html').html(),
@@ -102,7 +103,7 @@ footerHelpBtn.popover({
footerCreditBtn.popover({
html: true,
trigger: 'focus',
trigger: 'focus click',
placement: 'top',
title: $('#hg-footer-credit-title').html(),
content: $('#hg-footer-credit-content').html(),
@@ -116,8 +117,8 @@ $(document).ready(() => {
$('.animsition').animsition({
inClass: 'fade-in',
outClass: 'fade-out',
inDuration: 800,
outDuration: 800,
inDuration: 400,
outDuration: 400,
transition: (url) => { window.location.href = url; },
});
formContainer.animsition('in');
@@ -215,7 +216,7 @@ const queryApp = (queryType, queryTypeName, locationList, queryTarget) => {
contentType: 'application/json; charset=utf-8',
context: document.body,
async: true,
timeout: 15000,
timeout: cfgGeneral.query_timeout * 1000,
})
.done((data, textStatus, jqXHR) => {
const displayHtml = `<pre>${jqXHR.responseText}</pre>`;