summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Spitzer2014-08-22 10:49:54 +0200
committerTobias Spitzer2014-08-22 10:49:54 +0200
commitdb905017be83af3a37ab942022b52619675e5203 (patch)
treeccf1d8fb2af829439eeee1914a1423412db433b0
parentLabel geändert (diff)
parentMerge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff)
downloadtutor-module-db905017be83af3a37ab942022b52619675e5203.tar.gz
tutor-module-db905017be83af3a37ab942022b52619675e5203.tar.xz
tutor-module-db905017be83af3a37ab942022b52619675e5203.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tutor-module
-rw-r--r--Dozentenmodul/bin/gui/intro/Login_GUI.classbin10581 -> 10532 bytes
-rw-r--r--Dozentenmodul/bin/thrift/MasterThriftConnection.classbin2125 -> 1652 bytes
-rw-r--r--Dozentenmodul/src/gui/intro/Login_GUI.java40
-rw-r--r--Dozentenmodul/src/thrift/MasterThriftConnection.java3
4 files changed, 25 insertions, 18 deletions
diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class
index 31b8abb9..89ef700e 100644
--- a/Dozentenmodul/bin/gui/intro/Login_GUI.class
+++ b/Dozentenmodul/bin/gui/intro/Login_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/thrift/MasterThriftConnection.class b/Dozentenmodul/bin/thrift/MasterThriftConnection.class
index 8229138f..6100b1bf 100644
--- a/Dozentenmodul/bin/thrift/MasterThriftConnection.class
+++ b/Dozentenmodul/bin/thrift/MasterThriftConnection.class
Binary files differ
diff --git a/Dozentenmodul/src/gui/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java
index a26b80c9..e0458cae 100644
--- a/Dozentenmodul/src/gui/intro/Login_GUI.java
+++ b/Dozentenmodul/src/gui/intro/Login_GUI.java
@@ -104,9 +104,6 @@ public class Login_GUI extends JFrame {
| IllegalAccessException | UnsupportedLookAndFeelException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- JOptionPane.showMessageDialog(null,
- e.getCause() + "\n" + e.getStackTrace(), "Debug-Message",
- JOptionPane.ERROR_MESSAGE);
}
// Titel des Fensters setzen
setTitle("bwLehrpool Suite");
@@ -219,7 +216,7 @@ public class Login_GUI extends JFrame {
lblConnectionInfo.setHorizontalAlignment(SwingConstants.LEFT);
- lblConnectionInfo.setBounds(292, 290, 237, 20);
+ lblConnectionInfo.setBounds(111, 290, 418, 20);
contentPane.add(lblConnectionInfo);
@@ -242,21 +239,39 @@ public class Login_GUI extends JFrame {
// check if client has received a connection with information or a
// null package
if (checkClientPackage() == true) {
- // package has information
+
+ // package has information
+ //User-Info
System.out.println("Authentifiziere - warte auf Masterserver");
+ lblConnectionInfo.setForeground(Color.black);
+ lblConnectionInfo.setText("Authentifiziere - warte auf Antwort von Server...");
result = client.authenticate(lblusername.getText(), passText);
+
+ //User-Info
System.out.println("Authentifizierung erfolgreich");
+ lblConnectionInfo.setForeground(Color.green);
+ lblConnectionInfo.setText("Authentifizierung erfolgreich");
+
+ //set Information
SessionData.session.setAuthToken(result.authToken);
SessionData.session.setSessionID(result.sessionId);
SessionData.session.setServerAdress(result.serverAddress);
+
+ //User-Info
+ lblConnectionInfo.setForeground(Color.black);
+ lblConnectionInfo.setText("Hole Verbindungsdaten von Server...");
System.out.println("warte auf Masterserver");
// set connection to bwLehrpoolSuiteServer
ThriftConnection bwthrift = new ThriftConnection();
server.Server.Client bwClient = bwthrift.getThriftConnection();
models.Client.clientcon.setClient(bwClient);
+
+ //User-Info
System.out.println("Client macht weiter");
System.out.println("Session-ID: " + result.sessionId
+ "\nToken: " + result.authToken);
+ lblConnectionInfo.setForeground(Color.green);
+ lblConnectionInfo.setText("Daten erhalten.");
if (login == true) {
//Daten speichern
@@ -325,9 +340,7 @@ public class Login_GUI extends JFrame {
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- JOptionPane.showMessageDialog(null, e.getCause() + "\n"
- + e.getStackTrace(), "Debug-Message",
- JOptionPane.ERROR_MESSAGE);
+
}
} else {
@@ -345,6 +358,9 @@ public class Login_GUI extends JFrame {
}
} catch (thrift.AuthenticationException e) {
+ lblConnectionInfo.setForeground(Color.red);
+ lblConnectionInfo
+ .setText("Fehler: Falscher Benutzername oder Passwort.");
System.out
.println("Authentifizierung fehlgeschlagen: " + e.message);
JOptionPane
@@ -354,17 +370,11 @@ public class Login_GUI extends JFrame {
"Anmeldung fehlgeschlagen",
JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
- //JOptionPane.showMessageDialog(null,
- // e.getCause() + "\n" + e.getStackTrace(), "Message",
- // JOptionPane.ERROR_MESSAGE);
return;
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
- JOptionPane.showMessageDialog(null,
- e.getCause() + "\n" + e.getStackTrace(), "Debug-Message",
- JOptionPane.ERROR_MESSAGE);
- return;
+
}
}// end performLogin
diff --git a/Dozentenmodul/src/thrift/MasterThriftConnection.java b/Dozentenmodul/src/thrift/MasterThriftConnection.java
index 11a27368..53132ef5 100644
--- a/Dozentenmodul/src/thrift/MasterThriftConnection.java
+++ b/Dozentenmodul/src/thrift/MasterThriftConnection.java
@@ -26,9 +26,6 @@ public class MasterThriftConnection {
transport.open();
} catch (TTransportException e) {
System.out.println("Keine Verbindung m\u00f6glich!");
- JOptionPane.showMessageDialog(null,
- e.getCause()+"\n"+e.getMessage(),
- "Debug-Message", JOptionPane.ERROR_MESSAGE);
return null;
}