diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ComponentMaintenancePanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ComponentMaintenancePanel.java index 0f9ddf1fc8a499e58780b1c4989bf13429e54285..80215bd997592f531523c5170d074e8a02dd8978 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ComponentMaintenancePanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ComponentMaintenancePanel.java @@ -34,7 +34,7 @@ import nl.astron.lofar.sas.otbcomponents.VICnodeDefViewPanel; import org.apache.log4j.Logger; /** - * Class that will show the components to the user, all component actions can be + Class that will show the components to the user, all component actions can be * handled from within this Gui panel. * * @created 24-01-2006 diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java index 63392444dfec5ba4279081d023b2a1b59aa76cf6..8c592f405962fad8abd246576187ec6be24effb6 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java @@ -430,12 +430,13 @@ public class MainPanel extends javax.swing.JPanel BufferedInputStream input = new BufferedInputStream(new FileInputStream(itsNewFile)); input.read(uldata,0,uldata.length); input.close(); - if (itsMainFrame.getSharedVars().getOTDBrmi().getRemoteFileTrans().uploadFile(uldata,itsNewFile.getName())) { + String aFileName= "/tmp/"+itsMainFrame.getUserAccount().getUserName()+"_"+itsNewFile.getName(); + if (itsMainFrame.getSharedVars().getOTDBrmi().getRemoteFileTrans().uploadFile(uldata,aFileName)) { logger.debug("upload finished"); // Create a new Tree from the found file. - int aTreeID=itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().loadMasterFile(itsNewFile.getPath()); + int aTreeID=itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().loadMasterFile(aFileName); if (aTreeID < 1) { - logger.debug("Error on fileLoad: " + itsNewFile.getPath()); + logger.debug("Error on fileLoad: " + aFileName); } else { // set changed flag to reload mainpanel itsMainFrame.setChanged(this.getFriendlyName(),true); @@ -651,10 +652,11 @@ public class MainPanel extends javax.swing.JPanel BufferedInputStream input = new BufferedInputStream(new FileInputStream(itsNewFile)); input.read(uldata,0,uldata.length); input.close(); - if (itsMainFrame.getSharedVars().getOTDBrmi().getRemoteFileTrans().uploadFile(uldata,itsNewFile.getName())) { + String aFileName= "/tmp/"+itsMainFrame.getUserAccount().getUserName()+"_"+itsNewFile.getName(); + if (itsMainFrame.getSharedVars().getOTDBrmi().getRemoteFileTrans().uploadFile(uldata,aFileName)) { logger.debug("upload finished"); // Create a new Tree from the found file. - int anID=itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().loadComponentFile(itsNewFile.getName()); + int anID=itsMainFrame.getSharedVars().getOTDBrmi().getRemoteMaintenance().loadComponentFile(aFileName); if (anID < 1) { logger.debug("Error on ComponentfileLoad: " + itsNewFile.getPath()); } else { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java index bba0a05d1fc437393d289e7b28ded40723377275..2ae14ba013a111a9a23214ca581840daea2ea055 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java @@ -29,10 +29,12 @@ import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.SwingUtilities; +import nl.astron.lofar.lofarutils.LofarUtils; import nl.astron.lofar.sas.otb.MainFrame; import nl.astron.lofar.sas.otb.jotdb2.jOTDBnode; import nl.astron.lofar.sas.otb.jotdb2.jOTDBparam; import nl.astron.lofar.sas.otb.jotdb2.jOTDBtree; +import nl.astron.lofar.sas.otb.util.ConfigPanelHelper; import nl.astron.lofar.sas.otb.util.IViewPanel; import nl.astron.lofar.sas.otb.util.UserAccount; import nl.astron.lofar.sas.otb.util.treemanagers.OTDBNodeTreeManager; @@ -300,11 +302,12 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel jTabbedPane1.removeAll(); // Check if the nodename uses specific panels and create them - Vector<String> aPanelList=new Vector<String>(); - //generic node panel - aPanelList.add("nl.astron.lofar.sas.otbcomponents.NodeViewPanel"); - //generic parameter panel - aPanelList.add("nl.astron.lofar.sas.otbcomponents.ParameterViewPanel"); + Vector aPanelList=null; + if (itsPanelHelper.isKey(LofarUtils.keyName(aNode.name))) { + aPanelList=itsPanelHelper.getPanels(LofarUtils.keyName(aNode.name)); + } else { + aPanelList=itsPanelHelper.getPanels("*"); + } // Loop through all the panels and fill the tabPanel with them @@ -373,6 +376,8 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel // keep the TreeId that belongs to this panel private int itsTreeID = 0; private boolean changed = false; + + private ConfigPanelHelper itsPanelHelper=ConfigPanelHelper.getConfigPanelHelper(); // Variables declaration - do not modify//GEN-BEGIN:variables private nl.astron.lofar.sas.otbcomponents.ButtonPanel buttonPanel1;