summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul
diff options
context:
space:
mode:
authorunknown2014-05-08 13:59:31 +0200
committerunknown2014-05-08 13:59:31 +0200
commitea2bbcbaa29508d11404a31b2c17380edc38f80a (patch)
tree275929ef8da853da76e62ad1780ef233aadf0120 /Dozentenmodul
parentFAQ & OTRS (diff)
parent-Kopieren von Temp zu Prod inkl. änderung des Pfades in SQL-DB (diff)
downloadtutor-module-ea2bbcbaa29508d11404a31b2c17380edc38f80a.tar.gz
tutor-module-ea2bbcbaa29508d11404a31b2c17380edc38f80a.tar.xz
tutor-module-ea2bbcbaa29508d11404a31b2c17380edc38f80a.zip
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts: Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class
Diffstat (limited to 'Dozentenmodul')
-rw-r--r--Dozentenmodul/bin/Models/Image.classbin1979 -> 2387 bytes
-rw-r--r--Dozentenmodul/bin/ftp/FTPUtility.classbin5521 -> 4632 bytes
-rw-r--r--Dozentenmodul/bin/ftp/UploadTask.classbin3378 -> 3474 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.classbin2040 -> 2125 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.classbin2125 -> 1014 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.classbin1014 -> 1348 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.classbin13234 -> 13159 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.classbin782 -> 782 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.classbin1301 -> 1301 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.classbin1434 -> 1434 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.classbin1186 -> 1186 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.classbin799 -> 799 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.classbin1836 -> 2114 bytes
-rw-r--r--Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.classbin12750 -> 12774 bytes
-rw-r--r--Dozentenmodul/bin/gui/intro/Login_GUI$1.classbin1190 -> 1190 bytes
-rw-r--r--Dozentenmodul/bin/gui/intro/Login_GUI$2.classbin665 -> 665 bytes
-rw-r--r--Dozentenmodul/bin/gui/intro/Login_GUI$4.classbin677 -> 677 bytes
-rw-r--r--Dozentenmodul/bin/gui/intro/Login_GUI.classbin10551 -> 9658 bytes
-rw-r--r--Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.classbin1892 -> 1892 bytes
-rw-r--r--Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.classbin1951 -> 1951 bytes
-rw-r--r--Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.classbin10157 -> 10195 bytes
-rw-r--r--Dozentenmodul/bin/models/Image.classbin1979 -> 2387 bytes
-rw-r--r--Dozentenmodul/src/Models/Image.java16
-rw-r--r--Dozentenmodul/src/ftp/FTPUtility.java40
-rw-r--r--Dozentenmodul/src/ftp/UploadTask.java3
-rw-r--r--Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java2
-rw-r--r--Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java29
-rw-r--r--Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java29
-rw-r--r--Dozentenmodul/src/gui/intro/Login_GUI.java7
-rw-r--r--Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java2
-rw-r--r--Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java21
-rw-r--r--Dozentenmodul/src/models/Image.java16
32 files changed, 74 insertions, 91 deletions
diff --git a/Dozentenmodul/bin/Models/Image.class b/Dozentenmodul/bin/Models/Image.class
index 4c70ef81..59b34fab 100644
--- a/Dozentenmodul/bin/Models/Image.class
+++ b/Dozentenmodul/bin/Models/Image.class
Binary files differ
diff --git a/Dozentenmodul/bin/ftp/FTPUtility.class b/Dozentenmodul/bin/ftp/FTPUtility.class
index 8484d422..95655233 100644
--- a/Dozentenmodul/bin/ftp/FTPUtility.class
+++ b/Dozentenmodul/bin/ftp/FTPUtility.class
Binary files differ
diff --git a/Dozentenmodul/bin/ftp/UploadTask.class b/Dozentenmodul/bin/ftp/UploadTask.class
index 32bd6720..2b62ba67 100644
--- a/Dozentenmodul/bin/ftp/UploadTask.class
+++ b/Dozentenmodul/bin/ftp/UploadTask.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class
index 9f6747a9..e20cfac9 100644
--- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class
+++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class
index e013392a..c9ed851b 100644
--- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class
+++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class
index 3b3ec0ee..faac5bc5 100644
--- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class
+++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class
index 7ec6679a..505a0886 100644
--- a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class
+++ b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class
index 56759209..1c355932 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class
index 19ad69d7..8fa15b3e 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class
index 74aaef08..77e1a9bf 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class
index 23321e4e..a319bbbd 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class
index aa1b5a70..64d6d21e 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class
index 3ee3ca66..dc94e716 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class
index c3611ea8..6311839a 100644
--- a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class
+++ b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class
index 780e5fd1..0f948630 100644
--- a/Dozentenmodul/bin/gui/intro/Login_GUI$1.class
+++ b/Dozentenmodul/bin/gui/intro/Login_GUI$1.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class
index 6ecad17e..37d3827f 100644
--- a/Dozentenmodul/bin/gui/intro/Login_GUI$2.class
+++ b/Dozentenmodul/bin/gui/intro/Login_GUI$2.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class
index 6ff76a07..50bac1aa 100644
--- a/Dozentenmodul/bin/gui/intro/Login_GUI$4.class
+++ b/Dozentenmodul/bin/gui/intro/Login_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/intro/Login_GUI.class b/Dozentenmodul/bin/gui/intro/Login_GUI.class
index 73bacfd2..d25020ec 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/gui/lecture/EditLectureAllgemein_GUI$3.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class
index a43a2ad6..59b84bd3 100644
--- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class
+++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$3.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class
index e2bcac46..ddd0274d 100644
--- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class
+++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class
Binary files differ
diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class
index f5f80af3..e8fd3516 100644
--- a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class
+++ b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class
Binary files differ
diff --git a/Dozentenmodul/bin/models/Image.class b/Dozentenmodul/bin/models/Image.class
index 4c70ef81..59b34fab 100644
--- a/Dozentenmodul/bin/models/Image.class
+++ b/Dozentenmodul/bin/models/Image.class
Binary files differ
diff --git a/Dozentenmodul/src/Models/Image.java b/Dozentenmodul/src/Models/Image.java
index cdc8264c..0b3c936e 100644
--- a/Dozentenmodul/src/Models/Image.java
+++ b/Dozentenmodul/src/Models/Image.java
@@ -6,13 +6,22 @@ public class Image {
private String imagename;
private String newName;
+ private String imagepath;
private boolean licensed;
private boolean internet;
private int ram;
private int cpu;
+ private long filesize;
public static Image image =new Image();
+
+ public String getImagepath() {
+ return imagepath;
+ }
+ public void setImagepath(String imagepath) {
+ this.imagepath = imagepath;
+ }
public String getImagename() {
return imagename;
}
@@ -61,4 +70,11 @@ public class Image {
public void setVersion(String version) {
this.version = version;
}
+ public long getFilesize() {
+ return filesize;
+ }
+ public void setFilesize(long filesize) {
+ this.filesize = filesize;
+ }
+
}
diff --git a/Dozentenmodul/src/ftp/FTPUtility.java b/Dozentenmodul/src/ftp/FTPUtility.java
index b4543349..f2c51dfc 100644
--- a/Dozentenmodul/src/ftp/FTPUtility.java
+++ b/Dozentenmodul/src/ftp/FTPUtility.java
@@ -196,44 +196,6 @@ public class FTPUtility {
return outputStream;
}
- public String[] getAllRohling(String SearchString) throws SocketException
- {
- //FTPClient ftp=new FTPClient();
-
- String[] filenamelist;
-
-
- try {
-
-
- ftpClient.changeWorkingDirectory("/home/openslx/images");
- filenamelist=ftpClient.listNames();
-
- String[] search=new String[filenamelist.length];
- for(int i=0;i<filenamelist.length;i++)
- {
- /*if(filenamelist[i].startsWith(SearchString)==true)
- {
- search[i]=filenamelist[i];
- }*/
-
- if(filenamelist[i].contains(SearchString)==true)
- {
- search[i]=filenamelist[i];
- }
- }
- return search;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- JOptionPane.showMessageDialog(null,
- e.getCause()+"\n"+e.getMessage(),
- "Debug-Message", JOptionPane.ERROR_MESSAGE);
- }
-
-
-
- return null;
- }
+
} \ No newline at end of file
diff --git a/Dozentenmodul/src/ftp/UploadTask.java b/Dozentenmodul/src/ftp/UploadTask.java
index 788acad6..2dbeff8d 100644
--- a/Dozentenmodul/src/ftp/UploadTask.java
+++ b/Dozentenmodul/src/ftp/UploadTask.java
@@ -5,6 +5,8 @@ import java.io.FileInputStream;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
+
+import models.Image;
/**
* Executes the file upload in a background thread and updates progress to
@@ -50,6 +52,7 @@ public class UploadTask extends SwingWorker<Void, Void> {
long totalBytesRead = 0;
int percentCompleted = 0;
long fileSize = uploadFile.length();
+ Image.image.setFilesize(fileSize);
long start=System.nanoTime();
final double NANOS_PER_SECOND = 1000000000.0;
final double BYTES_PER_MIB = 1024*1024;
diff --git a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java
index 8e928105..6725850b 100644
--- a/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java
+++ b/Dozentenmodul/src/gui/image/EditImageAllgemein_GUI.java
@@ -285,7 +285,7 @@ public class EditImageAllgemein_GUI extends JFrame {
} else {
// setze Namen, egal ob alt oder nicht
- Image.image.setNewName(imagename.getText());
+ Image.image.setImagename(imagename.getText());
System.out.println("Changing name to:" + imagename.getText()+ "\nNewName is: "+Image.image.getNewName());
con.closeThriftConnection();
diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
index 13c83d61..3a78e322 100644
--- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
+++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
@@ -300,26 +300,6 @@ public class FTPCreateUploader_GUI extends JFrame implements
separator_1.setBounds(0, 627, 597, 2);
contentPanel.add(separator_1);
- JButton btnCopyFileTo = new JButton("Copy File to Prod");
- btnCopyFileTo.setEnabled(false);
- btnCopyFileTo.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try {
- System.out.println("Copying file to " + user.path + "/"
- + uploadFile.getName());
- client.startFileCopy(user.path + "/" + uploadFile.getName());
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- JOptionPane.showMessageDialog(null,
- e1.getCause()+"\n"+e1.getMessage(),
- "Debug-Message", JOptionPane.ERROR_MESSAGE);
- }
- }
- });
- btnCopyFileTo.setBounds(102, 375, 173, 23);
- contentPanel.add(btnCopyFileTo);
-
JLabel lblSchritt_1 = new JLabel("Schritt 1:");
lblSchritt_1.setBounds(24, 128, 57, 14);
contentPanel.add(lblSchritt_1);
@@ -447,7 +427,7 @@ public class FTPCreateUploader_GUI extends JFrame implements
+ person.verantwortlicher.getUsername() + "_"
+ Image.image.getImagename() + ".vmdk");
task = new UploadTask(host, port, user.userName, user.password,
- user.path, uploadFile);
+ user.path+"temp/", uploadFile);
task.addPropertyChangeListener(this);
task.execute();
@@ -473,8 +453,10 @@ public class FTPCreateUploader_GUI extends JFrame implements
// Fertigstellen erlauben wenn upload abgeschlossen
if (progress == 100) {
finishButton.setEnabled(true);
+
} else {
finishButton.setEnabled(false);
+
}
}
@@ -520,7 +502,7 @@ public class FTPCreateUploader_GUI extends JFrame implements
public boolean writeData() {
try {
-
+
client.writeVLdata(Image.image.getImagename(),
person.verantwortlicher.getUsername(),
person.verantwortlicher.getVorname(),
@@ -531,7 +513,8 @@ public class FTPCreateUploader_GUI extends JFrame implements
person.verantwortlicher.getFakultät(),
Image.image.isLicensed(), Image.image.isInternet(),
Image.image.getRam(), Image.image.getCpu(),
- "/srv/openslx/nfs/temp/" + Image.image.getNewName());
+ "temp/" + Image.image.getNewName(),false,Image.image.getFilesize());
+ client.startFileCopy(Image.image.getNewName());
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java
index 8b14dc4c..68bd4bb1 100644
--- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java
+++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java
@@ -76,7 +76,6 @@ public class FTPEditUploader_GUI extends JFrame implements
Client client = thrift.getThriftConnection();
JButton btnUploadStarten = new JButton("Upload auf Server starten");
JButton btnSpeicherortAuswhlen = new JButton("Image ausw\u00E4hlen");
- JButton btnCopyFileTo = new JButton("Copy File to Prod");
JButton finishButton = new JButton("Fertigstellen");
JButton btnZurck = new JButton("Zur\u00FCck");
@@ -290,23 +289,6 @@ public class FTPEditUploader_GUI extends JFrame implements
separator_1.setBounds(0, 627, 597, 2);
contentPanel.add(separator_1);
- btnCopyFileTo.setEnabled(false);
- btnCopyFileTo.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try {
- client.startFileCopy(user.path + "/" + uploadFile.getName());
- } catch (TException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- JOptionPane.showMessageDialog(null,
- e1.getCause()+"\n"+e1.getMessage(),
- "Debug-Message", JOptionPane.ERROR_MESSAGE);
- }
- }
- });
- btnCopyFileTo.setBounds(102, 375, 173, 23);
- contentPanel.add(btnCopyFileTo);
-
JLabel lblSchritt_1 = new JLabel("Schritt 1:");
lblSchritt_1.setBounds(24, 128, 57, 14);
contentPanel.add(lblSchritt_1);
@@ -437,12 +419,13 @@ public class FTPEditUploader_GUI extends JFrame implements
"Debug-Message", JOptionPane.ERROR_MESSAGE);
}
DateFormat formatter = new SimpleDateFormat("yyyMMddhhmmss");
+
Image.image.setNewName(formatter.format(new Date()) + "_"
+ person.verantwortlicher.getHochschule() + "_"
+ person.verantwortlicher.getUsername() + "_"
- + Image.image.getImagename() + ".vmdk");
+ + Image.image.getImagename()+ ".vmdk");
task = new UploadTask(host, port, user.userName, user.password,
- user.path, uploadFile);
+ user.path+"temp/", uploadFile);
task.addPropertyChangeListener(this);
task.execute();
@@ -514,11 +497,13 @@ public class FTPEditUploader_GUI extends JFrame implements
try {
System.out.println("NewName="+Image.image.getNewName());
+ System.out.println("OldName="+Image.image.getImagename());
client.updateImageData(Image.image.getImagename(),
- Image.image.getNewName(), Image.image.isLicensed(),
+ Image.image.getImagename(),"temp/" + Image.image.getNewName(), Image.image.isLicensed(),
Image.image.isInternet(), Image.image.getRam(),
Image.image.getCpu(), Image.image.getImageId(),
- Image.image.getVersion());
+ Image.image.getVersion(), false,Image.image.getFilesize());
+ client.startFileCopy(Image.image.getNewName());
} catch (TException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/Dozentenmodul/src/gui/intro/Login_GUI.java b/Dozentenmodul/src/gui/intro/Login_GUI.java
index 019a2ec7..75320b58 100644
--- a/Dozentenmodul/src/gui/intro/Login_GUI.java
+++ b/Dozentenmodul/src/gui/intro/Login_GUI.java
@@ -12,6 +12,8 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.IOException;
+import java.util.UUID;
+
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
@@ -89,6 +91,7 @@ public class Login_GUI extends JFrame {
// Fenster darf nicht vergrößert werden
setResizable(false);
+
try {
// Setzt das Look and Feel auf System
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
@@ -213,12 +216,14 @@ public class Login_GUI extends JFrame {
+ ", mein Token für den Satelliten "
+ result.authToken);
+ /*
// show received information
JOptionPane.showMessageDialog(null, "Freiburg liefert:"
+ "\nSession-ID = " + result.sessionId + "\nToken = "
+ result.authToken + "\nSatellit = "
+ result.serverAddress, "Rückgabewerte aus Freiburg",
JOptionPane.INFORMATION_MESSAGE);
+ */
if (login == true) {
/*
@@ -248,6 +253,7 @@ public class Login_GUI extends JFrame {
person.verantwortlicher.setEMail(user.eMail);
person.verantwortlicher.setHochschule(hochschule);
+ /*
// show processed information
JOptionPane
.showMessageDialog(
@@ -289,6 +295,7 @@ public class Login_GUI extends JFrame {
.getEMail(),
"Werte vergleichen",
JOptionPane.INFORMATION_MESSAGE);
+ */
try {
//Lege config File an und entscheide welches Fenster als nächstes geöffnet wird
diff --git a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java
index 0be23ee0..cab588d9 100644
--- a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java
+++ b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java
@@ -245,6 +245,7 @@ public class EditLectureAllgemein_GUI extends JFrame {
panel_2.add(textFieldLaborname);
JTextArea textArea = new JTextArea();
+ textArea.setEditable(false);
textArea.setWrapStyleWord(true);
textArea.setText("Geben Sie bitte einen sprechenden Namen f\u00FCr das Image an. Dieser soll jedoch recht allgemein gehalten werden.\r\nBeispiel: \"Programmieren\", nicht \"Programmieren 1\"");
textArea.setLineWrap(true);
@@ -261,6 +262,7 @@ public class EditLectureAllgemein_GUI extends JFrame {
scrollPane.setBounds(200, 104, 347, 78);
panel_2.add(scrollPane);
description = new JTextArea();
+ description.setFont(new Font("Tahoma", Font.PLAIN, 11));
description.setText(Lecture.lecture.getDesc());
description.setLineWrap(true);
scrollPane.add(description);
diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java
index 28447e0d..bd69a2ac 100644
--- a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java
+++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java
@@ -118,8 +118,7 @@ public class EditLectureLink_GUI extends JFrame {
getContentPane().add(panel);
panel.setLayout(null);
{
- JLabel lblNewLabel = new JLabel(
- "Image verlinken");
+ JLabel lblNewLabel = new JLabel("Image verlinken");
lblNewLabel.setBounds(10, 11, 509, 22);
panel.add(lblNewLabel);
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
@@ -374,9 +373,11 @@ public class EditLectureLink_GUI extends JFrame {
.toString();
try {
-
- DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
- client.updateLecturedata(Lecture.lecture.getName(),
+
+ DateFormat formatter = new SimpleDateFormat(
+ "yyyy-MM-dd hh:mm:ss");
+ client.updateLecturedata(
+ Lecture.lecture.getName(),
Lecture.lecture.getNewName(),
Lecture.lecture.getShortDesc(),
Lecture.lecture.getDesc(),
@@ -395,7 +396,14 @@ public class EditLectureLink_GUI extends JFrame {
person.verantwortlicher.getTel(),
person.verantwortlicher.getFakultät(),
Lecture.lecture.getid());
-
+
+ JOptionPane
+ .showMessageDialog(
+ null,
+ "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.",
+ "Veranstaltung angelegt",
+ JOptionPane.INFORMATION_MESSAGE);
+
} catch (TException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
@@ -409,6 +417,7 @@ public class EditLectureLink_GUI extends JFrame {
JOptionPane.INFORMATION_MESSAGE);
}
+ thrift.closeThriftConnection();
MainMenue_GUI m = new MainMenue_GUI();
m.setVisible(true);
dispose();
diff --git a/Dozentenmodul/src/models/Image.java b/Dozentenmodul/src/models/Image.java
index cdc8264c..0b3c936e 100644
--- a/Dozentenmodul/src/models/Image.java
+++ b/Dozentenmodul/src/models/Image.java
@@ -6,13 +6,22 @@ public class Image {
private String imagename;
private String newName;
+ private String imagepath;
private boolean licensed;
private boolean internet;
private int ram;
private int cpu;
+ private long filesize;
public static Image image =new Image();
+
+ public String getImagepath() {
+ return imagepath;
+ }
+ public void setImagepath(String imagepath) {
+ this.imagepath = imagepath;
+ }
public String getImagename() {
return imagename;
}
@@ -61,4 +70,11 @@ public class Image {
public void setVersion(String version) {
this.version = version;
}
+ public long getFilesize() {
+ return filesize;
+ }
+ public void setFilesize(long filesize) {
+ this.filesize = filesize;
+ }
+
}