handled Ajax based session expire issue
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/be6b5807 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/be6b5807 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/be6b5807 Branch: refs/heads/master Commit: be6b5807ae03cf6164833922cdeb53dd21e1e2a8 Parents: ab445a6 Author: Dakshika Jayathilaka <[email protected]> Authored: Sun May 3 18:24:12 2015 +0530 Committer: Dakshika Jayathilaka <[email protected]> Committed: Sun May 3 18:24:12 2015 +0530 ---------------------------------------------------------------------- .../console/themes/theme0/js/custom/applications-deploy.js | 5 +++++ .../console/themes/theme0/js/custom/applications-editor.js | 4 ++++ .../themes/theme0/js/custom/applications_group_editor.js | 4 ++++ .../console/themes/theme0/partials/applications.hbs | 5 +++++ .../console/themes/theme0/partials/applications_form.hbs | 5 +++++ .../console/themes/theme0/partials/applications_topology.hbs | 5 +++++ .../console/themes/theme0/partials/configure_form.hbs | 6 ++++++ .../console/themes/theme0/partials/users_form.hbs | 6 ++++++ 8 files changed, 40 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-deploy.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-deploy.js b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-deploy.js index f5e1f4a..4d9f2e5 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-deploy.js +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-deploy.js @@ -325,6 +325,11 @@ var applicationPolicyDefault = { // Document ready events $(document).ready(function(){ + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); + //*******************Adding JSON editor *************// JSONEditor.defaults.theme = 'bootstrap3'; JSONEditor.defaults.iconlib = 'fontawesome4'; http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js index 350fdfa..7f58601 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js @@ -760,6 +760,10 @@ function dagrePosition(){ // Document ready events $(document).ready(function(){ + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); $('#deploy').attr('disabled','disabled'); http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_group_editor.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_group_editor.js b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_group_editor.js index 30bb282..d2e7017 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_group_editor.js +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications_group_editor.js @@ -350,6 +350,10 @@ var groupBlockDefault = { // Document ready events $(document).ready(function(){ + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); $('#deploy').on('click', function(){ var payload = genGroupJSON({}, jsPlumb.getConnections()); http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications.hbs index 5b7c253..88329d8 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications.hbs @@ -72,6 +72,11 @@ <script> $(document).ready(function () { + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); + $('.general-table div.data-url').click(function () { window.location = $(this).attr("data-url"); }); http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs index 5a1cb5b..94b65c8 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs @@ -153,6 +153,11 @@ <script> $(document).ready(function () { + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); + {{#if isForm}} // Set the default CSS theme and icon library globally JSONEditor.defaults.theme = 'bootstrap3'; http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs index 496d814..b8cee6c 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_topology.hbs @@ -64,6 +64,11 @@ var applicationJSON = {{{applicationJSON}}}; $(window).load(function() { + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); + //initial generation with deafult call update(genTree(topologydata)); http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs index ea5cd2b..cf830de 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs @@ -296,6 +296,12 @@ <script> $(document).ready(function () { + + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); + {{#if isForm}} // Set the default CSS theme and icon library globally JSONEditor.defaults.theme = 'bootstrap3'; http://git-wip-us.apache.org/repos/asf/stratos/blob/be6b5807/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs index ba11a26..2fcf26a 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/users_form.hbs @@ -137,6 +137,12 @@ <script> $(document).ready(function () { + + //handled Ajax base session expire issue + $(document).ajaxError(function (e, xhr, settings) { + window.location.href = '../'; + }); + {{#if isForm}} // Set the default CSS theme and icon library globally JSONEditor.defaults.theme = 'bootstrap3';
