summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Spitzer2014-08-22 08:05:43 +0200
committerTobias Spitzer2014-08-22 08:05:43 +0200
commitb0d8aefbbfa3cf9d70112994d29f0bc12b97fbb0 (patch)
tree243d09c47b217d11bf96394c2c1df26e27ea7eec
parentDeleted dead code and show version number in server log file (diff)
downloadtutor-module-b0d8aefbbfa3cf9d70112994d29f0bc12b97fbb0.tar.gz
tutor-module-b0d8aefbbfa3cf9d70112994d29f0bc12b97fbb0.tar.xz
tutor-module-b0d8aefbbfa3cf9d70112994d29f0bc12b97fbb0.zip
z
-rw-r--r--Dozentenmodul/bin/gui/image/DeleteImage_GUI.classbin16148 -> 16894 bytes
-rw-r--r--Dozentenmodul/src/gui/image/DeleteImage_GUI.java78
-rw-r--r--Dozentenmodulserver/bin/sql/SQL.classbin25708 -> 25791 bytes
-rw-r--r--Dozentenmodulserver/src/sql/SQL.java4
4 files changed, 60 insertions, 22 deletions
diff --git a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class
index c49ec97a..14e17310 100644
--- a/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class
+++ b/Dozentenmodul/bin/gui/image/DeleteImage_GUI.class
Binary files differ
diff --git a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java
index d0bf9481..d732f295 100644
--- a/Dozentenmodul/src/gui/image/DeleteImage_GUI.java
+++ b/Dozentenmodul/src/gui/image/DeleteImage_GUI.java
@@ -63,6 +63,7 @@ import server.Server.Client;
import thrift.ThriftConnection;
import util.GuiOrganizer;
import util.OpenLinks;
+import javax.swing.JTextArea;
@SuppressWarnings("serial")
public class DeleteImage_GUI extends JFrame {
@@ -77,6 +78,9 @@ public class DeleteImage_GUI extends JFrame {
JLabel labelInternet;
JLabel labelRam;
JLabel labelCPU;
+ JLabel labelID;
+ JLabel labelVersion;
+ JTextArea textAreadesc;
private JLabel labelOS;
String[] result;
JRadioButton rdbtnInternetJa;
@@ -853,35 +857,35 @@ public class DeleteImage_GUI extends JFrame {
getContentPane().add(panel);
JLabel lblName = new JLabel("Name:");
- lblName.setBounds(10, 30, 130, 14);
+ lblName.setBounds(10, 73, 130, 14);
panel.add(lblName);
labelName = new JLabel("");
- labelName.setBounds(150, 30, 130, 14);
+ labelName.setBounds(150, 73, 130, 14);
panel.add(labelName);
JLabel lblVerantwortlicher = new JLabel("Verantwortlicher:");
- lblVerantwortlicher.setBounds(10, 105, 130, 14);
+ lblVerantwortlicher.setBounds(10, 224, 130, 14);
panel.add(lblVerantwortlicher);
labelOS = new JLabel("");
- labelOS.setBounds(150, 55, 130, 14);
+ labelOS.setBounds(150, 174, 130, 14);
panel.add(labelOS);
JLabel lblWeitereVerantwortliche = new JLabel("Betriebssystem:");
- lblWeitereVerantwortliche.setBounds(10, 55, 130, 14);
+ lblWeitereVerantwortliche.setBounds(10, 174, 130, 14);
panel.add(lblWeitereVerantwortliche);
labelVerantwortlicher = new JLabel("");
- labelVerantwortlicher.setBounds(150, 105, 130, 14);
+ labelVerantwortlicher.setBounds(150, 224, 130, 14);
panel.add(labelVerantwortlicher);
JLabel label = new JLabel("Weitere Verantwortliche:");
- label.setBounds(10, 130, 130, 14);
+ label.setBounds(10, 249, 130, 14);
panel.add(label);
labelWeitereVerantwortliche = new JLabel("");
- labelWeitereVerantwortliche.setBounds(150, 130, 130, 14);
+ labelWeitereVerantwortliche.setBounds(150, 249, 130, 14);
panel.add(labelWeitereVerantwortliche);
JLabel label_5 = new JLabel("");
@@ -889,57 +893,86 @@ public class DeleteImage_GUI extends JFrame {
panel.add(label_5);
labelUpdate = new JLabel("");
- labelUpdate.setBounds(150, 80, 130, 14);
+ labelUpdate.setBounds(150, 199, 130, 14);
panel.add(labelUpdate);
JLabel lblLetztesUpdate = new JLabel("Letztes Update:");
- lblLetztesUpdate.setBounds(10, 80, 130, 14);
+ lblLetztesUpdate.setBounds(10, 199, 130, 14);
panel.add(lblLetztesUpdate);
JLabel lblImageIstVorlage = new JLabel("Image ist Vorlage:");
- lblImageIstVorlage.setBounds(10, 259, 130, 14);
+ lblImageIstVorlage.setBounds(10, 331, 130, 14);
panel.add(lblImageIstVorlage);
labelVorlage = new JLabel("");
- labelVorlage.setBounds(150, 259, 130, 14);
+ labelVorlage.setBounds(150, 331, 130, 14);
panel.add(labelVorlage);
labelLizenzSoftware = new JLabel("");
- labelLizenzSoftware.setBounds(150, 284, 130, 14);
+ labelLizenzSoftware.setBounds(150, 356, 130, 14);
panel.add(labelLizenzSoftware);
JLabel lblLizenzpflichtigeSoftware = new JLabel("Lizenzpflichtige Software:");
- lblLizenzpflichtigeSoftware.setBounds(10, 284, 130, 14);
+ lblLizenzpflichtigeSoftware.setBounds(10, 356, 130, 14);
panel.add(lblLizenzpflichtigeSoftware);
JLabel lblInternet = new JLabel("Internet:");
- lblInternet.setBounds(10, 309, 130, 14);
+ lblInternet.setBounds(10, 381, 130, 14);
panel.add(lblInternet);
labelInternet = new JLabel("");
- labelInternet.setBounds(150, 309, 130, 14);
+ labelInternet.setBounds(150, 381, 130, 14);
panel.add(labelInternet);
JLabel lblEmpfehlungRam = new JLabel("Empfehlung RAM:");
- lblEmpfehlungRam.setBounds(10, 334, 130, 14);
+ lblEmpfehlungRam.setBounds(10, 406, 130, 14);
panel.add(lblEmpfehlungRam);
labelRam = new JLabel("");
- labelRam.setBounds(150, 334, 130, 14);
+ labelRam.setBounds(150, 406, 130, 14);
panel.add(labelRam);
JLabel lblEmpfehlungCpu = new JLabel("Empfehlung CPU:");
- lblEmpfehlungCpu.setBounds(10, 359, 130, 14);
+ lblEmpfehlungCpu.setBounds(10, 431, 130, 14);
panel.add(lblEmpfehlungCpu);
labelCPU = new JLabel("");
- labelCPU.setBounds(150, 359, 130, 14);
+ labelCPU.setBounds(150, 431, 130, 14);
panel.add(labelCPU);
JLabel lblTechnischeDaten = new JLabel("Technische Daten:");
- lblTechnischeDaten.setBounds(10, 223, 296, 14);
+ lblTechnischeDaten.setBounds(10, 295, 296, 14);
panel.add(lblTechnischeDaten);
+ JLabel lblId = new JLabel("ID:");
+ lblId.setBounds(10, 23, 130, 14);
+ panel.add(lblId);
+
+ labelID = new JLabel("");
+ labelID.setBounds(150, 23, 130, 14);
+ panel.add(labelID);
+
+ labelVersion = new JLabel("");
+ labelVersion.setBounds(150, 48, 130, 14);
+ panel.add(labelVersion);
+
+ JLabel lblVersion = new JLabel("Version:");
+ lblVersion.setBounds(10, 48, 130, 14);
+ panel.add(lblVersion);
+
+ JLabel lblBeschreibung = new JLabel("Beschreibung:");
+ lblBeschreibung.setBounds(10, 98, 130, 14);
+ panel.add(lblBeschreibung);
+
+ JScrollPane scrollPane = new JScrollPane();
+ scrollPane.setBounds(148, 98, 158, 65);
+ panel.add(scrollPane);
+
+ textAreadesc = new JTextArea();
+ textAreadesc.setLineWrap(true);
+ textAreadesc.setBackground(SystemColor.menu);
+ scrollPane.setViewportView(textAreadesc);
+
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
@@ -1075,6 +1108,9 @@ public class DeleteImage_GUI extends JFrame {
}
labelRam.setText(res.get("ram"));
labelCPU.setText(res.get("cpu"));
+ labelID.setText(res.get("id"));
+ labelVersion.setText("version");
+ textAreadesc.setText("desc");
} catch (TException | ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
diff --git a/Dozentenmodulserver/bin/sql/SQL.class b/Dozentenmodulserver/bin/sql/SQL.class
index 89adccb1..9b71d36e 100644
--- a/Dozentenmodulserver/bin/sql/SQL.class
+++ b/Dozentenmodulserver/bin/sql/SQL.class
Binary files differ
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java
index 36038e4a..f763eacd 100644
--- a/Dozentenmodulserver/src/sql/SQL.java
+++ b/Dozentenmodulserver/src/sql/SQL.java
@@ -491,7 +491,7 @@ public class SQL {
Connection con=getConnection();
Statement stm = con.createStatement();
ResultSet data=stm
- .executeQuery("SELECT i.image_name,i.image_description,i.image_update_time,i.cond_hasInternetRestriction,i.cond_hasLicenseRestriction, i.cond_minCPUs,i.cond_minRAM, i.image_syncMode,i.image_filesize,i.image_path, i.image_isTemplate,os.GuestOS, concat(u.Nachname,' ',u.Vorname) as Owner FROM bwLehrpool.m_VLData_imageInfo i,bwLehrpool.m_user u,bwLehrpool.m_operatingSystem os where i.image_owner=u.userID and i.content_operatingSystem=os.operatingSystemID and GUID_imageID = '" + id + "' and imageVersion = '" + version + "' ;");
+ .executeQuery("SELECT i.GUID_imageID, i.imageVersion, i.image_name,i.image_description,i.image_update_time,i.cond_hasInternetRestriction,i.cond_hasLicenseRestriction, i.cond_minCPUs,i.cond_minRAM, i.image_syncMode,i.image_filesize,i.image_path, i.image_isTemplate,os.GuestOS, concat(u.Nachname,' ',u.Vorname) as Owner FROM bwLehrpool.m_VLData_imageInfo i,bwLehrpool.m_user u,bwLehrpool.m_operatingSystem os where i.image_owner=u.userID and i.content_operatingSystem=os.operatingSystemID and GUID_imageID = '" + id + "' and imageVersion = '" + version + "' ;");
while (data.next()) {
map.put("name", data.getString("image_name"));
map.put("internet",
@@ -507,6 +507,8 @@ public class SQL {
map.put("owner", data.getString("Owner"));
map.put("lastupdate", data.getString("image_update_time"));
map.put("desc", data.getString("image_description"));
+ map.put("id", data.getString("GUID_imageID"));
+ map.put("version", data.getString("imageVersion"));
}
con.close();