Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3437 - in branches/WebAdmin: . perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard/services

Subject: perfsonar development work

List archive

perfsonar: r3437 - in branches/WebAdmin: . perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard/services


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3437 - in branches/WebAdmin: . perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard/services
  • Date: Mon, 3 Mar 2008 02:40:35 -0500

Author: michalis
Date: 2008-03-03 02:40:35 -0500 (Mon, 03 Mar 2008)
New Revision: 3437

Added:
branches/WebAdmin/b.gif
branches/WebAdmin/background.gif
branches/WebAdmin/l.gif
branches/WebAdmin/lb.gif
branches/WebAdmin/lt.gif
branches/WebAdmin/r.gif
branches/WebAdmin/rb.gif
branches/WebAdmin/rt.gif
branches/WebAdmin/stemb.gif
branches/WebAdmin/stemt.gif
branches/WebAdmin/t.gif
Removed:
branches/WebAdmin/tip_balloon/
Modified:
branches/WebAdmin/Service_Admin.js
branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
branches/WebAdmin/tip_balloon.js
Log:
Committing code changes supporting tooltip descriptions and properties with
grouping and description.
An update of the Configuration Handler is needed to maintain grouping and
description in service.properties after the wizard is used. The needed
changes were done in RRDMAHandler. Unfortunately there are no comments about
the changes yet. Comments will be added tomorrow

Modified: branches/WebAdmin/Service_Admin.js
===================================================================
--- branches/WebAdmin/Service_Admin.js 2008-03-03 07:36:26 UTC (rev 3436)
+++ branches/WebAdmin/Service_Admin.js 2008-03-03 07:40:35 UTC (rev 3437)
@@ -6,5 +6,5 @@
//document.getElementById('description').text=description;
//document.getElementById('groupName').text=group;
var text='<span style=\"font-size: 12px;
width:20px;\">'+description+'</span>';
- Tip(text,'BALLOON', 'true', 'ABOVE', 'true');
+ Tip(text,BALLOON, true,WIDTH, 260, PADDING, 8, TEXTALIGN, 'justify',
ABOVE, true);
}

Added: branches/WebAdmin/b.gif


Property changes on: branches/WebAdmin/b.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/background.gif


Property changes on: branches/WebAdmin/background.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/l.gif


Property changes on: branches/WebAdmin/l.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/lb.gif


Property changes on: branches/WebAdmin/lb.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/lt.gif


