Repository: nifi
Updated Branches:
  refs/heads/master cb76e67a3 -> aae632560


NIFI-2237: - Reorganizing the refactored REST endpoints. - Tweaking message 
text.

This closes #788.

Signed-off-by: Bryan Bende <[email protected]>


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

Branch: refs/heads/master
Commit: aae6325603aa191173b6f34545bf7111c960be6e
Parents: cb76e67
Author: Matt Gilman <[email protected]>
Authored: Thu Aug 4 10:37:42 2016 -0400
Committer: Bryan Bende <[email protected]>
Committed: Tue Aug 9 12:04:31 2016 -0400

----------------------------------------------------------------------
 .../nifi-web/nifi-web-api/pom.xml               |   2 +-
 .../nifi/web/api/ApplicationResource.java       |   2 +-
 .../nifi/web/api/ProcessGroupResource.java      |   7 +-
 .../apache/nifi/web/api/SnippetResource.java    |   6 +-
 .../src/main/resources/templates/index.html.hbs | 157 ++++++++++++++-----
 5 files changed, 128 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/aae63256/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
index 9024835..4a2637e 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
@@ -78,7 +78,7 @@
                                         <description>
                                             The Rest Api provides programmatic 
access to command and control a NiFi instance in real time. Start and 
                                             stop processors, monitor queues, 
query provenance data, and more. Each endpoint below includes a description,
-                                            definitions of the expected input 
and output, potential response codes, and the authorities required
+                                            definitions of the expected input 
and output, potential response codes, and the authorizations required
                                             to invoke each service.
                                         </description>
                                         <contact>

