Changeset 6960


Ignore:
Timestamp:
Oct 1, 2015, 12:59:58 PM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #1941: Store experimental factor values as part experiments

Added validation rule to "Item overview" that check if a cloned annotation is in sync or not.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/util/overview/OverviewUtil.java

    r6939 r6960  
    133133            Validator.ANNOTATION_INVALID_ITEM,
    134134            Validator.ANNOTATION_INHERIT_FROM_NONPARENT,
    135             Validator.ANNOTATION_CLONED_FROM_UNKNOWNPARENT,
     135            Validator.ANNOTATION_CLONED_FROM_UNKNOWNPARENT, Validator.ANNOTATION_CLONE_OUTOFSYNC,
    136136            Validator.ANNOTATION_INHERIT_FROM_DENIEDPARENT,
    137137            Validator.ANNOTATION_INHERIT_MULTIPLE
  • trunk/src/core/net/sf/basedb/util/overview/Validator.java

    r6939 r6960  
    774774    );
    775775
    776  
     776  /**
     777    Validator rule that checks if a cloned annotation value is in sync
     778    with the source annotation. Default severity level is WARNING.
     779    @since 3.6
     780  */
     781  public static final Validator ANNOTATION_CLONE_OUTOFSYNC = new Validator(
     782      "annotation.cloneoutofsync", "Cloned annotation out-of-sync",
     783      "Checks if an item has a cloned annotation that is " +
     784      "out-of-sync with the source annotation.",
     785      "Cloned annotation out-of-sync", Severity.WARNING
     786    );
     787
    777788  /**
    778789    Validator rule that checks if the logged in user has access to
  • trunk/src/core/net/sf/basedb/util/overview/validator/AnnotationValidator.java

    r6959 r6960  
    191191            );
    192192          }
     193         
     194          // Check if a cloned annotation is out-of-sync
     195          if (a.getSource() == Annotation.Source.CLONED)
     196          {
     197            if (a.getLastUpdate().before(inherited.getLastUpdate()))
     198            {
     199              context.createFailure(Validator.ANNOTATION_CLONE_OUTOFSYNC, node,
     200                "Cloned annotation '" + (at != null ?
     201                at.getName() : a.getValueType().toString()) + "' is out-of-sync with source annotation",
     202                new Fix("Sync cloned annotation", (BasicItem)parent, a)
     203              );
     204            }
     205          }
    193206        }
    194207      }
  • trunk/src/core/net/sf/basedb/util/overview/validator/DataFileValidator.java

    r6959 r6960  
    180180                fileType.getName() + " can't be used with '" + pvName + "' platform",
    181181                new Fix("Remove '" + fileType.getName() + "' from " + parentItem.getType().toString().toLowerCase(),
    182                   (BasicItem)parentItem, fileType),
     182                  parentItem, fileType),
    183183                new Fix("Add '" + fileType.getName() +"' to '" + pvName + "' platform", pvItem, fileType)
    184184              );
     
    195195                  fileType.getName() + " can't be used with '" + subtype.getName() + "' subtype",
    196196                  new Fix("Remove '" + fileType.getName() + "' from " + parentItem.getType().toString().toLowerCase(),
    197                     (BasicItem)parentItem, fileType),
     197                    parentItem, fileType),
    198198                  new Fix("Add '" + fileType.getName() +"' to '" + subtype.getName() + "' subtype", subtype, fileType)
    199199                );
     
    280280              "Missing '" + dft.getName() + "'",
    281281              new Fix("Add '" + dft.getName() + "' to " + parentItem.getType().toString().toLowerCase(),
    282                   (BasicItem)parentItem, dft),
     282                  parentItem, dft),
    283283              new Fix("Remove 'Required' flag from '" + dft.getName() + "'", pvItem, dft)
    284284            );
     
    289289              "Too many files: '" + dft.getName() + "'",
    290290              new Fix("Remove '" + dft.getName() + "' from " + parentItem.getType().toString().toLowerCase(),
    291                   (BasicItem)parentItem, dft),
     291                  parentItem, dft),
    292292              new Fix("Check 'Allow multiple files' on '" + dft.getName() + "'", pvItem, dft)
    293293            );
  • trunk/www/common/overview/options.jsp

    r6684 r6960  
    106106    display: none;
    107107    position: fixed;
    108     top: 5em;
    109     right: 1em;
     108    top: 5.5em;
     109    right: 1.5em;
    110110    height: 10em;
    111     width: 18em;
     111    width: 25em;
    112112  }
    113113  tr:hover .validatordescription
     
    205205            String validatorId = validator.getId();
    206206            boolean hasNext = vi.hasNext();
     207            String vtitle = HTML.encodeTags(validator.getTitle());
    207208            %>
    208209            <tr id="vld.<%=grp%>.<%=vld%>" style="display: none;" class="highlight">
    209               <th class="subprompt"><%=HTML.encodeTags(validator.getTitle())%></th>
     210              <th class="subprompt" title="<%=vtitle %>"><%=vtitle%></th>
    210211              <td>
    211212                <select id="select.<%=grp%>.<%=vld%>" name="<%=validatorId%>">
     
    233234                %>
    234235                <div id="description.<%=validatorId%>"
    235                   class="validatordescription messagecontainer help"><%=HTML.encodeTags(validator.getDescription())%></div>
     236                  class="validatordescription messagecontainer help"><b><%=vtitle%></b><br><%=HTML.encodeTags(validator.getDescription())%></div>
    236237              </td>
    237238            </tr>
  • trunk/www/include/styles/main.css

    r6835 r6960  
    219219}
    220220
    221 .interactable.disabled, label.disabled
     221.interactable.disabled, label.disabled, .link.disabled
    222222{
    223223  color: #666666;
    224224}
    225225
    226 .interactable.disabled img, img.disabled
     226.interactable.disabled img, img.disabled, .link.disabled img
    227227{
    228228  opacity: 0.5;
Note: See TracChangeset for help on using the changeset viewer.