Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html')
-rw-r--r--org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html165
1 files changed, 90 insertions, 75 deletions
diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html
index dab55b8d..3f107783 100644
--- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html
+++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html
@@ -1,75 +1,90 @@
-<!--
-/*******************************************************************************
- * Copyright (c) 2014, 2016 Orange.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
- -->
-<!doctype html>
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Smart Home | login</title>
- <link rel="stylesheet" href="css/style.css">
- <link rel="icon" type="image/png" href="../webapps/images/favicon.ico" />
- <script>
- var params = {};
- if (location.search) {
- var parts = location.search.substring(1).split('&');
- for (var i = 0; i < parts.length; i++) {
- var nv = parts[i].split('=');
- if (!nv[0]) continue;
- params[nv[0]] = nv[1] || true;
- }
- }
-
- var message = params.message;
- function loginCenter() {
- var bodyHeight = (document.getElementById('page-wrap').clientHeight - 273)/2;
- console.log(bodyHeight)
- document.getElementById("loginArea").style.top = bodyHeight +"px";
- if (message)
- document.getElementById("error").style.display ="inline";
- console.log("name: " + params.name);
- if (params.name != null)
- document.getElementById("thename").value = params.name;
- if (params.password != null)
- document.getElementById("thepassword").value = params.password;
- }
-
- function updateFormAction(form) {
- form.action = form.action + "?sessionId=" + Date.now();
- }
- </script>
- </head>
-
- <body onLoad="loginCenter()" onResize="loginCenter()">
- <!-- login screen -->
- <div class="page-wrap" id="page-wrap">
- <div class="login-strip clearfix" id="loginArea">
- <div class="loginBox">
- <form method="POST" action="../security/login" id="loginForm" name="loginForm"
- onsubmit="updateFormAction(this)">
- <figure>
- <img src="images/logo.png">
- <figcaption>Home Monitoring Application</figcaption>
- </figure>
- <div id="error" style="color:red;display:none;">Invalid user name or password.</div>
- <label>
- User name
- <input type="text" name="name" id="thename">
- </label>
- <label>
- Password
- <input type="password" name="password" id="thepassword">
- </label>
- <input type="submit" value="login">
- <form/>
- </div>
- </div>
- </div>
- </body>
-</html>
+<!--
+/*******************************************************************************
+ * Copyright (c) 2014, 2016 Orange.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+ -->
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Smart Home | login</title>
+ <link rel="stylesheet" href="css/style.css">
+ <link rel="icon" type="image/png" href="../webapps/images/favicon.ico" />
+ <script src="../webapps/js/jquery.js"></script>
+ <script>
+ var params = {};
+ if (location.search) {
+ var parts = location.search.substring(1).split('&');
+ for (var i = 0; i < parts.length; i++) {
+ var nv = parts[i].split('=');
+ if (!nv[0]) continue;
+ params[nv[0]] = nv[1] || true;
+ }
+ }
+
+ var message = params.message;
+ function loginCenter() {
+ var bodyHeight = (document.getElementById('page-wrap').clientHeight - 273)/2;
+ console.log(bodyHeight)
+ document.getElementById("loginArea").style.top = bodyHeight +"px";
+ if (message)
+ document.getElementById("error").style.display ="inline";
+ console.log("name: " + params.name);
+ if (params.name != null)
+ document.getElementById("thename").value = params.name;
+ if (params.password != null)
+ document.getElementById("thepassword").value = params.password;
+ }
+
+ function updateFormAction(form) {
+ form.action = form.action + "?sessionId=" + Date.now();
+ }
+
+ function loadAuthenticationProviders() {
+ $.get("/Home_Monitoring_Application/authentication_servlet",
+ function(data, textStatus, jqXHR) {
+ $.each(data, function(index, d) {
+ var toBeAdded = "<div><a href=\"" + d.authenticationPage + "\">log with "
+ + d.serviceName + "</a></div>";
+ $("#providers").append(toBeAdded);
+ });
+ });
+ }
+ </script>
+ </head>
+
+ <body onLoad="loginCenter(); loadAuthenticationProviders();" onResize="loginCenter()">
+ <!-- login screen -->
+ <div class="page-wrap" id="page-wrap">
+ <div class="login-strip clearfix" id="loginArea">
+ <div class="loginBox">
+ <form method="POST" action="../security/login" id="loginForm" name="loginForm"
+ onsubmit="updateFormAction(this)">
+ <figure>
+ <img src="images/logo.png">
+ <figcaption>Home Monitoring Application</figcaption>
+ </figure>
+ <div id="error" style="color:red;display:none;">Invalid user name or password.</div>
+ <label>
+ User name
+ <input type="text" name="name" id="thename">
+ </label>
+ <label>
+ Password
+ <input type="password" name="password" id="thepassword">
+ </label>
+ <input type="submit" value="login">
+ <form/>
+
+ </div>
+ <div id="providers">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>

Back to the top