http://git-wip-us.apache.org/repos/asf/nifi/blob/aae63256/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
index aa057fe..aeffa89 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java
@@ -95,7 +95,7 @@ public abstract class ApplicationResource {
     public static final String PROXY_PORT_HTTP_HEADER = "X-ProxyPort";
     public static final String PROXY_CONTEXT_PATH_HTTP_HEADER = 
"X-ProxyContextPath";
 
-    protected static final String NON_GUARANTEED_ENDPOINT = "Note: This 
endpoint is subject to change as the NiFi and it's REST API evolve.";
+    protected static final String NON_GUARANTEED_ENDPOINT = "Note: This 
endpoint is subject to change as NiFi and it's REST API evolve.";
 
     private static final Logger logger = 
LoggerFactory.getLogger(ApplicationResource.class);
 

http://git-wip-us.apache.org/repos/asf/nifi/blob/aae63256/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
index 0ececa1..d9055c9 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
@@ -320,7 +320,8 @@ public class ProcessGroupResource extends 
ApplicationResource {
             value = "Deletes a process group",
             response = ProcessGroupEntity.class,
             authorizations = {
-                    @Authorization(value = "Write - /process-groups/{uuid}", 
type = "")
+                    @Authorization(value = "Write - /process-groups/{uuid}", 
type = ""),
+                    @Authorization(value = "Write - /{component-type}/{uuid} - 
For all encapsulated components", type = "")
             }
     )
     @ApiResponses(
@@ -1638,7 +1639,7 @@ public class ProcessGroupResource extends 
ApplicationResource {
             response = FlowSnippetEntity.class,
             authorizations = {
                     @Authorization(value = "Write - /process-groups/{uuid}", 
type = ""),
-                    @Authorization(value = "Read - /{component-type}/{uuid} - 
For each component in the snippet", type = "")
+                    @Authorization(value = "Read - /{component-type}/{uuid} - 
For each component in the snippet and their descendant components", type = "")
             }
     )
     @ApiResponses(
@@ -1826,7 +1827,7 @@ public class ProcessGroupResource extends 
ApplicationResource {
             response = TemplateEntity.class,
             authorizations = {
                     @Authorization(value = "Write - /process-groups/{uuid}", 
type = ""),
-                    @Authorization(value = "Read - /{component-type}/{uuid} - 
For each component in the snippet", type = "")
+                    @Authorization(value = "Read - /{component-type}/{uuid} - 
For each component in the snippet and their descendant components", type = "")
             }
     )
     @ApiResponses(

http://git-wip-us.apache.org/repos/asf/nifi/blob/aae63256/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
index eab59db..5c34be1 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java
@@ -104,7 +104,7 @@ public class SnippetResource extends ApplicationResource {
             value = "Creates a snippet",
             response = SnippetEntity.class,
             authorizations = {
-                    @Authorization(value = "Read - /{component-type}/{uuid} - 
For each component in the Snippet", type = "")
+                    @Authorization(value = "Read or Write - 
/{component-type}/{uuid} - For every component (all Read or all Write) in the 
Snippet and their descendant components", type = "")
             }
     )
     @ApiResponses(
@@ -188,7 +188,7 @@ public class SnippetResource extends ApplicationResource {
             response = SnippetEntity.class,
             authorizations = {
                     @Authorization(value = "Write Process Group - 
/process-groups/{uuid}", type = ""),
-                    @Authorization(value = "Write - /{component-type}/{uuid} - 
For each component in the Snippet", type = "")
+                    @Authorization(value = "Write - /{component-type}/{uuid} - 
For each component in the Snippet and their descendant components", type = "")
             }
     )
     @ApiResponses(
@@ -267,7 +267,7 @@ public class SnippetResource extends ApplicationResource {
             value = "Deletes the components in a snippet and drops the 
snippet",
             response = SnippetEntity.class,
             authorizations = {
-                    @Authorization(value = "Write - /{component-type}/{uuid} - 
For each component in the Snippet", type = "")
+                    @Authorization(value = "Write - /{component-type}/{uuid} - 
For each component in the Snippet and their descendant components", type = "")
             }
     )
     @ApiResponses(

http://git-wip-us.apache.org/repos/asf/nifi/blob/aae63256/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
index 2e9347e..1dfd484 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs
@@ -425,31 +425,40 @@
                         var endpoints = $(this);
                         var path = endpoints.find('div.path').text();
                         
-                        if (term === null || path.indexOf(term) > 0) {
+                        if (term === null || path.indexOf(term) === 0) {
                             endpoints.detach().appendTo(container);
                         }
                     });
                 };
                 
                 // organize the endpoints
-                organizeEndpoints('cluster', $('#cluster-endpoints'));
-                organizeEndpoints('provenance', $('#provenance-endpoints'));
-                organizeEndpoints('user', $('#user-endpoints'));
-                organizeEndpoints('controller-services', 
$('#controller-service-endpoints'));
-                organizeEndpoints('reporting-tasks', 
$('#reporting-task-endpoints'));
-                organizeEndpoints('connections', $('#connection-endpoints'));
-                organizeEndpoints('processors', $('#processor-endpoints'));
-                organizeEndpoints('funnels', $('#funnel-endpoints'));
-                organizeEndpoints('remote-process-groups', 
$('#remote-process-group-endpoints'));
-                organizeEndpoints('input-ports', $('#input-port-endpoints'));
-                organizeEndpoints('output-ports', $('#output-port-endpoints'));
-                organizeEndpoints('labels', $('#label-endpoints'));
-                organizeEndpoints('process-groups', 
$('#process-group-endpoints'));
-                organizeEndpoints('history', $('#history-endpoints'));
-                organizeEndpoints('access', $('#access-endpoints'));
+                organizeEndpoints('/process-groups', 
$('#process-group-endpoints'));
+                organizeEndpoints('/controller-services', 
$('#controller-service-endpoints'));
+                organizeEndpoints('/reporting-tasks', 
$('#reporting-task-endpoints'));
+                organizeEndpoints('/counters', $('#counter-endpoints'));
+                organizeEndpoints('/controller', $('#controller-endpoints'));
+                organizeEndpoints('/connections', $('#connection-endpoints'));
+                organizeEndpoints('/flowfile-queue', 
$('#flowfile-queue-endpoints'));
+                organizeEndpoints('/processors', $('#processor-endpoints'));
+                organizeEndpoints('/funnels', $('#funnel-endpoints'));
+                organizeEndpoints('/remote-process-groups', 
$('#remote-process-group-endpoints'));
+                organizeEndpoints('/input-ports', $('#input-port-endpoints'));
+                organizeEndpoints('/output-ports', 
$('#output-port-endpoints'));
+                organizeEndpoints('/labels', $('#label-endpoints'));
+                organizeEndpoints('/access', $('#access-endpoints'));
+                organizeEndpoints('/flow', $('#flow-endpoints'));
+                organizeEndpoints('/provenance-events', 
$('#provenance-event-endpoints'));
+                organizeEndpoints('/provenance', $('#provenance-endpoints'));
+                organizeEndpoints('/tenants', $('#tenant-endpoints'));
+                organizeEndpoints('/data-transfer', 
$('#data-transfer-endpoints'));
+                organizeEndpoints('/policies', $('#policy-endpoints'));
+                organizeEndpoints('/resources', $('#resource-endpoints'));
+                organizeEndpoints('/site-to-site', 
$('#site-to-site-endpoints'));
+                organizeEndpoints('/snippets', $('#snippet-endpoints'));
+                organizeEndpoints('/system', 
$('#system-diagnostic-endpoints'));
+                organizeEndpoints('/templates', $('#template-endpoints'));
                 organizeEndpoints(null, $('#controller-endpoints'));
-                
-                
+
                 // handle expanding/collapsing the sections
                 $('div.section-header > div.title').on('click', function() {
                     
$(this).parent('div.section-header').next('div.section-endpoints').slideToggle();
@@ -477,15 +486,47 @@
         <div class="section">
             <div class="section-header">
                 <div class="title link">Controller</div>
-                <div class="sub-title section-description">Get controller 
configuration, Search the flow, Manage templates, System diagnostics</div>
+                <div class="sub-title section-description">Get controller 
configuration, Manage the cluster, Create reporting tasks</div>
                 <div class="clear"></div>
             </div>
             <div id="controller-endpoints" class="section-endpoints 
hidden"></div>
         </div>
         <div class="section">
             <div class="section-header">
+                <div class="title link">Controller Services</div>
+                <div class="sub-title section-description">Manage controller 
services, Update controller service references</div>
+                <div class="clear"></div>
+            </div>
+            <div id="controller-service-endpoints" class="section-endpoints 
hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Reporting Tasks</div>
+                <div class="sub-title section-description">Manage reporting 
tasks</div>
+                <div class="clear"></div>
+            </div>
+            <div id="reporting-task-endpoints" class="section-endpoints 
hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Counters</div>
+                <div class="sub-title section-description">Get counters, Reset 
counters</div>
+                <div class="clear"></div>
+            </div>
+            <div id="counter-endpoints" class="section-endpoints hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Flow</div>
+                <div class="sub-title section-description">Get the data flow, 
Obtain component status, Query history</div>
+                <div class="clear"></div>
+            </div>
+            <div id="flow-endpoints" class="section-endpoints hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
                 <div class="title link">Process Groups</div>
-                <div class="sub-title section-description">Get the flow, 
Instantiate a template, Manage sub groups, Monitor component status</div>
+                <div class="sub-title section-description">Create components, 
Instantiate a template, Upload a template</div>
                 <div class="clear"></div>
             </div>
             <div id="process-group-endpoints" class="section-endpoints 
hidden"></div>
@@ -508,6 +549,14 @@
         </div>
         <div class="section">
             <div class="section-header">
+                <div class="title link">FlowFile Queues</div>
+                <div class="sub-title section-description">View queue 
contents, Download flowfile content, Empty queue</div>
+                <div class="clear"></div>
+            </div>
+            <div id="flowfile-queue-endpoints" class="section-endpoints 
hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
                 <div class="title link">Input Ports</div>
                 <div class="sub-title section-description">Create an input 
port, Set remote port access control</div>
                 <div class="clear"></div>
@@ -548,51 +597,83 @@
         </div>
         <div class="section">
             <div class="section-header">
-                <div class="title link">Controller Services</div>
-                <div class="sub-title section-description">Manage controller 
services, Update controller service references</div>
+                <div class="title link">Provenance</div>
+                <div class="sub-title section-description">Query provenance, 
Search event lineage</div>
                 <div class="clear"></div>
             </div>
-            <div id="controller-service-endpoints" class="section-endpoints 
hidden"></div>
+            <div id="provenance-endpoints" class="section-endpoints 
hidden"></div>
         </div>
         <div class="section">
             <div class="section-header">
-                <div class="title link">Reporting Tasks</div>
-                <div class="sub-title section-description">Manage reporting 
tasks</div>
+                <div class="title link">Provenance Events</div>
+                <div class="sub-title section-description">Download content, 
Replay</div>
                 <div class="clear"></div>
             </div>
-            <div id="reporting-task-endpoints" class="section-endpoints 
hidden"></div>
+            <div id="provenance-event-endpoints" class="section-endpoints 
hidden"></div>
         </div>
         <div class="section">
             <div class="section-header">
-                <div class="title link">Cluster</div>
-                <div class="sub-title section-description">View node status, 
Disconnect nodes, Aggregate component status</div>
+                <div class="title link">Tenants</div>
+                <div class="sub-title section-description">Add users and 
group, Group users</div>
                 <div class="clear"></div>
             </div>
-            <div id="cluster-endpoints" class="section-endpoints hidden"></div>
+            <div id="tenant-endpoints" class="section-endpoints hidden"></div>
         </div>
         <div class="section">
             <div class="section-header">
-                <div class="title link">Provenance</div>
-                <div class="sub-title section-description">Query provenance, 
Search event lineage, Download content, Replay</div>
+                <div class="title link">Policies</div>
+                <div class="sub-title section-description">Get policies, 
Create policies</div>
                 <div class="clear"></div>
             </div>
-            <div id="provenance-endpoints" class="section-endpoints 
hidden"></div>
+            <div id="policy-endpoints" class="section-endpoints hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Resources</div>
+                <div class="sub-title section-description">Get resources</div>
+                <div class="clear"></div>
+            </div>
+            <div id="resource-endpoints" class="section-endpoints 
hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Site to Site</div>
+                <div class="sub-title section-description">Get available 
ports, Get peers</div>
+                <div class="clear"></div>
+            </div>
+            <div id="site-to-site-endpoints" class="section-endpoints 
hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Data Transfer</div>
+                <div class="sub-title section-description">Send data, Receive 
data</div>
+                <div class="clear"></div>
+            </div>
+            <div id="data-transfer-endpoints" class="section-endpoints 
hidden"></div>
+        </div>
+        <div class="section">
+            <div class="section-header">
+                <div class="title link">Snippets</div>
+                <div class="sub-title section-description">Create a snippet, 
Move a snippet, Delete a snippet</div>
+                <div class="clear"></div>
+            </div>
+            <div id="snippet-endpoints" class="section-endpoints hidden"></div>
         </div>
         <div class="section">
             <div class="section-header">
-                <div class="title link">History</div>
-                <div class="sub-title section-description">View flow history, 
Purge flow history</div>
+                <div class="title link">Templates</div>
+                <div class="sub-title section-description">Download a 
template, Delete a template</div>
                 <div class="clear"></div>
             </div>
-            <div id="history-endpoints" class="section-endpoints hidden"></div>
+            <div id="template-endpoints" class="section-endpoints 
hidden"></div>
         </div>
         <div class="section">
             <div class="section-header">
-                <div class="title link">Users</div>
-                <div class="sub-title section-description">Update user access, 
revoke accounts, get account details, Group users</div>
+                <div class="title link">System Diagnostics</div>
+                <div class="sub-title section-description">Get system 
diagnostics</div>
                 <div class="clear"></div>
             </div>
-            <div id="user-endpoints" class="section-endpoints hidden"></div>
+            <div id="system-diagnostic-endpoints" class="section-endpoints 
hidden"></div>
         </div>
         <div class="unorganized hidden">
             {{#each paths}}

Reply via email to