<!doctype html>
<html lang="en" data-ng-app="keycloak">

<head>
    <meta charset="utf-8">
    <title>Keycloak</title>

    <link rel="icon" href="/auth-server/admin-ui/img/favicon.ico">

    <!-- Frameworks -->
    <link rel="stylesheet" href="/auth-server/admin-ui/css/reset.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/bootstrap-3.0.0-wip/css/bootstrap.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/css/sprites.css">
    <link rel="stylesheet" href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic'>

    <!-- RCUE styles -->
    <link rel="stylesheet" href="/auth-server/admin-ui/css/base.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/css/forms.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/css/header.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/css/tabs.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/css/icons.css">
    <link rel="stylesheet" href="/auth-server/admin-ui/css/tables.css">

    <!-- Page styles -->
    <link rel="stylesheet" href="/auth-server/admin-ui/css/admin-console.css">
    <link href="lib/select2-3.4.1/select2.css" rel="stylesheet">

    <script src="lib/jquery/jquery-1.10.2.js" type="text/javascript"></script>
    <script src="lib/select2-3.4.1/select2.js" type="text/javascript"></script>

    <script src="lib/angular/angular.js"></script>
    <script src="lib/angular/angular-resource.js"></script>
    <script src="lib/angular/ui-bootstrap-tpls-0.4.0.js"></script>

    <script src="lib/jquery/jquery.idletimer.js" type="text/javascript"></script>
    <script src="lib/jquery/jquery.idletimeout.js" type="text/javascript"></script>
    <script src="lib/angular/select2.js" type="text/javascript"></script>
    <!--
    <script src="/auth-server/admin-ui/bootstrap-3.0.0-wip/js/dropdown.js"></script>
    <script src="/auth-server/admin-ui/bootstrap-3.0.0-wip/js/tooltip.js"></script>
    <script src="/auth-server/admin-ui/js/bootstrap-tokenfield.js"></script>
    -->
    <script src="js/app.js"></script>
    <script src="js/controllers/realm.js"></script>
    <script src="js/controllers/applications.js"></script>
    <script src="js/controllers/users.js"></script>
    <script src="js/loaders.js"></script>
    <script src="js/services.js"></script>


</head>

<body class="admin-console" data-ng-controller="GlobalCtrl" ng-cloak>
<div id="idletimeout">
    You will be logged off in <strong><span></span> seconds</strong> due to inactivity.
    <a id="idletimeout-resume" href="#">Click here to continue using this web page</a>.
</div>


<div class="feedback-aligner" data-ng-show="notification" data-ng-click="notification = null">
    <div class="alert alert-{{notification.type}}"><strong>{{notification.header}}</strong> {{notification.message}}</div>
</div>

<div id="wrap">
    <div data-ng-include data-src="'partials/menu.html'"></div>

    <div data-ng-view id="view" data-ng-hide="httpProviderError"></div>

    <div id="httpProviderError" data-ng-show="httpProviderError">
        <button class="btn btn-danger" data-ng-click="httpProviderError=null">
            <strong>Error</strong> {{httpProviderError}}
        </button>
    </div>

    <div id="loading" class="loading-backdrop">
        <div class="loading">
            <span>Loading...</span>
        </div>
    </div>
</div>

<script type="text/javascript">
    $.idleTimeout('#idletimeout', '#idletimeout a', {
        idleAfter: 300,
        pollingInterval: 60,
        keepAliveURL: '/auth-server/rest/saas/keepalive',
        serverResponseEquals: '',
        failedRequests: 1,
        onTimeout: function(){
            $(this).slideUp();
            window.location = "/auth-server/rest/saas/logout";
        },
        onIdle: function(){
            $(this).slideDown(); // show the warning bar
        },
        onCountdown: function( counter ){
            $(this).find("span").html( counter ); // update the counter
        },
        onResume: function(){
            $(this).slideUp(); // hide the warning bar
        }
    });
</script>

</body>
</html>
