Changeset 5877


Ignore:
Timestamp:
Nov 16, 2011, 3:39:47 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1616: Clone reporter information to per-experiment tables in the dynamic database

Added gui for defining reporter clone templates. Changes to the batcher API. Added an API (TransactionalAction) for hooking into transaction commit/rollback.

Location:
trunk
Files:
7 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/PermissionUtil.java

    r5685 r5877  
    187187        {
    188188          Item.PROTOCOL, Item.HARDWARE, Item.SOFTWARE,
    189           Item.ANNOTATIONTYPE, Item.ANNOTATIONTYPECATEGORY, Item.MIMETYPE, Item.REPORTER,
    190           Item.REPORTERLIST, Item.REPORTERTYPE, Item.EXTRAVALUETYPE, Item.ITEMSUBTYPE,
     189          Item.ANNOTATIONTYPE, Item.ANNOTATIONTYPECATEGORY, Item.MIMETYPE,
     190          Item.REPORTER, Item.REPORTERLIST, Item.REPORTERTYPE, Item.REPORTERCLONETEMPLATE,
     191          Item.EXTRAVALUETYPE, Item.ITEMSUBTYPE,
    191192          Item.PLATFORM, Item.DATAFILETYPE, Item.QUANTITY, Item.UNIT
    192193        })
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/edit/EditUtil.java

    r5685 r5877  
    6464      Item.DIRECTORY, Item.FILE, Item.FILESERVER, Item.PROJECT, Item.PERMISSIONTEMPLATE,
    6565      Item.PHYSICALBIOASSAY, Item.DERIVEDBIOASSAY, Item.RAWBIOASSAY,
    66       Item.FORMULA, Item.REPORTER, Item.REPORTERLIST,
     66      Item.FORMULA, Item.REPORTER, Item.REPORTERLIST, Item.REPORTERCLONETEMPLATE,
    6767      Item.EXPERIMENT, Item.TRANSFORMATION, Item.BIOASSAYSET, Item.BIOASSAY,
    6868      Item.USER, Item.GROUP, Item.ROLE, Item.QUOTA, Item.SOFTWARE, Item.HARDWARE,
  • trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/ToolbarUtil.java

    r5685 r5877  
    5959      Item.TRANSFORMATION, Item.EXTRAVALUE, Item.SPOTDATA,
    6060      Item.RAWBIOASSAY, Item.RAWDATA, Item.FORMULA,
    61       Item.REPORTER, Item.REPORTERLIST, Item.REPORTERSCORE,
     61      Item.REPORTER, Item.REPORTERLIST, Item.REPORTERSCORE, Item.REPORTERCLONETEMPLATE,
    6262      Item.DERIVEDBIOASSAY, Item.PHYSICALBIOASSAY,
    6363      Item.BIOSOURCE, Item.SAMPLE, Item.EXTRACT,
  • trunk/src/clients/web/net/sf/basedb/clients/web/resources/common.properties

    r5685 r5877  
    156156item.news News
    157157item.news+  News
     158item.reporterclonetemplate    Reporter clone template
     159item.reporterclonetemplate+ Reporter clone templates
    158160item.diskusage  Disk usage
    159161item.diskusage+ Disk usage
  • trunk/src/clients/web/net/sf/basedb/clients/web/resources/menu.properties

    r5685 r5877  
    167167news.tooltip.1  Administrate news
    168168news.tooltip.0  You do not have permission to administrate news
     169reporterclonetemplates.tooltip.1  Administrate reporter clone templates
     170reporterclonetemplates.tooltip.0  You do not have permission to administrate reporter clone templates
    169171# ------------
    170172diskusage.tooltip.1 Check disk usage
  • trunk/src/core/net/sf/basedb/core/ClonedProperty.java

    r5876 r5877  
    2121*/
    2222package net.sf.basedb.core;
     23
     24import java.util.ArrayList;
     25import java.util.Collections;
     26import java.util.List;
    2327
    2428import net.sf.basedb.core.Formula.AverageMethod;
     
    3842public class ClonedProperty
    3943  extends ExtendedProperty
     44  implements Comparable<ClonedProperty>
    4045{
    4146  /**
     
    6671        Type.STRING, ReporterData.MAX_NAME_LENGTH, false, AverageMethod.NONE);
    6772    }
    68     if (SYMBOL.equals(name))
     73    else if (SYMBOL.equals(name))
    6974    {
    7075      property = new ClonedProperty(SYMBOL, "Symbol", "", "symbol",
     
    7984 
    8085  /**
    81     Create a cloned property reprsentation of an extended property.
     86    Create a cloned property representation of an extended property.
    8287    @param name The name of the extended property
    8388    @return A cloned property view of the extended property
     
    95100  }
    96101 
     102  /**
     103    Create a cloned property from either an extended or static property.
     104    This method will first check if an extended property with the given
     105    name exists.
     106    @param name The name of the property
     107    @return A cloned property view of the extended or static property
     108    @throws ItemNotFoundException If a property with the given name
     109      doesn't exist
     110  */
     111  public static ClonedProperty create(String name)
     112  {
     113    ClonedProperty property = null;
     114    ExtendedProperty ep = ExtendedProperties.getProperty("ReporterData", name);
     115    if (ep == null)
     116    {
     117      property = createFromRegular(name);
     118    }
     119    else
     120    {
     121      property = new ClonedProperty(ep);
     122    }
     123    return property;
     124  }
     125 
     126  /**
     127    Get a list containing cloned property representation for all static and
     128    extended properties.
     129  */
     130  public static List<ClonedProperty> getAll()
     131  {
     132    List<ExtendedProperty> extended = ExtendedProperties.getProperties("ReporterData");
     133    List<ClonedProperty> all = new ArrayList<ClonedProperty>(extended.size() + 2);
     134   
     135    for (ExtendedProperty ep : extended)
     136    {
     137      all.add(new ClonedProperty(ep));
     138    }
     139    all.add(createFromRegular(NAME));
     140    all.add(createFromRegular(SYMBOL));
     141    Collections.sort(all);
     142    return all;
     143  }
     144 
     145  private final boolean isExtendedProperty;
     146 
     147  /**
     148    Create a cloned property representation of a static property.
     149  */
    97150  private ClonedProperty(String propertyName, String title, String description,
    98151      String column, Type valueType, int length, boolean nullable, AverageMethod averageMethod)
     
    101154      valueType, length, nullable, true, true,
    102155      averageMethod, null);
     156    this.isExtendedProperty = false;
    103157  }
    104158 
     
    112166      p.getType(), p.getLength(), p.isNullable(), true, true,
    113167      p.getAverageMethod(), null);
     168    this.isExtendedProperty = true;
    114169  }
    115170 
     
    125180      Type.fromValue(d.getValueType()), d.getLength(), d.isNullable(), true, true,
    126181      AverageMethod.fromValue(d.getAverageMethod()), null);
     182    this.isExtendedProperty = d.isExtendedProperty();
    127183  }
    128184 
     
    140196    data.setNullable(isNullable());
    141197    data.setAverageMethod(getAverageMethod().getValue());
     198    data.setExtendedProperty(isExtendedProperty());
    142199    return data;
    143200  }
    144201
     202  /**
     203    Is this cloned property an extended property or a "static" property?
     204  */
     205  public boolean isExtendedProperty()
     206  {
     207    return isExtendedProperty;
     208  }
     209 
     210  /**
     211    Check if this cloned property still exists. A cloned property that
     212    has been added to a template is not automatically removed if the
     213    extended properties configuration is changed.
     214  */
     215  public boolean exists()
     216  {
     217    return !isExtendedProperty() || ExtendedProperties.getProperty("ReporterData", getName()) != null;
     218  }
     219 
     220  /*
     221    From the Object class
     222    ---------------------
     223  */
    145224  @Override
    146225  public String toString()
     
    148227    return getName();
    149228  }
    150  
     229
     230  @Override
     231  public boolean equals(Object o)
     232  {
     233    if (this == o) return true;
     234    if (o == null) return false;
     235    if (o.getClass() != ClonedProperty.class) return false;
     236    ClonedProperty other = (ClonedProperty)o;
     237    return getName().equals(other.getName());
     238  }
     239 
     240  @Override
     241  public int hashCode()
     242  {
     243    return getName().hashCode();
     244  }
     245  // ---------------------
     246  /*
     247    From the Comparable interface
     248    -----------------------------
     249  */
     250  @Override
     251  public int compareTo(ClonedProperty o)
     252  {
     253    return getName().compareTo(o.getName());
     254  }
     255  // -----------------------------
    151256}
  • trunk/src/core/net/sf/basedb/core/DbControl.java

    r5689 r5877  
    120120 
    121121  /**
     122    List of actions that should be performed when the
     123    transaction commits or rollbacks.
     124  */
     125  private List<TransactionalAction> transactionalActions;
     126 
     127  /**
    122128    Is the connection closed or not?
    123129  */
     
    317323    hTransaction = null;
    318324
     325    // Call TransactionalAction.onRollback()
     326    if (transactionalActions != null)
     327    {
     328      for (TransactionalAction action : transactionalActions)
     329      {
     330        try
     331        {
     332          action.onRollback();
     333        }
     334        catch (RuntimeException ex)
     335        {
     336          log.warn("Action failed: " + action, ex);
     337        }
     338      }
     339    }
    319340    for (Map.Entry<BasicItem,Transactional.Action> entry : commitQueue.entrySet())
    320341    {
     
    334355    if (batchers != null) batchers.clear();
    335356    if (saveIfQueue != null) saveIfQueue.clear();
     357    if (transactionalActions != null) transactionalActions.clear();
    336358    saveIfQueue = null;
    337359    commitQueue = null;
     360    transactionalActions = null;
    338361    itemCache = null;
    339362    batchers = null;
    340363    isClosed = true;
    341364    isConnected = false;
     365  }
     366 
     367  /**
     368    Add a transactional action to this DbControl.
     369    @since 3.1
     370  */
     371  public void addTransactionalAction(TransactionalAction action)
     372  {
     373    if (transactionalActions == null)
     374    {
     375      transactionalActions = new ArrayList<TransactionalAction>();
     376    }
     377    transactionalActions.add(action);
    342378  }
    343379 
     
    436472        }
    437473      }
     474      // Call TransactionalAction.onBeforeCommit()
     475      if (transactionalActions != null)
     476      {
     477        for (TransactionalAction action : transactionalActions)
     478        {
     479          action.onBeforeCommit();
     480        }
     481      }
    438482      HibernateUtil.commit(hTransaction);
    439483      HibernateUtil.close(hSession);
     
    442486      hTransaction = null;
    443487    }
    444     catch (BaseException ex)
     488    catch (RuntimeException ex)
    445489    {
    446490      if (afterCommitQueue != null) commitQueue.putAll(afterCommitQueue);
     
    448492      close();
    449493      throw ex;
     494    }
     495    // Call TransactionalAction.onAfterCommit()
     496    if (transactionalActions != null)
     497    {
     498      for (TransactionalAction action : transactionalActions)
     499      {
     500        try
     501        {
     502          action.onAfterCommit();
     503        }
     504        catch (RuntimeException ex)
     505        {
     506          log.warn("Action failed: " + action, ex);
     507        }
     508      }
    450509    }
    451510    cleanUp();
  • trunk/src/core/net/sf/basedb/core/Experiment.java

    r5876 r5877  
    2525
    2626import net.sf.basedb.core.data.ExperimentData;
    27 import net.sf.basedb.core.data.ReporterCloneTemplateData;
    2827import net.sf.basedb.core.hibernate.TypeWrapper;
    2928import net.sf.basedb.core.query.Restrictions;
     
    803802  }
    804803 
    805   /**
    806     Create a reporter clone table in the dynamic database for this
    807     experiment and populate it with the current reporter annotations
    808     for all reporters that are part of the experiment. This method will
    809     create an immutable copy of the template so that we can always know
    810     which fields that have been cloned, even if the template is modified.
     804  private ReporterCloneBatcher reporterCloneBatcher;
     805 
     806  /**
     807    Get a batcher for managing cloned reporter information for this experiment.
     808    Note that multiple calls to this method will return the same batcher instance.
    811809   
    812     @param dc A DbControl to use for database access
    813     @param template The template that decides which fieds that
    814       are cloned
    815     @param progress An optional progress reporter
    816     @return The number of reporters that was cloned
     810    @param dc The DbControl to use for database access
     811    @return A reporter clone batcher
    817812    @since 3.1
    818813  */
    819   public int cloneReporters(DbControl dc, ReporterCloneTemplate template, ProgressReporter progress)
    820   {
    821     VirtualDb db = VirtualDb.getById(dc, getData().getVirtualDb().getId());
    822    
    823     if (db.hasClonedReporters())
     814  public ReporterCloneBatcher getReporterCloneBatcher(DbControl dc)
     815  {
     816    if (reporterCloneBatcher == null)
    824817    {
    825       // Remove existing clone table
    826       oldReporterCloneTable = VirtualTable.CLONED_REPORTERS.getTableName(db);
    827       ReporterCloneTemplateData oldClone = db.getData().getReporterCloneTemplate();
    828       HibernateUtil.deleteData(dc.getHibernateSession(), oldClone);
    829       this.addBytes(-oldClone.getBytes());
     818      reporterCloneBatcher = new ReporterCloneBatcher(dc, this);
    830819    }
    831    
    832     if (progress != null) progress.display(0, "Creating clone table...");
    833     // Create a copy of the template
    834     ReporterCloneTemplateData copy = template.createLockedCopy();
    835     db.getData().setReporterCloneTemplate(copy);
    836     HibernateUtil.saveData(dc.getHibernateSession(), copy);
    837    
    838     // Create a new clone table
    839     newReporterCloneTable = HibernateUtil.createVirtualTable(db, VirtualTable.CLONED_REPORTERS);
    840    
    841     // Clone reporter information
    842     return new ReporterCloneBatcher(dc, this).cloneReporters(progress);
    843   }
    844  
     820    return reporterCloneBatcher;
     821  }
    845822 
    846823  /**
  • trunk/src/core/net/sf/basedb/core/Install.java

    r5876 r5877  
    362362      createRoleKey(Item.REPORTER, "Reporters", "Gives access to reporter", guests_use_administrators_all);
    363363      createRoleKey(Item.REPORTERLIST, "Reporter lists", "Gives access to reporter lists", users_create);
    364       createRoleKey(Item.REPORTERCLONETEMPLATE, "Reporter clone template", "Gives access to reporter clone templates", guests_use_power_users_all);
     364      createRoleKey(Item.REPORTERCLONETEMPLATE, "Reporter clone templates", "Gives access to reporter clone templates", power_users_create);
    365365 
    366366      // Array LIMS - plates
  • trunk/src/core/net/sf/basedb/core/ReporterCloneBatcher.java

    r5876 r5877  
    2626import java.util.List;
    2727
     28import net.sf.basedb.core.data.ReporterCloneTemplateData;
    2829import net.sf.basedb.core.hibernate.TypeWrapper;
    2930import net.sf.basedb.core.query.Dynamic;
     
    5859 
    5960  /**
    60     The number of bytes this batcher has added to the experiment.
    61   */
    62   private long bytes = 0;
    63 
    64   /**
    6561    The statement that inserts cloned reporter data.
    6662<pre class="code">
     
    8177  {
    8278    super();
    83     this.experiment = experiment;
     79    this.experiment = Experiment.getById(dc, experiment.getId());
    8480    this.virtualDb = experiment.getVirtualDb();
    8581    this.bytesPerRow = VirtualTable.CLONED_REPORTERS.getBytesPerRow(virtualDb);
     
    118114    throws BaseException
    119115  {
    120     virtualDb.getReporterCloneTemplate().addBytes(bytes);
    121     experiment.addBytes(bytes);
    122    
    123116    try
    124117    {
     
    134127      LogUtil.logSQLExceptionChain(logSql, ex);
    135128    }
    136     if (!getDbControl().isRolledBack())
     129    if (!getDbControl().isRolledBack() && virtualDb.hasClonedReporters())
    137130    {
    138131      String catalog = Application.getDynamicCatalog();
     
    145138
    146139  /**
    147     Clone the current reporter information to the dynamic database.
     140    Get the current experiment this batcher is used with.
     141  */
     142  public Experiment getExperiment()
     143  {
     144    return experiment;
     145  }
     146 
     147  /**
     148    Drop the cloned reporter information from the dynamic database. If the
     149    current experiment doesn't have any cloned reporters, nothing is done.
     150  */
     151  public void dropClonedReporters()
     152  {
     153    DbControl dc = getDbControl();
     154   
     155    if (virtualDb.hasClonedReporters())
     156    {
     157      // Schedule the old table for removal on successful commit
     158      String oldTableName = VirtualTable.CLONED_REPORTERS.getTableName(virtualDb);
     159      dc.addTransactionalAction(new DropDynamicTableAction(oldTableName, true, false));
     160     
     161      // Delete the old template
     162      ReporterCloneTemplateData oldClone = virtualDb.getData().getReporterCloneTemplate();
     163      HibernateUtil.deleteData(dc.getHibernateSession(), oldClone);
     164      virtualDb.getData().setReporterCloneTemplate(null);
     165     
     166      // Return used bytes to the experiment
     167      experiment.addBytes(-oldClone.getBytes());
     168    }
     169  }
     170 
     171  /**
     172    Create a reporter clone table in the dynamic database for this
     173    experiment and populate it with the current reporter annotations
     174    for all reporters that are part of the experiment. This method will
     175    create an immutable copy of the template so that we can always know
     176    which fields that have been cloned, even if the template is modified.
     177    If there already is a cloned reporter information it will be removed.
     178   
    148179    @param progress An optional progress reporter
    149180    @return The number of cloned reporters
    150181  */
    151   int cloneReporters(ProgressReporter progress)
    152   {
     182  public int cloneReporters(ReporterCloneTemplate template, ProgressReporter progress)
     183  {
     184    DbControl dc = getDbControl();
     185   
     186    // Drop existing cloned reporters (if any)
     187    dropClonedReporters();
     188   
     189    // Create a copy of the template
     190    ReporterCloneTemplateData copy = template.createLockedCopy();
     191    virtualDb.getData().setReporterCloneTemplate(copy);
     192    HibernateUtil.saveData(dc.getHibernateSession(), copy);
     193
     194    // Create the clone table...
     195    if (progress != null) progress.display(0, "Creating clone table...");
     196    String cloneTableName = HibernateUtil.createVirtualTable(virtualDb, VirtualTable.CLONED_REPORTERS);
     197    // ...and an action that drops it in the case of a rollback
     198    dc.addTransactionalAction(new DropDynamicTableAction(cloneTableName, false, true));
     199   
     200    long bytes = 0;
    153201    int insertCount = 0;
    154202    int batchSize = getBatchSize();
    155203    try
    156204    {
    157       DbControl dc = getDbControl();
    158205      DynamicPositionQuery query = buildSelectQuery();
    159206      long totalCount = query.count(dc);
     
    199246      }
    200247     
     248      virtualDb.getReporterCloneTemplate().addBytes(bytes);
     249      experiment.addBytes(bytes);
     250     
    201251      flushInternal();
    202252     
     
    275325    }
    276326   
    277    
    278327    return query;
    279328  }
  • trunk/src/core/net/sf/basedb/core/ReporterCloneTemplate.java

    r5876 r5877  
    2323
    2424import java.util.ArrayList;
     25import java.util.Collections;
    2526import java.util.Date;
    2627import java.util.List;
     
    3738  A reporter clone template is a definition of which reporter properties/annotations
    3839  that should be cloned to a per-experiment table in the dynamic database. The
    39   cloning operation is initiated with {@link Experiment#cloneReporters(DbControl,
    40   ReporterCloneTemplate, ProgressReporter)}. The reporter internal and external id
     40  cloning operation is initiated with {@link Experiment#getReporterCloneBatcher(DbControl)}.
     41  The reporter internal and external id
    4142  are always cloned and should not be part of the template. The cloning operation
    4243  also creates a locked copy of the template, so that it is possible to make modifications
     
    266267 
    267268  /**
     269    Check if this template contains a cloned property with
     270    the given name.
     271    @param propertyName The property name to check
     272    @return TRUE if the template contains the given property, FALSE if not
     273  */
     274  public boolean hasClonedProperty(String propertyName)
     275  {
     276    return getData().getProperties().containsKey(propertyName);
     277  }
     278 
     279  /**
    268280    Get a list with all cloned properties in this template. The returned list
    269281    is a copy of the information in this template and modifications to the list
     
    277289    for (Map.Entry<String, ReporterClonePropertyData> data : properties)
    278290    {
    279       list.add(new ClonedProperty(data.getKey(), data.getValue()));
     291      ClonedProperty cp = new ClonedProperty(data.getKey(), data.getValue());
     292      int insertIndex = Collections.binarySearch(list, cp);
     293      if (insertIndex < 0) list.add(-1-insertIndex, cp);
    280294    }
    281295    return list;
  • trunk/src/core/net/sf/basedb/core/data/ReporterClonePropertyData.java

    r5876 r5877  
    140140  }
    141141
    142  
     142  private boolean extendedProperty;
     143  /**
     144    If the column is nullable or not.
     145    @hibernate.property column="`extended_property`" type="boolean" not-null="true" update="false"
     146  */
     147  public boolean isExtendedProperty()
     148  {
     149    return extendedProperty;
     150  }
     151  public void setExtendedProperty(boolean extendedProperty)
     152  {
     153    this.extendedProperty = extendedProperty;
     154  }
     155
    143156}
  • trunk/src/core/net/sf/basedb/core/data/ReporterCloneTemplateData.java

    r5876 r5877  
    4242public class ReporterCloneTemplateData
    4343  extends CommonData
    44   implements RegisteredData
     44  implements RegisteredData, LoggableData
    4545{
    4646  public ReporterCloneTemplateData()
  • trunk/src/test/TestReporterCloneTemplate.java

    r5876 r5877  
    3131import net.sf.basedb.core.ItemResultList;
    3232import net.sf.basedb.core.Permission;
     33import net.sf.basedb.core.ReporterCloneBatcher;
    3334import net.sf.basedb.core.ReporterCloneTemplate;
    3435import net.sf.basedb.util.ConsoleProgressReporter;
     
    8182      // Standard test: Delete
    8283      if (TestUtil.waitBeforeDelete()) TestUtil.waitForEnter();
     84      test_remove_cloned_reporters(experimentId);
    8385      test_delete(id);
    84      
    8586    }
    8687    finally
     
    244245      Experiment exp = Experiment.getById(dc, experimentId);
    245246     
    246       exp.cloneReporters(dc, rct, TestUtil.getSilent() ? null : new ConsoleProgressReporter());
     247      ReporterCloneBatcher batcher = exp.getReporterCloneBatcher(dc);
     248      batcher.cloneReporters(rct, TestUtil.getSilent() ? null : new ConsoleProgressReporter());
    247249     
    248250      dc.commit();
     
    260262      if (dc != null) dc.close();
    261263    }
    262 
     264  }
    263265 
    264   }
    265  
    266  
     266  static void test_remove_cloned_reporters(int experimentId)
     267  {
     268    if (experimentId == 0) return;
     269    DbControl dc = null;
     270    try
     271    {
     272      dc = TestUtil.getDbControl();
     273      Experiment exp = Experiment.getById(dc, experimentId);
     274     
     275      ReporterCloneBatcher batcher = exp.getReporterCloneBatcher(dc);
     276      batcher.dropClonedReporters();
     277     
     278      dc.commit();
     279      write("--Remove cloned reporters OK");
     280    }
     281    catch (Throwable ex)
     282    {
     283      write("--Remove cloned reporters FAILED");
     284      ex.printStackTrace();
     285      ok = false;
     286    }
     287    finally
     288    {
     289      if (dc != null) dc.close();
     290    }
     291  }
     292
    267293}
  • trunk/www/include/menu.jsp

    r5708 r5877  
    954954    final boolean hasClients = sc.hasPermission(Permission.READ, Item.CLIENT);
    955955    final boolean hasNews = sc.hasPermission(Permission.READ, Item.NEWS);
     956    final boolean hasReporterCloneTemplates = !sc.hasPermission(Permission.DENIED, Item.REPORTERCLONETEMPLATE);
    956957    final boolean hasDiskUsage = sc.hasPermission(Permission.READ, Item.DISKUSAGE);
    957958    final Client currentClient = Client.getById(dc, sc.getClientId());
     
    960961    final boolean hasAdministrate =
    961962      hasUsers || hasGroups || hasRoles || hasQuota || hasTypes || hasPlugins ||
    962       hasSoftware || hasHardware || hasProtocols || hasClients || hasNews ||
     963      hasSoftware || hasHardware || hasProtocols || hasClients || hasNews || hasReporterCloneTemplates ||
    963964      hasDiskUsage || hasServer || hasTopPlatforms;
    964965
     
    10311032          tooltip="<%=menu.getString("news.tooltip", hasNews)%>"
    10321033          enabled="<%=hasNews%>"
     1034        />
     1035        <m:menuitem
     1036          title="<%=common.getString("item.reporterclonetemplate+")%>"
     1037          onclick="<%="Menu.openUrl('"+root+"admin/reporterclonetemplates/index.jsp?ID="+ID+"')"%>"
     1038          tooltip="<%=menu.getString("reporterclonetemplates.tooltip", hasReporterCloneTemplates)%>"
     1039          enabled="<%=hasReporterCloneTemplates%>"
    10331040        />
    10341041        <m:menuseparator />
  • trunk/www/include/scripts/main.js

    r5722 r5877  
    615615    this.controllers['ANNOTATION'] = { url:'common/annotations/index.jsp', width:700, height:480, edit:true, popup:true };
    616616    this.controllers['ITEMSUBTYPE'] = { url:'admin/itemsubtypes/index.jsp', width:640, height:440 };
     617    this.controllers['REPORTERCLONETEMPLATE'] = { url:'admin/reporterclonetemplates/index.jsp', width:640, height:440 };
    617618  }
    618619 
  • trunk/www/views/experiments/list_experiments.jsp

    r5590 r5877  
    283283      />
    284284      <tbl:columndef
     285        id="reporterCloneTemplate"
     286        property="virtualDb.reporterCloneTemplate.name"
     287        datatype="string"
     288        title="Reporter clone template"
     289        sortable="true"
     290        filterable="true"
     291        exportable="true"
     292      />
     293      <tbl:columndef
    285294        id="title"
    286295        property="title"
     
    572581                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
    573582                  /></tbl:cell>
     583                <tbl:cell column="reporterCloneTemplate"
     584                  ><base:propertyvalue
     585                    item="<%=item%>"
     586                    property="virtualDb.reporterCloneTemplate"
     587                    enableEditLink="<%=mode.hasEditLink()%>"
     588                    enablePropertyLink="<%=mode.hasPropertyLink()%>"
     589                  /></tbl:cell>
    574590                <tbl:cell column="title"><%=HTML.encodeTags(item.getTitle())%></tbl:cell>
    575591                <tbl:cell column="abstract"><%=HTML.encodeTags(item.getAbstract())%></tbl:cell>
  • trunk/www/views/experiments/view_experiment.jsp

    r5812 r5877  
    394394      </tr>
    395395      <tr>
     396        <td class="prompt">Reporter clone template</td>
     397        <td><base:propertyvalue item="<%=experiment%>" property="virtualDb.reporterCloneTemplate" nulltext="<i>- no cloned reporters -</i>" /></td>
     398      </tr>
     399      <tr>
    396400        <td class="prompt">Bytes</td>
    397401        <td><%=Values.formatBytes(experiment.getBytes())%></td>
Note: See TracChangeset for help on using the changeset viewer.