You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/01/27 19:53:25 UTC
[2/3] incubator-nifi git commit: NIFI-250: - Creating a jQuery plugin
for rendering a table of properties (since we now want to configure
processors, controller services, and reporting tasks).
NIFI-250:
- Creating a jQuery plugin for rendering a table of properties (since we now want to configure processors, controller services, and reporting tasks).
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/ec082f1e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/ec082f1e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/ec082f1e
Branch: refs/heads/NIFI-250
Commit: ec082f1eead6b37e3b26e579f958cc0cde154d22
Parents: cb84829
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Jan 27 13:52:42 2015 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Tue Jan 27 13:52:42 2015 -0500
----------------------------------------------------------------------
.../nifi-framework/nifi-web/nifi-web-ui/pom.xml | 3 +-
.../main/resources/filters/canvas.properties | 2 +-
.../src/main/webapp/WEB-INF/pages/canvas.jsp | 4 +-
.../canvas/controller-service-configuration.jsp | 80 +++
.../canvas/new-controller-service-dialog.jsp | 7 -
.../canvas/new-processor-property-dialog.jsp | 34 -
.../partials/canvas/new-property-dialog.jsp | 34 +
.../partials/canvas/processor-configuration.jsp | 18 +-
.../nifi-web-ui/src/main/webapp/css/canvas.css | 1 +
.../css/controller-service-configuration.css | 120 ++++
.../nifi-web-ui/src/main/webapp/css/dialog.css | 10 -
.../css/new-controller-service-dialog.css | 10 +-
.../main/webapp/css/processor-configuration.css | 83 ---
.../main/webapp/images/buttonNewProperty.png | Bin 590 -> 0 bytes
.../src/main/webapp/images/iconUndo.png | Bin 642 -> 0 bytes
.../jquery/propertytable/buttonNewProperty.png | Bin 0 -> 590 bytes
.../propertytable/jquery.propertytable.css | 108 ++++
.../propertytable/jquery.propertytable.js | 628 +++++++++++++++++++
.../js/jquery/tagcloud/jquery.tagcloud.js | 10 -
.../src/main/webapp/js/nf/canvas/nf-canvas.js | 1 +
.../nf-controller-service-configuration.js | 345 ++++++++++
.../js/nf/canvas/nf-processor-configuration.js | 81 +--
.../nf-processor-property-combo-editor.js | 19 +-
.../canvas/nf-processor-property-nfel-editor.js | 18 +-
.../js/nf/canvas/nf-processor-property-table.js | 567 -----------------
.../canvas/nf-processor-property-text-editor.js | 16 +-
.../src/main/webapp/js/nf/canvas/nf-settings.js | 132 +++-
.../src/main/webapp/js/nf/nf-common.js | 66 ++
.../main/webapp/js/nf/nf-processor-details.js | 17 +-
29 files changed, 1578 insertions(+), 836 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
index 0df26b1..cd4152f 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
@@ -267,10 +267,10 @@
<include>${staging.dir}/js/nf/canvas/nf-canvas-toolbox.js</include>
<include>${staging.dir}/js/nf/canvas/nf-custom-processor-ui.js</include>
<include>${staging.dir}/js/nf/canvas/nf-registration.js</include>
- <include>${staging.dir}/js/nf/canvas/nf-processor-property-table.js</include>
<include>${staging.dir}/js/nf/canvas/nf-processor-property-text-editor.js</include>
<include>${staging.dir}/js/nf/canvas/nf-processor-property-nfel-editor.js</include>
<include>${staging.dir}/js/nf/canvas/nf-processor-property-combo-editor.js</include>
+ <include>${staging.dir}/js/nf/canvas/nf-controller-service-configuration.js</include>
<include>${staging.dir}/js/nf/canvas/nf-processor-configuration.js</include>
<include>${staging.dir}/js/nf/nf-processor-details.js</include>
<include>${staging.dir}/js/nf/canvas/nf-process-group-configuration.js</include>
@@ -406,6 +406,7 @@
<insertNewLine>true</insertNewLine>
<output>${project.build.directory}/${project.build.finalName}/css/nf-canvas-all.css</output>
<includes>
+ <include>${staging.dir}/css/controller-service-configuration.css</include>
<include>${staging.dir}/css/processor-configuration.css</include>
<include>${staging.dir}/css/processor-details.css</include>
<include>${staging.dir}/css/process-group-configuration.css</include>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
index 056a2af..eba3a0e 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
@@ -24,10 +24,10 @@ nf.canvas.script.tags=<script type="text/javascript" src="js/nf/nf-namespace.js?
<script type="text/javascript" src="js/nf/canvas/nf-canvas-toolbox.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-custom-processor-ui.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-registration.js?${project.version}"></script>\n\
-<script type="text/javascript" src="js/nf/canvas/nf-processor-property-table.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-processor-property-text-editor.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-processor-property-nfel-editor.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-processor-property-combo-editor.js?${project.version}"></script>\n\
+<script type="text/javascript" src="js/nf/canvas/nf-controller-service-configuration.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-processor-configuration.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/nf-processor-details.js?${project.version}"></script>\n\
<script type="text/javascript" src="js/nf/canvas/nf-process-group-configuration.js?${project.version}"></script>\n\
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
index 13079e5..9afc26c 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
@@ -29,6 +29,7 @@
<link rel="stylesheet" href="js/jquery/nfeditor/languages/nfel.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
+ <link rel="stylesheet" href="js/jquery/propertytable/jquery.propertytable.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/tagcloud/jquery.tagcloud.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
@@ -46,6 +47,7 @@
<script type="text/javascript" src="js/jquery/jquery.tab.js"></script>
<script type="text/javascript" src="js/jquery/tabbs/jquery.tabbs.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/combo/jquery.combo.js?${project.version}"></script>
+ <script type="text/javascript" src="js/jquery/propertytable/jquery.propertytable.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/tagcloud/jquery.tagcloud.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/modal/jquery.modal.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/minicolors/jquery.minicolors.min.js"></script>
@@ -85,7 +87,6 @@
<jsp:include page="/WEB-INF/partials/canvas/new-remote-process-group-dialog.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/new-template-dialog.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/instantiate-template-dialog.jsp"/>
- <jsp:include page="/WEB-INF/partials/canvas/new-processor-property-dialog.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/fill-color-dialog.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/connections-dialog.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/flow-status.jsp"/>
@@ -99,6 +100,7 @@
<jsp:include page="/WEB-INF/partials/canvas/navigation.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/settings-content.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/shell.jsp"/>
+ <jsp:include page="/WEB-INF/partials/canvas/controller-service-configuration.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/processor-configuration.jsp"/>
<jsp:include page="/WEB-INF/partials/processor-details.jsp"/>
<jsp:include page="/WEB-INF/partials/canvas/process-group-configuration.jsp"/>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
new file mode 100644
index 0000000..b1454c4
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/controller-service-configuration.jsp
@@ -0,0 +1,80 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
+<div id="controller-service-configuration">
+ <div class="controller-service-configuration-tab-container">
+ <div id="controller-service-configuration-tabs"></div>
+ <div id="controller-service-configuration-tabs-content">
+ <div id="controller-service-standard-settings-tab-content" class="configuration-tab">
+ <div class="settings-left">
+ <div class="setting">
+ <div class="setting-name">Name</div>
+ <div class="setting-field">
+ <input type="text" id="controller-service-name" name="controller-service-name"/>
+ <div class="controller-service-enabled-container">
+ <div id="controller-service-enabled" class="nf-checkbox checkbox-unchecked"></div>
+ <span> Enabled</span>
+ </div>
+ </div>
+ </div>
+ <div class="setting">
+ <div class="setting-name">Id</div>
+ <div class="setting-field">
+ <span id="controller-service-id"></span>
+ </div>
+ </div>
+ <div class="setting">
+ <div class="setting-name">Type</div>
+ <div class="setting-field">
+ <span id="controller-service-type"></span>
+ </div>
+ </div>
+ <div class="setting">
+ <div class="bulletin-setting">
+ <div class="setting-name">
+ Availability
+ <img class="setting-icon icon-info" src="images/iconInfo.png" alt="Info" title="Where this controller service will be available."/>
+ </div>
+ <div class="setting-field">
+ <div id="bulletin-level-combo"></div>
+ </div>
+ </div>
+ <div class="clear"></div>
+ </div>
+ </div>
+ <div class="spacer"> </div>
+ <div class="settings-right">
+ <div class="setting">
+ <div class="setting-name">
+ References
+ <img class="setting-icon icon-info" src="images/iconInfo.png" alt="Info" title="Other comonents referencing this controller service."/>
+ </div>
+ <div class="setting-field">
+ <div id="controller-service-references"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="controller-service-properties-tab-content" class="configuration-tab">
+ <div id="controller-service-properties"></div>
+ </div>
+ <div id="controller-service-comments-tab-content" class="configuration-tab">
+ <textarea cols="30" rows="4" id="controller-service-comments" name="controller-service-comments" class="setting-input"></textarea>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
index f90ab61..b0091a2 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-controller-service-dialog.jsp
@@ -39,13 +39,6 @@
<div id="controller-service-description-container" class="hidden">
<div id="controller-service-type-name" class="ellipsis"></div>
<div id="controller-service-type-description" class="ellipsis multiline"></div>
- <div id="controller-service-name-container">
- <div class="setting-name">Name</div>
- <div class="setting-field">
- <input id="controller-service-name-field" type="text"/>
- </div>
- <div class="clear"></div>
- </div>
<span class="hidden" id="selected-controller-service-name"></span>
<span class="hidden" id="selected-controller-service-type"></span>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-processor-property-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-processor-property-dialog.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-processor-property-dialog.jsp
deleted file mode 100644
index 9f58c2d..0000000
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-processor-property-dialog.jsp
+++ /dev/null
@@ -1,34 +0,0 @@
-<%--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
---%>
-<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
-<div id="processor-property-dialog" class="dialog">
- <div>
- <div class="setting-name">Property name</div>
- <div class="setting-field" id="new-property-name-container">
- <input id="new-property-name" name="new-property-name" type="text"/>
- </div>
- <div class="setting-name" style="margin-top: 36px;">Property value</div>
- <div class="setting-field">
- <div id="new-property-value"></div>
- </div>
- </div>
- <div id="new-property-button-container">
- <div id="new-property-ok" class="button button-normal">Ok</div>
- <div id="new-property-cancel" class="button button-normal">Cancel</div>
- <div class="clear"></div>
- </div>
-</div>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-property-dialog.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-property-dialog.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-property-dialog.jsp
new file mode 100644
index 0000000..ca332b4
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/new-property-dialog.jsp
@@ -0,0 +1,34 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
+<div id="new-property-dialog" class="dialog">
+ <div>
+ <div class="setting-name">Property name</div>
+ <div class="setting-field" id="new-property-name-container">
+ <input id="new-property-name" name="new-property-name" type="text"/>
+ </div>
+ <div class="setting-name" style="margin-top: 36px;">Property value</div>
+ <div class="setting-field">
+ <div id="new-property-value"></div>
+ </div>
+ </div>
+ <div id="new-property-button-container">
+ <div id="new-property-ok" class="button button-normal">Ok</div>
+ <div id="new-property-cancel" class="button button-normal">Cancel</div>
+ <div class="clear"></div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
index 9d9da2a..113f04b 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/processor-configuration.jsp
@@ -19,7 +19,7 @@
<div class="processor-configuration-tab-container">
<div id="processor-configuration-tabs"></div>
<div id="processor-configuration-tabs-content">
- <div id="configuration-standard-settings-tab-content" class="configuration-tab">
+ <div id="processor-standard-settings-tab-content" class="configuration-tab">
<div class="settings-left">
<div class="setting">
<div class="setting-name">Name</div>
@@ -71,7 +71,7 @@
<img class="setting-icon icon-info" src="images/iconInfo.png" alt="Info" title="The level at which this processor will generate bulletins."/>
</div>
<div class="setting-field">
- <div type="text" id="bulletin-level-combo"></div>
+ <div id="bulletin-level-combo"></div>
</div>
</div>
<div class="clear"></div>
@@ -90,7 +90,7 @@
</div>
</div>
</div>
- <div id="configuration-scheduling-tab-content" class="configuration-tab">
+ <div id="processor-scheduling-tab-content" class="configuration-tab">
<div class="settings-left">
<div class="setting">
<div class="scheduling-strategy-setting">
@@ -194,18 +194,10 @@
</div>
</div>
</div>
- <div id="configuration-processor-properties-tab-content" class="configuration-tab">
- <div id="processor-properties-header">
- <div id="required-property-note">Required field</div>
- <div id="add-property">
- <div id="add-property-icon" class="add-icon-bg"></div>
- <div id="add-text">New property</div>
- </div>
- <div class="clear"></div>
- </div>
+ <div id="processor-properties-tab-content" class="configuration-tab">
<div id="processor-properties"></div>
</div>
- <div id="configuration-comments-tab-content" class="configuration-tab">
+ <div id="processor-comments-tab-content" class="configuration-tab">
<textarea cols="30" rows="4" id="processor-comments" name="processor-comments" class="setting-input"></textarea>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/canvas.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/canvas.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/canvas.css
index c988234..a472a42 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/canvas.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/canvas.css
@@ -20,6 +20,7 @@
@import url(process-group-configuration.css);
@import url(process-group-details.css);
@import url(remote-process-group-configuration.css);
+@import url(controller-service-configuration.css);
@import url(port-configuration.css);
@import url(port-details.css);
@import url(label-configuration.css);
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service-configuration.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service-configuration.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service-configuration.css
new file mode 100644
index 0000000..c18a8fb
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/controller-service-configuration.css
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ Controller service configuration styles.
+*/
+
+#controller-service-configuration {
+ position: absolute;
+ overflow: hidden;
+ width: 800px;
+ height: 450px;
+ font-size: 10px;
+ z-index: 1301;
+ display: none;
+ border: 1px solid #eee;
+}
+
+div.controller-service-configuration-tab-container {
+ margin-top: -10px;
+ padding: 5px 11px;
+}
+
+#controller-service-configuration-advanced {
+ display: none;
+}
+
+#controller-service-configuration-tabs {
+ background-color: transparent;
+ width: 778px;
+ height: 21px;
+ border-bottom: 3px solid #666;
+}
+
+#controller-service-configuration div.configuration-tab {
+ height: 320px;
+ overflow: auto;
+ padding: 10px;
+ background: #eee url(../images/bgTabContainer.png) repeat-x;
+ display: none;
+}
+
+/* controller-service settings */
+
+#controller-service-configuration div.settings-left {
+ float: left;
+ width: 330px;
+}
+
+#controller-service-configuration div.settings-right {
+ float: left;
+ width: 382px;
+}
+
+#controller-service-configuration div.spacer {
+ float: left;
+ margin-right: 40px;
+}
+
+#controller-service-configuration .setting-input {
+ font-size: 11px !important;
+ width: 320px;
+}
+
+#controller-service-configuration .small-setting-input {
+ font-size: 11px !important;
+ width: 130px;
+}
+
+#controller-service-name {
+ font-size: 11px !important;
+ width: 250px;
+ float: left;
+}
+
+#controller-service-enabled {
+ width: 12px;
+ height: 12px;
+ float: left;
+ margin-right: 4px;
+}
+
+div.controller-service-enabled-container {
+ float: left;
+ margin-top: 5px;
+ margin-left: 10px;
+}
+
+#controller-service-references {
+ border: 0 solid #CCCCCC;
+ height: 280px;
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 2px;
+ width: 376px;
+}
+
+/*
+ Comments
+*/
+
+#controller-service-comments {
+ height: 250px;
+ width: 748px !important;
+ margin-top: 10px;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
index 56e6580..b7bc388 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/dialog.css
@@ -66,16 +66,6 @@
width: 320px;
}
-#processor-property-dialog {
- z-index: 1301;
- display: none;
- border: 1px solid #eee;
- padding: 10px;
- border: 3px solid #365C6A;
- box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.9);
- cursor: move;
-}
-
#alias-dialog {
z-index: 1301;
display: none;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
index 962f2b0..9a9a199 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/new-controller-service-dialog.css
@@ -56,18 +56,10 @@
#controller-service-type-description {
width: 588px;
- max-height: 60px;
+ height: 60px;
margin-bottom: 8px;
}
-#controller-service-name-container {
- height: 45px;
-}
-
-#controller-service-name-field {
- width: 285px;
-}
-
#controller-service-types-table {
width: 586px;
height: 249px;
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
index add52e0..6d04834 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/processor-configuration.css
@@ -225,89 +225,6 @@ div.relationship-description {
float: right;
}
-/* properties */
-
-#processor-properties-header {
- margin-bottom: 10px;
- height: 19px;
-}
-
-#add-property {
- float: right;
- margin-right: 20px;
-}
-
-#processor-property-dialog .nfel-editor {
- margin-bottom: 35px;
-}
-
-#new-property-name-container {
- position: absolute;
- height: 25px;
- left: 10px;
- right: 10px;
- padding-right: 10px;
- overflow: hidden;
- margin-bottom: 10px;
-}
-
-#new-property-name {
- height: 14px;
- width: 100%;
-}
-
-#new-property-button-container {
- position: absolute;
- left: 0;
- bottom: 0;
- right: 0;
- padding: 0 8px 10px;
-}
-
-#add-property-icon {
- width: 19px;
- height: 19px;
- cursor: pointer;
- float: left;
-}
-
-div.add-icon-bg {
- background: transparent url(../images/buttonNewProperty.png) no-repeat scroll top left;
-}
-
-div.add-icon-bg-hover {
- background: transparent url(../images/buttonNewProperty.png) no-repeat scroll top right;
-}
-
-#add-text {
- float: left;
- margin-left: 5px;
- height: 19px;
- line-height: 19px;
-}
-
-#required-property-note {
- font-weight: bold;
- float: left;
- height: 19px;
- line-height: 19px;
- margin-left: 6px;
-}
-
-#processor-properties {
- width: 758px;
- height: 290px;
- border-bottom: 1px solid #666;
- background-color: #fff;
-}
-
-#configuration-buttons {
- text-align: center;
- position: absolute;
- right: 10px;
- bottom: 10px;
-}
-
/*
Styles for the processor property editor.
*/
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/buttonNewProperty.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/buttonNewProperty.png b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/buttonNewProperty.png
deleted file mode 100755
index 3e51a15..0000000
Binary files a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/buttonNewProperty.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconUndo.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconUndo.png b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconUndo.png
deleted file mode 100755
index f48895d..0000000
Binary files a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/images/iconUndo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/buttonNewProperty.png
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/buttonNewProperty.png b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/buttonNewProperty.png
new file mode 100755
index 0000000..3e51a15
Binary files /dev/null and b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/buttonNewProperty.png differ
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
new file mode 100644
index 0000000..632ad06
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.css
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ Styles for the property table.
+*/
+
+div.properties-header {
+ margin-bottom: 10px;
+ height: 19px;
+}
+
+div.required-property-note {
+ font-weight: bold;
+ float: left;
+ height: 19px;
+ line-height: 19px;
+ margin-left: 6px;
+}
+
+div.add-property {
+ float: right;
+ margin-right: 20px;
+}
+
+div.add-property-icon {
+ width: 19px;
+ height: 19px;
+ cursor: pointer;
+ float: left;
+}
+
+div.add-icon-bg {
+ background: transparent url(buttonNewProperty.png) no-repeat scroll top left;
+}
+
+div.add-icon-bg-hover {
+ background: transparent url(buttonNewProperty.png) no-repeat scroll top right;
+}
+
+div.add-property-text {
+ float: left;
+ margin-left: 5px;
+ height: 19px;
+ line-height: 19px;
+}
+
+div.property-table {
+ width: 758px;
+ height: 290px;
+ border-bottom: 1px solid #666;
+ background-color: #fff;
+}
+
+/*
+ New property dialog
+*/
+
+div.new-property-dialog {
+ z-index: 1301;
+ display: none;
+ border: 1px solid #eee;
+ padding: 10px;
+ border: 3px solid #365C6A;
+ box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.9);
+ cursor: move;
+}
+
+div.new-property-dialog .nfel-editor {
+ margin-bottom: 35px;
+}
+
+div.new-property-name-container {
+ position: absolute;
+ height: 25px;
+ left: 10px;
+ right: 10px;
+ padding-right: 10px;
+ overflow: hidden;
+ margin-bottom: 10px;
+}
+
+input.new-property-name {
+ height: 14px;
+ width: 100%;
+}
+
+div.new-property-button-container {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ padding: 0 8px 10px;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
new file mode 100644
index 0000000..479499d
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js
@@ -0,0 +1,628 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Create a property table. The options are specified in the following
+ * format:
+ *
+ * {
+ * tags: ['attributes', 'copy', 'regex', 'xml', 'copy', 'xml', 'attributes'],
+ * select: selectHandler,
+ * remove: removeHandler
+ * }
+ */
+
+/**
+ * jQuery plugin for a property table.
+ *
+ * @param {type} $
+ */
+(function ($) {
+ var languageId = 'nfel';
+ var editorClass = languageId + '-editor';
+
+ var isUndefined = function (obj) {
+ return typeof obj === 'undefined';
+ };
+
+ var isNull = function (obj) {
+ return obj === null;
+ };
+
+ var isDefinedAndNotNull = function (obj) {
+ return !isUndefined(obj) && !isNull(obj);
+ };
+
+ var isBlank = function (str) {
+ return isUndefined(str) || isNull(str) || str === '';
+ };
+
+ var initPropertiesTable = function (table, options) {
+ // function for formatting the property name
+ var nameFormatter = function (row, cell, value, columnDef, dataContext) {
+ var nameWidthOffset = 10;
+ var cellContent = $('<div></div>');
+
+ // format the contents
+ var formattedValue = $('<span/>').addClass('table-cell').text(value).appendTo(cellContent);
+ if (dataContext.type === 'required') {
+ formattedValue.addClass('required');
+ }
+
+ // get the property descriptor
+ var descriptors = table.data('descriptors');
+ var propertyDescriptor = descriptors[dataContext.property];
+
+ // show the property description if applicable
+ if (nf.Common.isDefinedAndNotNull(propertyDescriptor)) {
+ if (!nf.Common.isBlank(propertyDescriptor.description) || !nf.Common.isBlank(propertyDescriptor.defaultValue) || !nf.Common.isBlank(propertyDescriptor.supportsEl)) {
+ $('<img class="icon-info" src="images/iconInfo.png" alt="Info" title="" style="float: right; margin-right: 6px; margin-top: 4px;" />').appendTo(cellContent);
+ $('<span class="hidden property-descriptor-name"></span>').text(dataContext.property).appendTo(cellContent);
+ nameWidthOffset = 26; // 10 + icon width (10) + icon margin (6)
+ }
+ }
+
+ // adjust the width accordingly
+ formattedValue.width(columnDef.width - nameWidthOffset).ellipsis();
+
+ // return the cell content
+ return cellContent.html();
+ };
+
+ // function for formatting the property value
+ var valueFormatter = function (row, cell, value, columnDef, dataContext) {
+ var valueMarkup;
+ if (nf.Common.isDefinedAndNotNull(value)) {
+ // get the property descriptor
+ var descriptors = table.data('descriptors');
+ var propertyDescriptor = descriptors[dataContext.property];
+
+ // determine if the property is sensitive
+ if (nf.Common.isSensitiveProperty(propertyDescriptor)) {
+ valueMarkup = '<span class="table-cell sensitive">Sensitive value set</span>';
+ } else {
+ // if there are allowable values, attempt to swap out for the display name
+ var allowableValues = nf.Common.getAllowableValues(propertyDescriptor);
+ if ($.isArray(allowableValues)) {
+ $.each(allowableValues, function (_, allowableValue) {
+ if (value === allowableValue.value) {
+ value = allowableValue.displayName;
+ return false;
+ }
+ });
+ }
+
+ if (value === '') {
+ valueMarkup = '<span class="table-cell blank">Empty string set</span>';
+ } else {
+ valueMarkup = '<div class="table-cell value"><pre class="ellipsis">' + nf.Common.escapeHtml(value) + '</pre></div>';
+ }
+ }
+ } else {
+ valueMarkup = '<span class="unset">No value set</span>';
+ }
+
+ // format the contents
+ var content = $(valueMarkup);
+ if (dataContext.type === 'required') {
+ content.addClass('required');
+ }
+ content.find('.ellipsis').width(columnDef.width - 10).ellipsis();
+
+ // return the appropriate markup
+ return $('<div/>').append(content).html();
+ };
+
+ var processorConfigurationColumns = [
+ {id: 'property', field: 'displayName', name: 'Property', sortable: false, resizable: true, rerenderOnResize: true, formatter: nameFormatter},
+ {id: 'value', field: 'value', name: 'Value', sortable: false, resizable: true, cssClass: 'pointer', rerenderOnResize: true, formatter: valueFormatter}
+ ];
+
+ if (options.readOnly !== true) {
+ // custom formatter for the actions column
+ var actionFormatter = function (row, cell, value, columnDef, dataContext) {
+ var markup = '';
+
+ // allow user defined properties to be removed
+ if (dataContext.type === 'userDefined') {
+ markup = '<img src="images/iconDelete.png" title="Delete" class="delete-property pointer" style="margin-top: 2px" />';
+ }
+
+ return markup;
+ };
+ processorConfigurationColumns.push({id: "actions", name: " ", minWidth: 20, width: 20, formatter: actionFormatter});
+ }
+
+ var propertyConfigurationOptions = {
+ forceFitColumns: true,
+ enableTextSelectionOnCells: true,
+ enableCellNavigation: true,
+ enableColumnReorder: false,
+ editable: true,
+ enableAddRow: false,
+ autoEdit: false
+ };
+
+ // initialize the dataview
+ var propertyData = new Slick.Data.DataView({
+ inlineFilters: false
+ });
+ propertyData.setItems([]);
+ propertyData.setFilterArgs({
+ searchString: '',
+ property: 'hidden'
+ });
+ propertyData.setFilter(filter);
+ propertyData.getItemMetadata = function (index) {
+ var item = propertyData.getItem(index);
+
+ // get the property descriptor
+ var descriptors = table.data('descriptors');
+ var propertyDescriptor = descriptors[item.property];
+
+ // support el if specified or unsure yet (likely a dynamic property)
+ if (nf.Common.isUndefinedOrNull(propertyDescriptor) || nf.Common.supportsEl(propertyDescriptor)) {
+ return {
+ columns: {
+ value: {
+ editor: nf.ProcessorPropertyNfelEditor
+ }
+ }
+ };
+ } else {
+ // check for allowable values which will drive which editor to use
+ var allowableValues = nf.Common.getAllowableValues(propertyDescriptor);
+ if ($.isArray(allowableValues)) {
+ return {
+ columns: {
+ value: {
+ editor: nf.ProcessorPropertyComboEditor
+ }
+ }
+ };
+ } else {
+ return {
+ columns: {
+ value: {
+ editor: nf.ProcessorPropertyTextEditor
+ }
+ }
+ };
+ }
+ }
+ };
+
+ // initialize the grid
+ var propertyGrid = new Slick.Grid(table, propertyData, processorConfigurationColumns, propertyConfigurationOptions);
+ propertyGrid.setSelectionModel(new Slick.RowSelectionModel());
+ propertyGrid.onClick.subscribe(function (e, args) {
+ if (propertyGrid.getColumns()[args.cell].id === 'value') {
+ // edits the clicked cell
+ propertyGrid.gotoCell(args.row, args.cell, true);
+
+ // prevents standard edit logic
+ e.stopImmediatePropagation();
+ } else if (propertyGrid.getColumns()[args.cell].id === 'actions') {
+ var target = $(e.target);
+ if (target.hasClass('delete-property')) {
+ // mark the property in question for removal
+ var property = propertyData.getItem(args.row);
+ property.hidden = true;
+
+ // refresh the table
+ propertyData.updateItem(property.id, property);
+
+ // prevents standard edit logic
+ e.stopImmediatePropagation();
+ }
+ }
+ });
+
+ // wire up the dataview to the grid
+ propertyData.onRowCountChanged.subscribe(function (e, args) {
+ propertyGrid.updateRowCount();
+ propertyGrid.render();
+ });
+ propertyData.onRowsChanged.subscribe(function (e, args) {
+ propertyGrid.invalidateRows(args.rows);
+ propertyGrid.render();
+ });
+
+ // hold onto an instance of the grid and listen for mouse events to add tooltips where appropriate
+ table.data('gridInstance', propertyGrid).on('mouseenter', 'div.slick-cell', function (e) {
+ var infoIcon = $(this).find('img.icon-info');
+ if (infoIcon.length && !infoIcon.data('qtip')) {
+ var property = $(this).find('span.property-descriptor-name').text();
+
+ // get the property descriptor
+ var descriptors = table.data('descriptors');
+ var propertyDescriptor = descriptors[property];
+
+ // get the processor history
+ var history = table.data('history');
+ var propertyHistory = history[property];
+
+ // format the tooltip
+ var tooltip = nf.Common.formatPropertyTooltip(propertyDescriptor, propertyHistory);
+
+ if (nf.Common.isDefinedAndNotNull(tooltip)) {
+ infoIcon.qtip($.extend({
+ content: tooltip
+ }, nf.Common.config.tooltipConfig));
+ }
+ }
+ });
+ };
+
+ var saveRow = function (table) {
+ // get the property grid to commit the current edit
+ var propertyGrid = table.data('gridInstance');
+ if (nf.Common.isDefinedAndNotNull(propertyGrid)) {
+ var editController = propertyGrid.getEditController();
+ editController.commitCurrentEdit();
+ }
+ };
+
+ /**
+ * Performs the filtering.
+ *
+ * @param {object} item The item subject to filtering
+ * @param {object} args Filter arguments
+ * @returns {Boolean} Whether or not to include the item
+ */
+ var filter = function (item, args) {
+ return item.hidden === false;
+ };
+
+ /**
+ * Loads the specified properties.
+ *
+ * @param {type} table
+ * @param {type} properties
+ * @param {type} descriptors
+ * @param {type} history
+ */
+ var loadProperties = function (table, properties, descriptors, history) {
+ // save the descriptors and history
+ table.data({
+ 'descriptors': descriptors,
+ 'history': history
+ });
+
+ // get the grid
+ var propertyGrid = table.data('gridInstance');
+ var propertyData = propertyGrid.getData();
+
+ // generate the properties
+ if (nf.Common.isDefinedAndNotNull(properties)) {
+ propertyData.beginUpdate();
+
+ var i = 0;
+ $.each(properties, function (name, value) {
+ // get the property descriptor
+ var descriptor = descriptors[name];
+
+ // determine the property type
+ var type = 'userDefined';
+ var displayName = name;
+ if (nf.Common.isDefinedAndNotNull(descriptor)) {
+ if (nf.Common.isRequiredProperty(descriptor)) {
+ type = 'required';
+ } else if (nf.Common.isDynamicProperty(descriptor)) {
+ type = 'userDefined';
+ } else {
+ type = 'optional';
+ }
+
+ // use the display name if possible
+ displayName = descriptor.displayName;
+
+ // determine the value
+ if (nf.Common.isNull(value) && nf.Common.isDefinedAndNotNull(descriptor.defaultValue)) {
+ value = descriptor.defaultValue;
+ }
+ }
+
+ // add the row
+ propertyData.addItem({
+ id: i++,
+ hidden: false,
+ property: name,
+ displayName: displayName,
+ previousValue: value,
+ value: value,
+ type: type
+ });
+ });
+
+ propertyData.endUpdate();
+ }
+ };
+
+ var methods = {
+
+ /**
+ * Initializes the tag cloud.
+ *
+ * @argument {object} options The options for the tag cloud
+ */
+ init: function (options) {
+ return this.each(function () {
+ // ensure the options have been properly specified
+ if (isDefinedAndNotNull(options)) {
+ // get the tag cloud
+ var propertyTableContainer = $(this);
+
+ // clear any current contents, remote events, and store options
+ propertyTableContainer.empty().unbind().data('options', options);
+
+ // build the component
+ var header = $('<div class="properties-header"></div>').appendTo(propertyTableContainer);
+ $('<div class="required-property-note">Required field</div>').appendTo(header);
+
+ // build the table
+ var table = $('<div class="property-table"></div>').appendTo(propertyTableContainer);
+
+ // optionally add a add new property button
+ if (options.readOnly !== true) {
+ // build the new property dialog
+ var newPropertyDialogMarkup = '<div class="new-property-dialog dialog">' +
+ '<div>' +
+ '<div class="setting-name">Property name</div>' +
+ '<div class="setting-field new-property-name-container">' +
+ '<input class="new-property-name" type="text"/>' +
+ '</div>' +
+ '<div class="setting-name" style="margin-top: 36px;">Property value</div>' +
+ '<div class="setting-field">' +
+ '<div class="new-property-value"></div>' +
+ '</div>' +
+ '</div>' +
+ '<div class="new-property-button-container">' +
+ '<div class="new-property-ok button button-normal">Ok</div>' +
+ '<div class="new-property-cancel button button-normal">Cancel</div>' +
+ '<div class="clear"></div>' +
+ '</div>' +
+ '</div>';
+
+ var newPropertyDialog = $(newPropertyDialogMarkup).appendTo(options.newPropertyDialogContainer);
+ var newPropertyNameField = newPropertyDialog.find('input.new-property-name');
+ var newPropertyValueField = newPropertyDialog.find('div.new-property-value');
+
+ var add = function () {
+ var propertyName = $.trim(newPropertyNameField.val());
+ var propertyValue = newPropertyValueField.nfeditor('getValue');
+
+ // ensure the property name and value is specified
+ if (propertyName !== '') {
+ // add a row for the new property
+ var propertyGrid = table.data('gridInstance');
+ var propertyData = propertyGrid.getData();
+ propertyData.addItem({
+ id: propertyData.getLength(),
+ hidden: false,
+ property: propertyName,
+ displayName: propertyName,
+ previousValue: null,
+ value: propertyValue,
+ type: 'userDefined'
+ });
+ } else {
+ nf.Dialog.showOkDialog({
+ dialogContent: 'Property name must be specified.',
+ overlayBackground: false
+ });
+ }
+
+ // close the dialog
+ newPropertyDialog.hide();
+ };
+
+ var cancel = function () {
+ newPropertyDialog.hide();
+ };
+
+ // create the editor
+ newPropertyValueField.addClass(editorClass).nfeditor({
+ languageId: languageId,
+ width: 318,
+ minWidth: 318,
+ height: 106,
+ minHeight: 106,
+ resizable: true,
+ escape: cancel,
+ enter: add
+ });
+
+ // make the new property dialog draggable
+ newPropertyDialog.draggable({
+ cancel: 'input, textarea, pre, .button, .' + editorClass,
+ containment: 'body'
+ }).on('click', 'div.new-property-ok', add).on('click', 'div.new-property-cancel', cancel);
+
+ // enable tabs in the property value
+ newPropertyNameField.on('keydown', function (e) {
+ if (e.which === $.ui.keyCode.ENTER && !e.shiftKey) {
+ add();
+ } else if (e.which === $.ui.keyCode.ESCAPE) {
+ e.preventDefault();
+ cancel();
+ }
+ });
+
+ // build the control to open the new property dialog
+ var addProperty = $('<div class="add-property"></div>').appendTo(header);
+ $('<div class="add-property-icon add-icon-bg"></div>').on('click', function() {
+ // close all fields currently being edited
+ saveRow(table);
+
+ // clear the dialog
+ newPropertyNameField.val('');
+ newPropertyValueField.nfeditor('setValue', '');
+
+ // reset the add property dialog position/size
+ newPropertyValueField.nfeditor('setSize', 318, 106);
+
+ // open the new property dialog
+ newPropertyDialog.center().show();
+
+ // give the property name focus
+ newPropertyValueField.nfeditor('refresh');
+ newPropertyNameField.focus();
+ }).on('mouseenter', function () {
+ $(this).removeClass('add-icon-bg').addClass('add-icon-bg-hover');
+ }).on('mouseleave', function () {
+ $(this).removeClass('add-icon-bg-hover').addClass('add-icon-bg');
+ }).appendTo(addProperty);
+ $('<div class="add-property-text">New property</div>').appendTo(addProperty);
+ }
+ $('<div class="clear"></div>').appendTo(header);
+
+ // initializes the properties table
+ initPropertiesTable(table, options);
+ }
+ });
+ },
+
+ /**
+ * Loads the specified properties.
+ *
+ * @argument {object} properties The properties
+ * @argument {map} descriptors The property descriptors (property name -> property descriptor)
+ * @argument {map} history
+ */
+ loadProperties: function (properties, descriptors, history) {
+ return this.each(function () {
+ var table = $(this).find('div.property-table');
+ loadProperties(table, properties, descriptors, history);
+ });
+ },
+
+ /**
+ * Saves the last edited row in the specified grid.
+ */
+ saveRow: function () {
+ return this.each(function () {
+ var table = $(this).find('div.property-table');
+ saveRow(table);
+ });
+ },
+
+ /**
+ * Update the size of the grid based on its container's current size.
+ */
+ resetTableSize: function () {
+ return this.each(function () {
+ var table = $(this).find('div.property-table');
+ var propertyGrid = table.data('gridInstance');
+ if (nf.Common.isDefinedAndNotNull(propertyGrid)) {
+ propertyGrid.resizeCanvas();
+ }
+ });
+ },
+
+ /**
+ * Cancels the edit in the specified row.
+ */
+ cancelEdit: function () {
+ return this.each(function () {
+ var table = $(this).find('div.property-table');
+ var propertyGrid = table.data('gridInstance');
+ if (nf.Common.isDefinedAndNotNull(propertyGrid)) {
+ var editController = propertyGrid.getEditController();
+ editController.cancelCurrentEdit();
+ }
+ });
+ },
+
+ /**
+ * Clears the property table.
+ */
+ clear: function () {
+ return this.each(function () {
+ var table = $(this).find('div.property-table');
+
+ // clean up any tooltips that may have been generated
+ nf.Common.cleanUpTooltips(table, 'img.icon-info');
+
+ // clear the data in the grid
+ var propertyGrid = table.data('gridInstance');
+ var propertyData = propertyGrid.getData();
+ propertyData.setItems([]);
+ });
+ },
+
+ /**
+ * Determines if a save is required for the first matching element.
+ */
+ isSaveRequired: function () {
+ var isSaveRequired = false;
+
+ this.each(function () {
+ // get the property grid
+ var table = $(this).find('div.property-table');
+ var propertyGrid = table.data('gridInstance');
+ var propertyData = propertyGrid.getData();
+
+ // determine if any of the processor properties have changed
+ $.each(propertyData.getItems(), function () {
+ if (this.value !== this.previousValue) {
+ isSaveRequired = true;
+ return false;
+ }
+ });
+
+ return false;
+ });
+
+ return isSaveRequired;
+ },
+
+ /**
+ * Marshalls the properties for the first matching element.
+ */
+ marshalProperties: function () {
+ // properties
+ var properties = {};
+
+ this.each(function () {
+ // get the property grid data
+ var table = $(this).find('div.property-table');
+ var propertyGrid = table.data('gridInstance');
+ var propertyData = propertyGrid.getData();
+ $.each(propertyData.getItems(), function () {
+ if (this.hidden === true) {
+ properties[this.property] = null;
+ } else if (this.value !== this.previousValue) {
+ properties[this.property] = this.value;
+ }
+ });
+
+ return false;
+ });
+
+ return properties;
+ }
+ };
+
+ $.fn.propertytable = function (method) {
+ if (methods[method]) {
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+ } else {
+ return methods.init.apply(this, arguments);
+ }
+ };
+})(jQuery);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/tagcloud/jquery.tagcloud.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/tagcloud/jquery.tagcloud.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/tagcloud/jquery.tagcloud.js
index 51aa7d8..525cfe9 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/tagcloud/jquery.tagcloud.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/tagcloud/jquery.tagcloud.js
@@ -24,16 +24,6 @@
* select: selectHandler,
* remove: removeHandler
* }
- *
- * Options have a label (specified as the text property that is rendered
- * to users) and a value which is not. Additionally, options can be marked
- * as disabled. A disabled option cannot be selected by a user but may be
- * programmatically selected (supporting the restoration of options that have
- * become invalid). It is up to the developer to ensure that the selected
- * option is not disabled.
- *
- * The optionClass option supports specifying a class to apply to the
- * option element.
*/
/**
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 8125219..4e2fc08 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -1005,6 +1005,7 @@ nf.Canvas = (function () {
// initialize components
nf.ConnectionConfiguration.init();
+ nf.ControllerServiceConfiguration.init();
nf.ProcessorConfiguration.init();
nf.ProcessGroupConfiguration.init();
nf.RemoteProcessGroupConfiguration.init();
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/ec082f1e/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service-configuration.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service-configuration.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service-configuration.js
new file mode 100644
index 0000000..5a3e48f
--- /dev/null
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service-configuration.js
@@ -0,0 +1,345 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+nf.ControllerServiceConfiguration = (function () {
+
+ /**
+ * Handle any expected controller service configuration errors.
+ *
+ * @argument {object} xhr The XmlHttpRequest
+ * @argument {string} status The status of the request
+ * @argument {string} error The error
+ */
+ var handleControllerServiceConfigurationError = function (xhr, status, error) {
+ if (xhr.status === 400) {
+ var errors = xhr.responseText.split('\n');
+
+ var content;
+ if (errors.length === 1) {
+ content = $('<span></span>').text(errors[0]);
+ } else {
+ content = nf.Common.formatUnorderedList(errors);
+ }
+
+ nf.Dialog.showOkDialog({
+ dialogContent: content,
+ overlayBackground: false,
+ headerText: 'Configuration Error'
+ });
+ } else {
+ nf.Common.handleAjaxError(xhr, status, error);
+ }
+ };
+
+ /**
+ * Determines whether the user has made any changes to the processor configuration
+ * that needs to be saved.
+ */
+ var isSaveRequired = function () {
+ var details = $('#controller-service-configuration').data('controllerServiceDetails');
+
+ // determine if any controller service settings have changed
+
+ if ($('#controller-service-comments').val() !== details.comments) {
+ return true;
+ }
+
+ // defer to the property and relationship grids
+ return $('#controller-service-properties').propertytable('isSaveRequired');
+ };
+
+ /**
+ * Marshals the data that will be used to update the contr oller service's configuration.
+ */
+ var marshalDetails = function () {
+ // properties
+ var properties = $('#controller-service-properties').propertytable('marshalProperties');
+
+ // create the controller service dto
+ var controllerServiceDto = {};
+ controllerServiceDto['id'] = $('#controller-service-id').text();
+ controllerServiceDto['name'] = $('#controller-service-name').val();
+
+ // set the properties
+ if ($.isEmptyObject(properties) === false) {
+ controllerServiceDto['properties'] = properties;
+ }
+
+ // mark the controller service disabled if appropriate
+ if ($('#controller-service-enabled').hasClass('checkbox-unchecked')) {
+ controllerServiceDto['enabled'] = false;
+ } else if ($('#controller-service-enabled').hasClass('checkbox-checked')) {
+ controllerServiceDto['enabled'] = true;
+ }
+
+ // create the controller service entity
+ var controllerServiceEntity = {};
+ controllerServiceEntity['revision'] = nf.Client.getRevision();
+ controllerServiceEntity['controllerService'] = controllerServiceDto;
+
+ // return the marshaled details
+ return controllerServiceEntity;
+ };
+
+ /**
+ * Validates the specified details.
+ *
+ * @argument {object} details The details to validate
+ */
+ var validateDetails = function (details) {
+ return true;
+ };
+
+ /**
+ * Reloads components that reference this controller service.
+ *
+ * @param {object} controllerService
+ */
+ var reloadControllerServiceReferences = function (controllerService) {
+
+ };
+
+ return {
+ /**
+ * Initializes the controller service configuration dialog.
+ */
+ init: function () {
+ // initialize the configuration dialog tabs
+ $('#controller-service-configuration-tabs').tabbs({
+ tabStyle: 'tab',
+ selectedTabStyle: 'selected-tab',
+ tabs: [{
+ name: 'Settings',
+ tabContentId: 'controller-service-standard-settings-tab-content'
+ }, {
+ name: 'Properties',
+ tabContentId: 'controller-service-properties-tab-content'
+ }, {
+ name: 'Comments',
+ tabContentId: 'controller-service-comments-tab-content'
+ }],
+ select: function () {
+ // update the processor property table size in case this is the first time its rendered
+ if ($(this).text() === 'Properties') {
+ $('#controller-service-properties').propertytable('resetTableSize');
+ }
+
+ // close all fields currently being edited
+ $('#controller-service-properties').propertytable('saveRow');
+
+ // show the border around the processor relationships if necessary
+// var processorRelationships = $('#auto-terminate-relationship-names');
+// if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
+// processorRelationships.css('border-width', '1px');
+// }
+ }
+ });
+
+ // initialize the processor configuration dialog
+ $('#controller-service-configuration').modal({
+ headerText: 'Configure Controller Service',
+ overlayBackground: false,
+ handler: {
+ close: function () {
+// // empty the relationship list
+// $('#auto-terminate-relationship-names').css('border-width', '0').empty();
+
+ // close the new property dialog if necessary
+ $('#processor-property-dialog').hide();
+
+ // cancel any active edits
+ $('#controller-service-properties').propertytable('cancelEdit');
+
+ // clear the tables
+ $('#controller-service-properties').propertytable('clear');
+
+ // removed the cached controller service details
+// $('#controller-service-configuration').removeData('processorDetails');
+// $('#controller-service-configuration').removeData('processorHistory');
+ }
+ }
+ });
+
+ // initialize the property table
+ $('#controller-service-properties').propertytable({
+ readOnly: false,
+ newPropertyDialogContainer: 'body'
+ });
+ },
+
+ /**
+ * Shows the configuration dialog for the specified controller service.
+ *
+ * @argument {controllerService} controllerService The controller service
+ */
+ showConfiguration: function (controllerService) {
+ // record the processor details
+ $('#controller-service-configuration').data('controllerServiceDetails', controllerService);
+
+ // determine if the enabled checkbox is checked or not
+ var controllerServiceEnableStyle = 'checkbox-checked';
+ if (controllerService['enabled'] === false) {
+ controllerServiceEnableStyle = 'checkbox-unchecked';
+ }
+
+ // populate the processor settings
+ $('#controller-service-id').text(controllerService['id']);
+ $('#controller-service-type').text(nf.Common.substringAfterLast(controllerService['type'], '.'));
+ $('#controller-service-name').val(controllerService['name']);
+ $('#controller-service-enabled').removeClass('checkbox-unchecked checkbox-checked').addClass(controllerServiceEnableStyle);
+ $('#controller-service-comments').val(controllerService['comments']);
+
+ // load the property table
+ $('#controller-service-properties').propertytable('loadProperties', controllerService.properties, controllerService.descriptors, {});
+
+ var buttons = [{
+ buttonText: 'Apply',
+ handler: {
+ click: function () {
+ // close all fields currently being edited
+ $('#controller-service-properties').propertytable('saveRow');
+
+ // marshal the settings and properties and update the controller service
+ var updatedControllerService = marshalDetails();
+
+ // ensure details are valid as far as we can tell
+ if (validateDetails(updatedControllerService)) {
+ // update the selected component
+ $.ajax({
+ type: 'PUT',
+ data: JSON.stringify(updatedControllerService),
+ url: controllerService.uri,
+ dataType: 'json',
+ processData: false,
+ contentType: 'application/json'
+ }).done(function (response) {
+// if (nf.Common.isDefinedAndNotNull(response.processor)) {
+// // update the revision
+// nf.Client.setRevision(response.revision);
+//
+// // set the new processor state based on the response
+// nf.Processor.set(response.processor);
+//
+// // reload the processor's outgoing connections
+// reloadProcessorConnections(processor);
+//
+// // close the details panel
+// $('#processor-configuration').modal('hide');
+// }
+ }).fail(handleControllerServiceConfigurationError);
+ }
+ }
+ }
+ }, {
+ buttonText: 'Cancel',
+ handler: {
+ click: function () {
+ $('#controller-service-configuration').modal('hide');
+ }
+ }
+ }];
+
+ // determine if we should show the advanced button
+ if (nf.Common.isDefinedAndNotNull(controllerService.customUiUrl) && controllerService.customUiUrl !== '') {
+ buttons.push({
+ buttonText: 'Advanced',
+ handler: {
+ click: function () {
+ var openCustomUi = function () {
+ // reset state and close the dialog manually to avoid hiding the faded background
+ $('#controller-service-configuration').modal('hide');
+
+ // show the custom ui
+ nf.CustomProcessorUi.showCustomUi($('#controller-service-id').text(), controllerService.customUiUrl, true).done(function () {
+// // once the custom ui is closed, reload the processor
+// nf.Processor.reload(processor);
+//
+// // and reload the processor's outgoing connections
+// reloadProcessorConnections(processor);
+ });
+ };
+
+ // close all fields currently being edited
+ $('#controller-service-properties').propertytable('saveRow');
+
+ // determine if changes have been made
+ if (isSaveRequired()) {
+ // see if those changes should be saved
+ nf.Dialog.showYesNoDialog({
+ dialogContent: 'Save changes before opening the advanced configuration?',
+ overlayBackground: false,
+ noHandler: openCustomUi,
+ yesHandler: function () {
+ // marshal the settings and properties and update the controller service
+ var updatedControllerService = marshalDetails();
+
+ // ensure details are valid as far as we can tell
+ if (validateDetails(updatedControllerService)) {
+ // update the selected component
+ $.ajax({
+ type: 'PUT',
+ data: JSON.stringify(updatedControllerService),
+ url: controllerService.uri,
+ dataType: 'json',
+ processData: false,
+ contentType: 'application/json'
+ }).done(function (response) {
+ if (nf.Common.isDefinedAndNotNull(response.controllerService)) {
+ // update the revision
+ nf.Client.setRevision(response.revision);
+
+ // open the custom ui
+ openCustomUi();
+ }
+ }).fail(handleControllerServiceConfigurationError);
+ }
+ }
+ });
+ } else {
+ // if there were no changes, simply open the custom ui
+ openCustomUi();
+ }
+ }
+ }
+ });
+ }
+
+ // set the button model
+ $('#controller-service-configuration').modal('setButtonModel', buttons);
+
+ // get the processor history
+// $.ajax({
+// type: 'GET',
+// url: '../nifi-api/controller/history/processors/' + encodeURIComponent(processor.id),
+// dataType: 'json'
+// }).done(function (response) {
+// var processorHistory = response.processorHistory;
+//
+// // record the processor history
+// $('#processor-configuration').data('processorHistory', processorHistory);
+
+ // show the details
+ $('#controller-service-configuration').modal('show');
+
+// // show the border if necessary
+// var processorRelationships = $('#auto-terminate-relationship-names');
+// if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) {
+// processorRelationships.css('border-width', '1px');
+// }
+// }).fail(nf.Common.handleAjaxError);
+ }
+ };
+}());