You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cmda.apache.org by xi...@apache.org on 2015/09/05 02:20:16 UTC
[12/50] [abbrv] incubator-cmda git commit: Fix home page bugs
Fix home page bugs
Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/1afa2537
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/1afa2537
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/1afa2537
Branch: refs/heads/master
Commit: 1afa253748b1b9e7342782f492eae3a8b2445bd5
Parents: cabc2e6
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 16:48:17 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 16:48:17 2015 -0700
----------------------------------------------------------------------
app/controllers/Application.java | 25 +------------------------
conf/routes | 5 -----
2 files changed, 1 insertion(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/1afa2537/app/controllers/Application.java
----------------------------------------------------------------------
diff --git a/app/controllers/Application.java b/app/controllers/Application.java
index 6a10767..53686f5 100644
--- a/app/controllers/Application.java
+++ b/app/controllers/Application.java
@@ -30,7 +30,7 @@ public class Application extends Controller {
//final static Form<SensorType> sensorTypeForm = Form.form(SensorType.class);
public static Result index() {
- return ok(index.render());
+ return ok(index.render(""));
}
// -- Authentication
@@ -48,29 +48,6 @@ public class Application extends Controller {
}
}
-
- /** Login page. */
- public static Result login() {
- return ok( login.render(form(Login.class)) );
- }
-
- /** Handle login form submission. */
- public static Result authenticate() {
- Form<Login> loginForm = form(Login.class).bindFromRequest();
- if(loginForm.hasErrors())
- return badRequest(login.render(loginForm));
- else {
- session("email", loginForm.get().email);
- return redirect( routes.Application.index() );
- }
- }
-
- /** Logout and clean the session. */
- public static Result logout() {
- session().clear();
- flash("success", "You've been logged out");
- return redirect( routes.Application.index() );
- }
public static void flashMsg(JsonNode jsonNode){
Iterator<Entry<String, JsonNode>> it = jsonNode.fields();
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/1afa2537/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 0c7b33e..54ae3dc 100644
--- a/conf/routes
+++ b/conf/routes
@@ -20,11 +20,6 @@ POST /syncData controllers.Acc
GET /searchAndGenerateWorkflow controllers.AccountController.getSearchAndGenerateWorkflow()
GET /generateWorkflowGetData controllers.AccountController.getJsonData()
-# Authentication
-GET /login controllers.Application.login()
-POST /login controllers.Application.authenticate()
-GET /logout controllers.Application.logout()
-
# BugReporting
GET /bugs controllers.BugReportController.reports()
GET /newReport controllers.BugReportController.newReport()