Property changes on: branches/WebAdmin/lt.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Modified: branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
===================================================================
--- branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
2008-03-03 07:36:26 UTC (rev 3436)
+++ branches/WebAdmin/perfSONARWebAdmin/admin/service/Admin.java
2008-03-03 07:40:35 UTC (rev 3437)
@@ -448,12 +448,12 @@
out.println("<table>");
out.println("<tr>");
out
- .println("<th>Service Properties
Table</th><td><input type=\"submit\" name=\"Lock\" value=\"Lock\"/
></td><td/>");
+ .println("<th>Service Properties
Table <input type=\"submit\" name=\"Lock\" value=\"Lock\"/ ></th>");
out.println("</tr>");
out.println("<tr/>");
out.println("<tr>");
out
- .println("<th>Edit the right column
of the Service Properties Table and then press 'Apply'</th><td/><td/>");
+ .println("<th>Edit the right column
of the Service Properties Table and then press 'Apply'</th>");
out.println("</tr>");
out.println("</table>");
out.println("</form>");
@@ -611,6 +611,7 @@
out.println("<body>");
out.println("<script src=\"Service_Admin.js\">\n" +
"</script>\n");
out.println("<script src=\"wz_tooltip.js\">\n" +
"</script>\n");
+ out.println("<script src=\"tip_balloon.js\">\n" +
"</script>\n");
out.println("<div style=\"display:none;\" id=\"tooltip\"
>");
out.println("<table>");
out.println("<tr style=\"text-align: left ;\">");

Modified:
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
===================================================================
---
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
2008-03-03 07:36:26 UTC (rev 3436)
+++
branches/WebAdmin/perfSONARWebAdmin/admin/wizard/services/RRDMAHandler.java
2008-03-03 07:40:35 UTC (rev 3437)
@@ -3,6 +3,7 @@
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
@@ -13,6 +14,9 @@

import javax.servlet.http.HttpServletRequest;

+import perfSONARWebAdmin.auxiliary.PerfsonarProperties;
+import perfSONARWebAdmin.auxiliary.PerfsonarPropertiesImpl;
+import perfSONARWebAdmin.auxiliary.PerfsonarProperty;
import perfSONARWebAdmin.auxiliary.ServiceProperties;
import perfSONARWebAdmin.auxiliary.ServicePropertiesImpl;
import perfSONARWebAdmin.auxiliary.wizard.ConfigurationHandler;
@@ -430,32 +434,62 @@
*/
private void otherActions(String group, WizardProperties
functionProperties)
throws IOException {
- // A class that makes modifying service properties a little
bit easier
- ServiceProperties serviceProperties = null;
+
// The only other group for rrd ma is the Store group
if (group.equals("Store")) {
- serviceProperties = new
ServicePropertiesImpl(ServicePath
- + ServicePropertiesPath);
+ // A class that makes modifying service properties a
little bit
+ // easier
+ PerfsonarProperties serviceProperties = null;
+ serviceProperties = new PerfsonarPropertiesImpl();
+ serviceProperties.loadProperties(new
FileInputStream(ServicePath
+ + ServicePropertiesPath));
+ // Getting the names for every property of the group
+ Iterator it = functionProperties.orderedKeys();
+ // Setting the value of each property
+ PerfsonarProperty property = new PerfsonarProperty();
+ while (it.hasNext()) {
+ String key = (String) it.next();
+ // Setting service properties and wizard
properties
+ property = serviceProperties.getProperty(key);
+ if (property == null) {
+ throw new IOException("Key is invalid
" + key + " ");
+ } else {
+
property.setValue(functionProperties.getProperty(key));
+ serviceProperties.setProperty(key,
property);
+ }
+ properties.setWizardProperty(key,
functionProperties
+ .getWizardProperty(key));
+ }
+ // Storing all changes
+ serviceProperties.storeProperties(new
FileOutputStream(ServicePath
+ + ServicePropertiesPath));
}
// We don't really have any other groups just the ones for
the servlet
// administration
else {
- serviceProperties = new
ServicePropertiesImpl(ServicePath
- + ServletPropertiesPath);
+ // A class that makes modifying service properties a
little bit
+ // easier
+ ServiceProperties serviceProperties = new
ServicePropertiesImpl(
+ ServicePath + ServletPropertiesPath);
+ // Getting the names for every property of the group
+ Iterator it = functionProperties.orderedKeys();
+ // Setting the value of each property
+ String value = null;
+ while (it.hasNext()) {
+ String key = (String) it.next();
+ // Setting service properties and wizard
properties
+ value = serviceProperties.getProperty(key);
+ if (value == null) {
+ throw new IOException("Key is invalid
" + key + " ");
+ } else {
+ serviceProperties.setProperty(key,
value);
+ }
+ properties.setWizardProperty(key,
functionProperties
+ .getWizardProperty(key));
+ }
+ serviceProperties.storeProperties();
+
}
- // Getting the names for every property of the group
- Iterator it = functionProperties.orderedKeys();
- // Setting the value of each property
- while (it.hasNext()) {
- String key = (String) it.next();
- // Setting service properties and wizard properties
- serviceProperties.setProperty(key, functionProperties
- .getProperty(key));
- properties.setWizardProperty(key, functionProperties
- .getWizardProperty(key));
- }
- // Storing all changes
- serviceProperties.storeProperties();
properties.storeToXML(new FileOutputStream(new
File(ServicePath
+ WizardPropertiesPath)), " Last Modification
"
+
Calendar.getInstance().getTime().toString());
@@ -472,21 +506,29 @@
private void lsActions(WizardProperties finalProperties) throws
IOException {
// Using the ServiceProperties class to acces the
service.properties
// file
- ServiceProperties serviceProperties = new
ServicePropertiesImpl(
- ServicePath + ServicePropertiesPath);
+ PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
+ serviceProperties.loadProperties(new
FileInputStream(ServicePath
+ + ServicePropertiesPath));
Iterator it = finalProperties.orderedKeys();
// Iterating through the LS registration properties properties
+ PerfsonarProperty property = new PerfsonarProperty();
while (it.hasNext()) {
String key = (String) it.next();
// Set the service properties
- serviceProperties
- .setProperty(key,
finalProperties.getProperty(key));
+ property = serviceProperties.getProperty(key);
+ if (property == null) {
+ throw new IOException("Key is invalid " + key
+ " ");
+ } else {
+ property.setValue(finalProperties.getProperty(key));
+ serviceProperties.setProperty(key, property);
+ }
// Set the wizard properties
properties.setWizardProperty(key, finalProperties
.getWizardProperty(key));
}
// Storing service properties
- serviceProperties.storeProperties();
+ serviceProperties.storeProperties(new
FileOutputStream(ServicePath
+ + ServicePropertiesPath));
// Setting the LS registration componenets in components
properties file
addRegistrationComponents();
// Storing the wizard properties
@@ -508,14 +550,15 @@

// Initiating ServiceProperties classes for handling input to
the
// service.properties and servlet.properties file
- ServiceProperties serviceProperties = new
ServicePropertiesImpl(
- ServicePath + ServicePropertiesPath);
+ PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
+ serviceProperties.loadProperties(new
FileInputStream(ServicePath
+ + ServicePropertiesPath));
// Any changes happening to the URL of the exist db and on
the admin
// password should be reflected on the servlet.properties as
well
ServiceProperties servletProperties = new
ServicePropertiesImpl(
ServicePath + ServletPropertiesPath);
// Get an iterator for all service properties
- Iterator it =
serviceProperties.getProperties().keySet().iterator();
+ Iterator it = serviceProperties.getKeysIterator();
// Get the type of the service. Will be used for making the
new db
// collection
String serviceName = servletProperties.getProperty(
@@ -534,7 +577,8 @@
while (it.hasNext()) {
String key = (String) it.next();
if (key.endsWith("xmldb.db_adminpassword")) {
- adminPass =
serviceProperties.getProperty(key).trim();
+ adminPass =
serviceProperties.getProperty(key).getValue()
+ .trim();
newAdminPass =
finalProperties.getProperty(key).trim();
}
if (key.endsWith("xmldb.db_uri")) {
@@ -554,12 +598,19 @@
// The input from the user is also set in service
properties with a
// slight modification for tyhe xmldb uri. We need to
add the
// collection at the end of the URI
+ PerfsonarProperty property = new PerfsonarProperty();
if (!key.endsWith("xmldb.db_uri")) {
- serviceProperties.setProperty(key,
finalProperties
- .getProperty(key));
+ property = serviceProperties.getProperty(key);
+ if (property == null) {
+ throw new Exception("Key is invalid "
+ key + " ");
+ } else {
+
property.setValue(finalProperties.getProperty(key));
+ serviceProperties.setProperty(key,
property);
+ }
} else {
- serviceProperties.setProperty(key, existURI +
"/db/"
- + dbCollection);
+ property = serviceProperties.getProperty(key);
+ property.setValue(existURI + "/db/" +
dbCollection);
+ serviceProperties.setProperty(key, property);
}
// Setting also the wizard properties
properties.setWizardProperty(key, finalProperties
@@ -593,7 +644,8 @@
// Modifying the admin user password
manager.modifyUser("admin", newAdminPass, null, null);

- serviceProperties.storeProperties();
+ serviceProperties.storeProperties(new
FileOutputStream(ServicePath
+ + ServicePropertiesPath));
properties.storeToXML(new FileOutputStream(new
File(ServicePath
+ WizardPropertiesPath)), " Last
Modification "
+
Calendar.getInstance().getTime().toString());
@@ -673,13 +725,23 @@
*/
public boolean finishConfiguration() throws Exception {

- ServiceProperties serviceProperties = new
ServicePropertiesImpl(
- ServicePath + ServicePropertiesPath);
- serviceProperties.setProperty("service.sax_parser.config",
ServicePath
- + ObjectsConfigPath);
- serviceProperties.setProperty("service.log.log4j.config",
ServicePath
- + LoggingPropertiesPath);
- serviceProperties.storeProperties();
+ PerfsonarProperties serviceProperties = new
PerfsonarPropertiesImpl();
+ serviceProperties.loadProperties(new
FileInputStream(ServicePath
+ + ServicePropertiesPath));
+ PerfsonarProperty property = new PerfsonarProperty();
+ property.setKey("service.sax_parser.config");
+ property.setValue(ServicePath + ObjectsConfigPath);
+ property.setGroup("Internals");
+ property.setDescription("Sax parser configuration paramater");
+ serviceProperties.setProperty(property.getKey(), property);
+ property = new PerfsonarProperty();
+ property.setKey("service.log.log4j.config");
+ property.setValue(ServicePath + LoggingPropertiesPath);
+ property.setGroup("Internals");
+ property.setDescription("Logging Properties path");
+ serviceProperties.setProperty(property.getKey(), property);
+ serviceProperties.storeProperties(new
FileOutputStream(ServicePath
+ + ServicePropertiesPath));

return true;


Added: branches/WebAdmin/r.gif


Property changes on: branches/WebAdmin/r.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/rb.gif


Property changes on: branches/WebAdmin/rb.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/rt.gif


Property changes on: branches/WebAdmin/rt.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/stemb.gif


Property changes on: branches/WebAdmin/stemb.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/stemt.gif


Property changes on: branches/WebAdmin/stemt.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: branches/WebAdmin/t.gif


Property changes on: branches/WebAdmin/t.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Modified: branches/WebAdmin/tip_balloon.js
===================================================================
--- branches/WebAdmin/tip_balloon.js 2008-03-03 07:36:26 UTC (rev 3436)
+++ branches/WebAdmin/tip_balloon.js 2008-03-03 07:40:35 UTC (rev 3437)
@@ -24,7 +24,7 @@

//=================== GLOBAL TOOPTIP CONFIGURATION
=========================//
config. Balloon = false // true or false -
set to true if you want this to be the default behaviour
-config. BalloonImgPath = "../scripts/tip_balloon/" // Path to images
(border, corners, stem), in quotes. Path must be relative to your HTML file.
+config. BalloonImgPath = "./" // Path to images (border, corners, stem), in
quotes. Path must be relative to your HTML file.
// Sizes of balloon images
config. BalloonEdgeSize = 5 // Integer - sidelength of
quadratic corner images
config. BalloonStemWidth = 15 // Integer



  • perfsonar: r3437 - in branches/WebAdmin: . perfSONARWebAdmin/admin/service perfSONARWebAdmin/admin/wizard/services, svnlog, 03/03/2008

Archive powered by MHonArc 2.6.16.

Top of Page