summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java31
1 files changed, 6 insertions, 25 deletions
diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
index 5ebc5766..2b432c96 100644
--- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
+++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java
@@ -295,28 +295,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
- System.out.println("Failed to copy to: " + user.path + "/"
- + uploadFile.getName());
- 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);
@@ -416,7 +394,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();
@@ -442,8 +420,10 @@ public class FTPCreateUploader_GUI extends JFrame implements
// Fertigstellen erlauben wenn upload abgeschlossen
if (progress == 100) {
finishButton.setEnabled(true);
+
} else {
finishButton.setEnabled(false);
+
}
}
@@ -489,7 +469,7 @@ public class FTPCreateUploader_GUI extends JFrame implements
public boolean writeData() {
try {
-
+
client.writeVLdata(Image.image.getImagename(),
person.verantwortlicher.getUsername(),
person.verantwortlicher.getVorname(),
@@ -500,7 +480,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();