forked from community/device-mgt-core
Merge pull request #728 from rasika/git_issue_726
Resolving cannot log into devicemgt app when tenant is not loaded in API Managerrevert-70aa11f8
commit
5dc9259fc0
@ -0,0 +1,57 @@
|
|||||||
|
{{!-- Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
|
||||||
|
WSO2 Inc. licenses this file to you under the Apache License,
|
||||||
|
Version 2.0 (the "License"); you may not use this file except
|
||||||
|
in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License. --}}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
{{defineZone "favicon"}}
|
||||||
|
<title>
|
||||||
|
{{defineZone "title"}}
|
||||||
|
</title>
|
||||||
|
{{defineZone "topLibCss"}}
|
||||||
|
{{defineZone "topCss"}}
|
||||||
|
{{defineZone "topJs"}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--modal-->
|
||||||
|
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalDemo">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content clearfix">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--modal-->
|
||||||
|
|
||||||
|
{{defineZone "content"}}
|
||||||
|
|
||||||
|
{{defineZone "bottomModalContent"}}
|
||||||
|
{{defineZone "bottomLibJs"}}
|
||||||
|
{{defineZone "bottomJs"}}
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,57 @@
|
|||||||
|
{{!
|
||||||
|
Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
|
||||||
|
WSO2 Inc. licenses this file to you under the Apache License,
|
||||||
|
Version 2.0 (the "License"); you may not use this file except
|
||||||
|
in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
}}
|
||||||
|
{{unit "cdmf.unit.ui.title" pageTitle="Home"}}
|
||||||
|
|
||||||
|
{{#zone "breadcrumbs"}}
|
||||||
|
<li>
|
||||||
|
<a href="{{@app.context}}/">
|
||||||
|
<i class="icon fw fw-home"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/zone}}
|
||||||
|
|
||||||
|
{{#zone "content"}}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
Loading...Please Wait
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/zone}}
|
||||||
|
|
||||||
|
{{#zone "bottomJs"}}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('body').attr("data-toggle", "loading")
|
||||||
|
.attr("data-loading-style", "overlay")
|
||||||
|
.attr("data-loading-text", "SETTING UP YOUR ENVIRONMENT . . .");
|
||||||
|
$('[data-toggle="loading"]').loading('show');
|
||||||
|
</script>
|
||||||
|
{{js "/js/script.js"}}
|
||||||
|
{{/zone}}
|
||||||
|
|
||||||
|
{{#zone "topCss"}}
|
||||||
|
<style>
|
||||||
|
.loading[data-loading-style=overlay] .loading-bg{
|
||||||
|
background: #11375B;
|
||||||
|
opacity: 1;
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
.loading .loading-animation{
|
||||||
|
width : 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{{/zone}}
|
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||||
|
* Version 2.0 (the "License"); you may not use this file except
|
||||||
|
* in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function onRequest(context) {
|
||||||
|
var constants = require("/app/modules/constants.js");
|
||||||
|
var skipWelcomeScreen = session.get(constants.SKIP_WELCOME_SCREEN);
|
||||||
|
if (skipWelcomeScreen) {
|
||||||
|
response.sendRedirect(context.app.context + "/");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"uri": "/welcome",
|
||||||
|
"layout": "cdmf.layout.loading"
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
var pollingCount = 24;
|
||||||
|
function poll() {
|
||||||
|
$.ajax({
|
||||||
|
url: context + "/api/user/environment-loaded",
|
||||||
|
type: "GET",
|
||||||
|
success: function (data) {
|
||||||
|
if (data.isLoaded) {
|
||||||
|
window.location = context + "/";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
complete: setTimeout(function () {
|
||||||
|
pollingCount = pollingCount - 1;
|
||||||
|
if (pollingCount > 0) {
|
||||||
|
poll();
|
||||||
|
} else {
|
||||||
|
$(".loading-animation .logo").hide();
|
||||||
|
$(".loading-animation").prepend(
|
||||||
|
'<i class="fw fw-error fw-inverse fw-2x" style="float: left;"></i>');
|
||||||
|
$(".loading-animation p").css("width", "150%")
|
||||||
|
.html("Ops... it seems something went wrong.<br/> Refresh the page to retry!");
|
||||||
|
}
|
||||||
|
}, 5000),
|
||||||
|
timeout: 5000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
poll();
|
||||||
|
});
|
Loading…
Reference in new issue