Repository: nifi
Updated Branches:
  refs/heads/master e2f649cfe -> d094130a2


NIFI-2237:
Extend template handling to read only properties.
* Add read only property handling to type.hbs template.
* Add flag to ProcessorDTO.getRelationships to reflect read only nature of the 
property.
* Remove explicit "read only" message from 
ConnectionDTO.getAvailableRelationships to avoid duplicate text.
* This closes #806


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/d094130a
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/d094130a
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/d094130a

Branch: refs/heads/master
Commit: d094130a2694c1e0d3aa0538a01ed733f943d2e7
Parents: e2f649c
Author: Joe Skora <jsk...@gmail.com>
Authored: Sun Aug 7 22:13:13 2016 -0400
Committer: Matt Gilman <matt.c.gil...@gmail.com>
Committed: Mon Aug 8 09:06:47 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java | 2 +-
 .../src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java  | 3 ++-
 .../nifi-web/nifi-web-api/src/main/resources/templates/type.hbs  | 4 +++-
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/d094130a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
index f2388c0..79e3cdf 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ConnectionDTO.java
@@ -149,7 +149,7 @@ public class ConnectionDTO extends ComponentDTO {
      * @return relationships that the source of the connection currently 
supports. This property is read only
      */
     @ApiModelProperty(
-            value = "The relationships that the source of the connection 
currently supports. This property is read only.",
+            value = "The relationships that the source of the connection 
currently supports.",
             readOnly = true
     )
     public Set<String> getAvailableRelationships() {

http://git-wip-us.apache.org/repos/asf/nifi/blob/d094130a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java
index dbd06a3..6a2b22c 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java
@@ -185,7 +185,8 @@ public class ProcessorDTO extends ComponentDTO {
      * @return The available relationships
      */
     @ApiModelProperty(
-            value = "The available relationships that the processor currently 
supports."
+            value = "The available relationships that the processor currently 
supports.",
+            readOnly = true
     )
     public List<RelationshipDTO> getRelationships() {
         return relationships;

http://git-wip-us.apache.org/repos/asf/nifi/blob/d094130a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/type.hbs
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/type.hbs
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/type.hbs
index d64610d..f6f117b 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/type.hbs
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/type.hbs
@@ -43,7 +43,9 @@
                         {{/ifeq}}
                     </td>
                     
<td>{{#required}}required{{/required}}{{^required}}optional{{/required}}</td>
-                    <td>{{#description}}{{{description}}}{{/description}}{{#if 
enum}} Allowable values: {{join enum ", "}}{{/if}}</td>
+                    <td>{{#description}}{{{description}}}{{/description}}
+                        {{#if enum}} Allowable values: {{join enum ", 
"}}{{/if}}
+                        {{#if readOnly}} This property is read 
only.{{/if}}</td>
                 </tr>
             {{/each}}
         </table>

Reply via email to