diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
index f73e416da70b..27daad186073 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/pom.xml
@@ -31,7 +31,6 @@
summary.propertiescounters.propertiescluster.properties
- templates.propertiesusers.propertiesbulletin-board.propertieslogin.properties
@@ -58,7 +57,6 @@
src/main/resources/filters/${summary.filter}src/main/resources/filters/${counters.filter}src/main/resources/filters/${cluster.filter}
- src/main/resources/filters/${templates.filter}src/main/resources/filters/${users.filter}src/main/resources/filters/${bulletin.board.filter}src/main/resources/filters/${login.filter}
@@ -95,7 +93,6 @@
**/provenance.jsp,
**/counters.jsp,
**/cluster.jsp,
- **/templates.jsp,
**/users.jsp,
**/bulletin-board.jsp,
**/login.jsp,
@@ -328,14 +325,6 @@
true
-
- src/main/webapp/WEB-INF/pages
- WEB-INF/pages
-
- templates.jsp
-
- true
- src/main/webapp/WEB-INF/pagesWEB-INF/pages
@@ -449,7 +438,6 @@
summary-min.propertiescounters-min.propertiescluster-min.properties
- templates-min.propertiesusers-min.propertiesbulletin-board-min.propertieslogin-min.properties
@@ -558,7 +546,6 @@
${staging.dir}/js/nf/canvas/header/components/nf-ng-group-component.js${staging.dir}/js/nf/canvas/header/components/nf-ng-remote-process-group-component.js${staging.dir}/js/nf/canvas/header/components/nf-ng-funnel-component.js
- ${staging.dir}/js/nf/canvas/header/components/nf-ng-template-component.js${staging.dir}/js/nf/canvas/header/components/nf-ng-registry-import-component.js${staging.dir}/js/nf/canvas/header/components/nf-ng-label-component.js${staging.dir}/js/nf/canvas/directives/nf-ng-breadcrumbs-directive.js
@@ -663,21 +650,6 @@
${staging.dir}/js/nf/users/nf-users.js
-
- true
-
-
- ${staging.dir}/js/nf/nf-dialog.js
- ${staging.dir}/js/nf/nf-authorization-storage.js
- ${staging.dir}/js/nf/nf-storage.js
- ${staging.dir}/js/nf/nf-common.js
- ${staging.dir}/js/nf/nf-error-handler.js
- ${staging.dir}/js/nf/nf-universal-capture.js
- ${staging.dir}/js/nf/nf-ajax-setup.js
- ${staging.dir}/js/nf/templates/nf-templates-table.js
- ${staging.dir}/js/nf/templates/nf-templates.js
-
- true
@@ -843,16 +815,6 @@
${staging.dir}/css/users.css
-
- true
-
-
- ${staging.dir}/css/main.css
- ${staging.dir}/css/banner.css
- ${staging.dir}/css/dialog.css
- ${staging.dir}/css/templates.css
-
- true
@@ -911,7 +873,6 @@
css/nf-counters-all.css,
css/nf-cluster-all.css,
css/nf-users-all.css,
- css/nf-templates-all.css,
css/nf-bulletin-board-all.css,
css/nf-login-all.css,
css/nf-logout-all.css,
@@ -935,7 +896,6 @@
js/nf/counters/nf-counters-all.js,
js/nf/cluster/nf-cluster-all.js,
js/nf/users/nf-users-all.js,
- js/nf/templates/nf-templates-all.js,
js/nf/bulletin-board/nf-bulletin-board-all.js,
js/nf/login/nf-login-all.js,
js/nf/logout/nf-logout-all.js,
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
index 102ec8a52345..5a03e7d5db03 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/canvas.properties
@@ -88,7 +88,6 @@ nf.canvas.script.tags=\n\
\n\
\n\
-\n\
\n\
\n\
\n\
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/templates-min.properties b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/templates-min.properties
deleted file mode 100644
index f0b78ec3b0b0..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/templates-min.properties
+++ /dev/null
@@ -1,19 +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.
-
-nf.templates.script.tags=
-nf.templates.style.tags=\n\
-\n\
-
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/templates.properties b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/templates.properties
deleted file mode 100644
index 329130e62ab3..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/resources/filters/templates.properties
+++ /dev/null
@@ -1,30 +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.
-
-nf.templates.script.tags=\n\
-\n\
-\n\
-\n\
-\n\
-\n\
-\n\
-\n\
-
-nf.templates.style.tags=\n\
-\n\
-\n\
-\n\
-\n\
-
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
index 603ffbb6063e..51e1e0816082 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/canvas.jsp
@@ -119,9 +119,6 @@
-
-
-
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/templates.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/templates.jsp
deleted file mode 100644
index 52f1582b55a3..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/pages/templates.jsp
+++ /dev/null
@@ -1,66 +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" %>
-
-
-
- NiFi Templates
-
-
-
- ${nf.templates.style.tags}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${nf.templates.script.tags}
-
-
-
-
-
-
-
-
-
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/bulletin-board/bulletin-board-content.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/bulletin-board/bulletin-board-content.jsp
index 39fa055a7932..39f0a027d285 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/bulletin-board/bulletin-board-content.jsp
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/bulletin-board/bulletin-board-content.jsp
@@ -17,7 +17,7 @@
<%@ page contentType="text/html" pageEncoding="UTF-8" session="false" %>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/upload-template-dialog.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/upload-template-dialog.jsp
deleted file mode 100644
index f6cbbdb4d0be..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/canvas/upload-template-dialog.jsp
+++ /dev/null
@@ -1,36 +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" %>
-
-
-
-
- Select Template
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/templates/templates-content.jsp b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/templates/templates-content.jsp
deleted file mode 100644
index d55ecdb809bf..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/partials/templates/templates-content.jsp
+++ /dev/null
@@ -1,41 +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" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-
-
-
-
NiFi Templates
-
-
- Displaying of
-
-
-
-
-
-
-
-
-
-
-
-
- Last updated:
-
-
-
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml
index 52502fc08a22..4f590c49736c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/WEB-INF/web.xml
@@ -66,16 +66,6 @@
/counters
-
-
- NiFiTemplates
- /WEB-INF/pages/templates.jsp
-
-
- NiFiTemplates
- /templates
-
-
NiFiUsers
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/main.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/main.css
index 8290d0a4f35c..819ff03e45df 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/main.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/main.css
@@ -88,14 +88,6 @@ div.context-menu-provenance {
float: left;
}
-#new-template-description {
- position: absolute;
- top: 81px;
- bottom: 0px;
- height: inherit;
- min-height: 32px;
-}
-
/* processor status styles */
.disabled {
@@ -271,39 +263,25 @@ span.details-title {
font-size: 13px;
}
-/* new template */
+/* new file */
-#new-template-description,
#new-file-description {
height: 210px;
}
/* upload */
-#select-template-container,
-#select-file-container {
-}
-
-#template-browse-container,
#file-browse-container {
display: block;
height: 20px;
}
-#select-template-label,
#select-file-label {
font-weight: bold;
font-size: 14px;
line-height: 28px;
}
-#select-template-button {
- position: absolute;
- top: 0px;
- left: 135px;
- height: 28px;
-}
-
#select-file-button button {
position: absolute;
float: right;
@@ -323,27 +301,16 @@ span.details-title {
color: #004849;
}
-#template-file-field,
#upload-file-field {
display: none;
}
-#submit-template-container {
- margin-top: 20px;
-}
-
#submit-file-container {
position: absolute;
float: left;
max-width: 90%;
}
-#selected-template-name {
- font-weight: bold;
- font-family: Roboto;
- font-size: 13px;
-}
-
#selected-file-name {
font-weight: bold;
font-family: Roboto;
@@ -352,7 +319,6 @@ span.details-title {
word-break: break-all;
}
-#upload-template-status,
#upload-file-status {
margin-top: 10px;
font-weight: bold;
@@ -361,7 +327,6 @@ span.details-title {
color: #ba554a;
}
-#upload-template-container button,
#upload-file-container button {
float: right;
font-size: 16px;
@@ -369,14 +334,12 @@ span.details-title {
margin-left: 1px;
}
-#upload-template-button,
#upload-file-button {
color: #004849;
font-size: 16px;
cursor: pointer;
}
-#template-file-upload,
#file-upload {
position: absolute;
top: 0;
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/templates.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/templates.css
deleted file mode 100644
index ab5e9405b948..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/css/templates.css
+++ /dev/null
@@ -1,97 +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.
- */
-/*
- Templates Styles
-*/
-
-#templates {
- position: absolute;
- top: 0px;
- bottom: 0px;
- left: 20px;
- right: 20px;
- height: 100%;
- overflow: auto;
-}
-
-#templates-header-and-filter {
- height: 108px;
-}
-
-#templates-header-text {
- font-size: 18px;
- font-weight: bold;
- color: #728E9B;
- font-family: Roboto Slab;
- margin-bottom: 30px;
-}
-
-#templates-refresh-container {
- position: absolute;
- bottom: 0px;
- left: 20px;
- right: 20px;
-}
-
-#templates-loading-container {
- float: left;
- width: 16px;
- height: 16px;
- background-color: transparent;
- margin-top: 4px;
- margin-left: 3px;
-}
-
-#templates-last-refreshed {
- font-weight: 500;
-}
-
-#templates-header {
- padding-top: 10px;
-}
-
-/* filter controls */
-
-#templates-filter-container {
- height: 32px;
- width: 100%;
-}
-
-#templates-filter {
- width: 173px;
- margin-right: 3px;
- float: left;
-}
-
-#templates-filter-type {
- float: left;
-}
-
-/* templates table */
-
-#templates-table {
- position: absolute;
- top: 98px;
- left: 0px;
- bottom: 47px;
- right: 0px;
- min-height: 150px;
-}
-
-#templates-table div.slick-viewport {
- overflow-x: hidden !important;
-}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js
index a16003a223dc..7c09568a502b 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-global-menu-controller.js
@@ -303,27 +303,6 @@
}
};
- /**
- * The templates menu item controller.
- */
- this.templates = {
-
- /**
- * The templates menu item's shell controller.
- */
- shell: {
-
- /**
- * Launch the templates shell.
- */
- launch: function () {
- nfShell.showPage('templates?' + $.param({
- groupId: nfCanvasUtils.getGroupId()
- }));
- }
- }
- };
-
/**
* The help menu item controller.
*/
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
index f22f3a71eea5..8c7ada54d52c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-operate-controller.js
@@ -72,227 +72,6 @@
function OperateCtrl() {
- /**
- * The canvas operator's create template component.
- */
- this.template = {
-
- /**
- * The canvas operator's create template component's modal.
- */
- modal: {
-
- /**
- * Gets the modal element.
- *
- * @returns {*|jQuery|HTMLElement}
- */
- getElement: function () {
- return $('#new-template-dialog');
- },
-
- /**
- * Initialize the modal.
- */
- init: function () {
- // configure the create template dialog
- this.getElement().modal({
- scrollableContentStyle: 'scrollable',
- headerText: 'Create Template'
- });
- },
-
- /**
- * Updates the modal config.
- *
- * @param {string} name The name of the property to update.
- * @param {object|array} config The config for the `name`.
- */
- update: function (name, config) {
- this.getElement().modal(name, config);
- },
-
- /**
- * Show the modal.
- */
- show: function () {
- this.getElement().modal('show');
- },
-
- /**
- * Hide the modal.
- */
- hide: function () {
- this.getElement().modal('hide');
- }
- }
- };
-
- /**
- * The canvas operator's create template component.
- */
- this.templateUpload = {
-
- /**
- * The canvas operator's create template component's modal.
- */
- modal: {
-
- /**
- * Gets the modal element.
- *
- * @returns {*|jQuery|HTMLElement}
- */
- getElement: function () {
- return $('#upload-template-dialog');
- },
-
- /**
- * Initialize the modal.
- */
- init: function () {
- // initialize the form
- var templateForm = $('#template-upload-form').ajaxForm({
- url: '../nifi-api/process-groups/',
- dataType: 'xml',
- beforeSubmit: function (formData, $form, options) {
- // indicate if a disconnected node is acknowledged
- formData.push({
- name: 'disconnectedNodeAcknowledged',
- value: nfStorage.isDisconnectionAcknowledged()
- });
-
- // ensure uploading to the current process group
- options.url += (encodeURIComponent(nfCanvasUtils.getGroupId()) + '/templates/upload');
- },
- success: function (response, statusText, xhr, form) {
- // see if the import was successful and inform the user
- if (response.documentElement.tagName === 'templateEntity') {
- nfDialog.showOkDialog({
- headerText: 'Success',
- dialogContent: 'Template successfully imported.'
- });
- } else {
- // import failed
- var statusText = 'Unable to import template. Please check the log for errors.';
- if (response.documentElement.tagName === 'errorResponse') {
- // if a more specific error was given, use it
- var errorMessage = response.documentElement.getAttribute('statusText');
- if (!nfCommon.isBlank(errorMessage)) {
- statusText = errorMessage;
- }
- }
-
- // show reason
- nfDialog.showOkDialog({
- headerText: 'Unable to Upload',
- dialogContent: nfCommon.escapeHtml(statusText)
- });
- }
- },
- error: function (xhr, statusText, error) {
- // request failed
- nfDialog.showOkDialog({
- headerText: 'Unable to Upload',
- dialogContent: nfCommon.escapeHtml(xhr.responseText)
- });
- }
- });
-
- // configure the upload template dialog
- this.getElement().modal({
- headerText: 'Upload Template',
- buttons: [{
- buttonText: 'Upload',
- color: {
- base: '#728E9B',
- hover: '#004849',
- text: '#ffffff'
- },
- handler: {
- click: function () {
- var selectedTemplate = $('#selected-template-name').text();
-
- // submit the template if necessary
- if (nfCommon.isBlank(selectedTemplate)) {
- $('#upload-template-status').text('No template selected. Please browse to select a template.');
- } else {
- templateForm.submit();
-
- // hide the dialog
- $('#upload-template-dialog').modal('hide');
- }
- }
- }
- }, {
- buttonText: 'Cancel',
- color: {
- base: '#E3E8EB',
- hover: '#C7D2D7',
- text: '#004849'
- },
- handler: {
- click: function () {
- // hide the dialog
- $('#upload-template-dialog').modal('hide');
- }
- }
- }],
- handler: {
- close: function () {
- // set the filename
- $('#selected-template-name').text('');
- $('#upload-template-status').text('');
-
- // reset the form to ensure that the change fire will fire
- templateForm.resetForm();
- }
- }
- });
-
- $('#template-file-field-button').on('click', function (e) {
- $('#template-file-field').click();
- });
-
- // add a handler for the change file input chain event
- $('#template-file-field').on('change', function (e) {
- var filename = $(this).val();
- if (!nfCommon.isBlank(filename)) {
- filename = filename.replace(/^.*[\\\/]/, '');
- }
-
- // set the filename and clear any status
- $('#selected-template-name').text(filename);
- $('#upload-template-status').text('');
- });
- },
-
- /**
- * Updates the modal config.
- *
- * @param {string} name The name of the property to update.
- * @param {object|array} config The config for the `name`.
- */
- update: function (name, config) {
- this.getElement().modal(name, config);
- },
-
- /**
- * Show the modal.
- */
- show: function () {
- this.getElement().modal('show');
- },
-
- /**
- * Hide the modal.
- */
- hide: function () {
- this.getElement().modal('hide');
- }
- }
- };
-
/**
* The canvas operator's fillcolor component.
*/
@@ -507,8 +286,6 @@
* Initializes the canvas operate controller.
*/
init: function () {
- this.template.modal.init();
- this.templateUpload.modal.init();
this.fillcolor.modal.init();
this.fillcolor.modal.minicolors.init();
}
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-toolbox-controller.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-toolbox-controller.js
index df348fd4883f..ed1726c8cf99 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-toolbox-controller.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-toolbox-controller.js
@@ -41,7 +41,6 @@
groupComponent,
remoteGroupComponent,
funnelComponent,
- templateComponent,
registryImportComponent,
labelComponent) {
'use strict';
@@ -52,7 +51,6 @@
groupComponent,
remoteGroupComponent,
funnelComponent,
- templateComponent,
registryImportComponent,
labelComponent) {
this.processorComponent = processorComponent;
@@ -61,7 +59,6 @@
this.groupComponent = groupComponent;
this.remoteGroupComponent = remoteGroupComponent;
this.funnelComponent = funnelComponent;
- this.templateComponent = templateComponent;
this.registryImportComponent = registryImportComponent;
this.labelComponent = labelComponent;
@@ -77,7 +74,6 @@
remoteProcessGroup: 'Remote Process Group',
connection: 'Connection',
funnel: 'Funnel',
- template: 'Template',
importFromRegistry: 'Import from Registry',
label: 'Label'
},
@@ -102,7 +98,6 @@
outputPortComponent.modal.init();
groupComponent.modal.init();
remoteGroupComponent.modal.init();
- templateComponent.modal.init();
},
/**
@@ -165,7 +160,6 @@
groupComponent,
remoteGroupComponent,
funnelComponent,
- templateComponent,
registryImportComponent,
labelComponent);
return toolboxCtrl;
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
deleted file mode 100644
index a23269afd3df..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/header/components/nf-ng-template-component.js
+++ /dev/null
@@ -1,291 +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.
- */
-
-/* global define, module, require, exports */
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery',
- 'nf.Client',
- 'nf.Birdseye',
- 'nf.Storage',
- 'nf.Graph',
- 'nf.CanvasUtils',
- 'nf.ErrorHandler',
- 'nf.Dialog',
- 'nf.Common'],
- function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
- return (nf.ng.TemplateComponent = factory($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon));
- });
- } else if (typeof exports === 'object' && typeof module === 'object') {
- module.exports = (nf.ng.TemplateComponent =
- factory(require('jquery'),
- require('nf.Client'),
- require('nf.Birdseye'),
- require('nf.Storage'),
- require('nf.Graph'),
- require('nf.CanvasUtils'),
- require('nf.ErrorHandler'),
- require('nf.Dialog'),
- require('nf.Common')));
- } else {
- nf.ng.TemplateComponent = factory(root.$,
- root.nf.Client,
- root.nf.Birdseye,
- root.nf.Storage,
- root.nf.Graph,
- root.nf.CanvasUtils,
- root.nf.ErrorHandler,
- root.nf.Dialog,
- root.nf.Common);
- }
-}(this, function ($, nfClient, nfBirdseye, nfStorage, nfGraph, nfCanvasUtils, nfErrorHandler, nfDialog, nfCommon) {
- 'use strict';
-
- return function (serviceProvider) {
- 'use strict';
-
- /**
- * Instantiates the specified template.
- *
- * @argument {string} templateId The template id.
- * @argument {object} pt The point that the template was dropped.
- */
- var createTemplate = function (templateId, pt) {
- var instantiateTemplateInstance = {
- 'templateId': templateId,
- 'originX': pt.x,
- 'originY': pt.y,
- 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
- };
-
- // create a new instance of the new template
- $.ajax({
- type: 'POST',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/template-instance',
- data: JSON.stringify(instantiateTemplateInstance),
- dataType: 'json',
- contentType: 'application/json'
- }).done(function (response) {
- // populate the graph accordingly
- nfGraph.add(response.flow, {
- 'selectAll': true
- });
-
- // update component visibility
- nfGraph.updateVisibility();
-
- // update the birdseye
- nfBirdseye.refresh();
- }).fail(nfErrorHandler.handleAjaxError);
- };
-
- function TemplateComponent() {
-
- this.icon = 'icon icon-template';
-
- this.hoverIcon = 'icon icon-template-add';
-
- /**
- * The template component's modal.
- */
- this.modal = {
-
- /**
- * Gets the modal element.
- *
- * @returns {*|jQuery|HTMLElement}
- */
- getElement: function () {
- return $('#instantiate-template-dialog');
- },
-
- /**
- * Initialize the modal.
- */
- init: function () {
- // configure the instantiate template dialog
- this.getElement().modal({
- scrollableContentStyle: 'scrollable',
- headerText: 'Add Template'
- });
- },
-
- /**
- * Updates the modal config.
- *
- * @param {string} name The name of the property to update.
- * @param {object|array} config The config for the `name`.
- */
- update: function (name, config) {
- this.getElement().modal(name, config);
- },
-
- /**
- * Show the modal.
- */
- show: function () {
- this.getElement().modal('show');
- },
-
- /**
- * Hide the modal.
- */
- hide: function () {
- this.getElement().modal('hide');
- }
- };
- }
-
- TemplateComponent.prototype = {
- constructor: TemplateComponent,
-
- /**
- * Gets the component.
- *
- * @returns {*|jQuery|HTMLElement}
- */
- getElement: function () {
- return $('#template-component');
- },
-
- /**
- * Enable the component.
- */
- enabled: function () {
- this.getElement().attr('disabled', false);
- },
-
- /**
- * Disable the component.
- */
- disabled: function () {
- this.getElement().attr('disabled', true);
- },
-
- /**
- * Handler function for when component is dropped on the canvas.
- *
- * @argument {object} pt The point that the component was dropped.
- */
- dropHandler: function (pt) {
- this.promptForTemplate(pt);
- },
-
- /**
- * The drag icon for the toolbox component.
- *
- * @param event
- * @returns {*|jQuery|HTMLElement}
- */
- dragIcon: function (event) {
- return $('');
- },
-
- /**
- * Prompts the user to select a template.
- *
- * @argument {object} pt The point that the template was dropped.
- */
- promptForTemplate: function (pt) {
- var templateComponent = this;
- $.ajax({
- type: 'GET',
- url: serviceProvider.headerCtrl.toolboxCtrl.config.urls.api + '/flow/templates',
- dataType: 'json'
- }).done(function (response) {
- var templates = response.templates;
- if (nfCommon.isDefinedAndNotNull(templates) && templates.length > 0) {
- // sort the templates
- templates = templates.sort(function (one, two) {
- var oneDate = nfCommon.parseDateTime(one.template.timestamp);
- var twoDate = nfCommon.parseDateTime(two.template.timestamp);
-
- // newest templates first
- return twoDate.getTime() - oneDate.getTime();
- });
-
- var options = [];
- $.each(templates, function (_, templateEntity) {
- if (templateEntity.permissions.canRead === true) {
- options.push({
- text: templateEntity.template.name,
- value: templateEntity.id,
- description: nfCommon.escapeHtml(templateEntity.template.description)
- });
- }
- });
-
- // configure the templates combo
- $('#available-templates').combo({
- maxHeight: 300,
- options: options
- });
-
- // update the button model
- templateComponent.modal.update('setButtonModel', [{
- buttonText: 'Add',
- color: {
- base: '#728E9B',
- hover: '#004849',
- text: '#ffffff'
- },
- handler: {
- click: function () {
- // get the type of processor currently selected
- var selectedOption = $('#available-templates').combo('getSelectedOption');
- var templateId = selectedOption.value;
-
- // hide the dialog
- templateComponent.modal.hide();
-
- // instantiate the specified template
- createTemplate(templateId, pt);
- }
- }
- },
- {
- buttonText: 'Cancel',
- color: {
- base: '#E3E8EB',
- hover: '#C7D2D7',
- text: '#004849'
- },
- handler: {
- click: function () {
- templateComponent.modal.hide();
- }
- }
- }]);
-
- // show the dialog
- templateComponent.modal.show();
- } else {
- nfDialog.showOkDialog({
- headerText: 'Instantiate Template',
- dialogContent: 'No templates have been loaded into this NiFi.'
- });
- }
-
- }).fail(nfErrorHandler.handleAjaxError);
- }
- }
-
- var templateComponent = new TemplateComponent();
- return templateComponent;
- };
-}));
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
index 46fa63689da9..458f6d84f0bd 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js
@@ -2114,130 +2114,6 @@
nfCanvasUtils.moveComponentsToParent(selection);
},
- /**
- * Uploads a new template.
- */
- uploadTemplate: function () {
- $('#upload-template-dialog').modal('show');
- },
-
- /**
- * Creates a new template based off the currently selected components. If no components
- * are selected, a template of the entire canvas is made.
- */
- template: function () {
- var selection = nfCanvasUtils.getSelection();
-
- // if no components are selected, use the entire graph
- if (selection.empty()) {
- selection = d3.selectAll('g.component, g.connection');
- }
-
- // ensure that components have been specified
- if (selection.empty()) {
- nfDialog.showOkDialog({
- headerText: 'Create Template',
- dialogContent: "The current selection is not valid to create a template."
- });
- return;
- }
-
- // remove dangling edges (where only the source or destination is also selected)
- selection = nfCanvasUtils.trimDanglingEdges(selection);
-
- // ensure that components specified are valid
- if (selection.empty()) {
- nfDialog.showOkDialog({
- headerText: 'Create Template',
- dialogContent: "The current selection is not valid to create a template."
- });
- return;
- }
-
- // prompt for the template name
- $('#new-template-dialog').modal('setButtonModel', [{
- buttonText: 'Create',
- color: {
- base: '#728E9B',
- hover: '#004849',
- text: '#ffffff'
- },
- handler: {
- click: function () {
- // get the template details
- var templateName = $('#new-template-name').val();
-
- // ensure the template name is not blank
- if (nfCommon.isBlank(templateName)) {
- nfDialog.showOkDialog({
- headerText: 'Configuration Error',
- dialogContent: "The name of the template must be specified."
- });
- return;
- }
-
- // hide the dialog
- $('#new-template-dialog').modal('hide');
-
- // get the description
- var templateDescription = $('#new-template-description').val();
-
- // create a snippet
- var parentGroupId = nfCanvasUtils.getGroupId();
- var snippet = nfSnippet.marshal(selection, parentGroupId);
-
- // create the snippet
- nfSnippet.create(snippet).done(function (response) {
- var createSnippetEntity = {
- 'name': templateName,
- 'description': templateDescription,
- 'snippetId': response.snippet.id,
- 'disconnectedNodeAcknowledged': nfStorage.isDisconnectionAcknowledged()
- };
-
- // create the template
- $.ajax({
- type: 'POST',
- url: config.urls.api + '/process-groups/' + encodeURIComponent(nfCanvasUtils.getGroupId()) + '/templates',
- data: JSON.stringify(createSnippetEntity),
- dataType: 'json',
- contentType: 'application/json'
- }).done(function () {
- // show the confirmation dialog
- nfDialog.showOkDialog({
- headerText: 'Create Template',
- dialogContent: "Template '" + nfCommon.escapeHtml(templateName) + "' was successfully created."
- });
- }).always(function () {
- // clear the template dialog fields
- $('#new-template-name').val('');
- $('#new-template-description').val('');
- }).fail(nfErrorHandler.handleAjaxError);
- }).fail(nfErrorHandler.handleAjaxError);
- }
- }
- }, {
- buttonText: 'Cancel',
- color: {
- base: '#E3E8EB',
- hover: '#C7D2D7',
- text: '#004849'
- },
- handler: {
- click: function () {
- // clear the template dialog fields
- $('#new-template-name').val('');
- $('#new-template-description').val('');
-
- $('#new-template-dialog').modal('hide');
- }
- }
- }]).modal('show');
-
- // auto focus on the template name
- $('#new-template-name').focus();
- },
-
/**
* Copies the component in the specified selection.
*
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
index 070bc5b095a7..bd6e8c682e3c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-bootstrap.js
@@ -78,7 +78,6 @@
'nf.ng.GroupComponent',
'nf.ng.RemoteProcessGroupComponent',
'nf.ng.FunnelComponent',
- 'nf.ng.TemplateComponent',
'nf.ng.RegistryImportComponent',
'nf.ng.LabelComponent',
'nf.ng.Canvas.GraphControlsCtrl',
@@ -86,8 +85,8 @@
'nf.ng.Canvas.OperateCtrl',
'nf.ng.BreadcrumbsDirective',
'nf.ng.DraggableDirective'],
- function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfFlowAnalysisRule, nfParameterProvider, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, registryImportComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
- return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfFlowAnalysisRule, nfParameterProvider, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, registryImportComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
+ function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfFlowAnalysisRule, nfParameterProvider, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, registryImportComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+ return factory($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfFlowAnalysisRule, nfParameterProvider, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, registryImportComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective);
});
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = factory(require('jquery'),
@@ -149,7 +148,6 @@
require('nf.ng.GroupComponent'),
require('nf.ng.RemoteProcessGroupComponent'),
require('nf.ng.FunnelComponent'),
- require('nf.ng.TemplateComponent'),
require('nf.ng.RegistryImportComponent'),
require('nf.ng.LabelComponent'),
require('nf.ng.Canvas.GraphControlsCtrl'),
@@ -217,7 +215,6 @@
root.nf.ng.GroupComponent,
root.nf.ng.RemoteProcessGroupComponent,
root.nf.ng.FunnelComponent,
- root.nf.ng.TemplateComponent,
root.nf.ng.RegistryImportComponent,
root.nf.ng.LabelComponent,
root.nf.ng.Canvas.GraphControlsCtrl,
@@ -226,7 +223,7 @@
root.nf.ng.BreadcrumbsDirective,
root.nf.ng.DraggableDirective);
}
-}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfFlowAnalysisRule, nfParameterProvider, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, templateComponent, registryImportComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
+}(this, function ($, angular, nfCommon, nfCanvasUtils, nfErrorHandler, nfClient, nfDialog, nfStorage, nfCanvas, nfGraph, nfContextMenu, nfQuickSelect, nfShell, nfParameterContexts, nfSettings, nfActions, nfSnippet, nfQueueListing, nfVerify, nfComponentState, nfFlowVersion, nfComponentVersion, nfDraggable, nfConnectable, nfStatusHistory, nfBirdseye, nfConnectionConfiguration, nfControllerService, nfReportingTask, nfFlowAnalysisRule, nfParameterProvider, nfPolicyManagement, nfProcessorConfiguration, nfProcessGroupConfiguration, nfControllerServices, nfRemoteProcessGroupConfiguration, nfRemoteProcessGroupPorts, nfPortConfiguration, nfLabelConfiguration, nfProcessorDetails, nfPortDetails, nfConnectionDetails, nfRemoteProcessGroupDetails, nfGoto, nfNgBridge, appCtrl, appConfig, serviceProvider, breadcrumbsCtrl, headerCtrl, flowStatusCtrl, globalMenuCtrl, toolboxCtrl, processorComponent, inputPortComponent, outputPortComponent, processGroupComponent, remoteProcessGroupComponent, funnelComponent, registryImportComponent, labelComponent, graphControlsCtrl, navigateCtrl, operateCtrl, breadcrumbsDirective, draggableDirective) {
var config = {
urls: {
@@ -257,7 +254,6 @@
'groupComponent',
'remoteGroupComponent',
'funnelComponent',
- 'templateComponent',
'registryImportComponent',
'labelComponent'];
processorComponent.$inject = ['serviceProvider'];
@@ -266,7 +262,6 @@
processGroupComponent.$inject = ['serviceProvider'];
remoteProcessGroupComponent.$inject = ['serviceProvider'];
funnelComponent.$inject = ['serviceProvider'];
- templateComponent.$inject = ['serviceProvider'];
registryImportComponent.$inject = ['serviceProvider'];
labelComponent.$inject = ['serviceProvider'];
graphControlsCtrl.$inject = ['serviceProvider', 'navigateCtrl', 'operateCtrl'];
@@ -294,7 +289,6 @@
app.service('groupComponent', processGroupComponent);
app.service('remoteGroupComponent', remoteProcessGroupComponent);
app.service('funnelComponent', funnelComponent);
- app.service('templateComponent', templateComponent);
app.service('registryImportComponent', registryImportComponent);
app.service('labelComponent', labelComponent);
app.service('graphControlsCtrl', graphControlsCtrl);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
index 74d9b361b963..a49b13f31dd9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-context-menu.js
@@ -118,24 +118,6 @@
return nfCanvasUtils.areDeletable(selection);
};
- /**
- * Determines whether user can create a template from the components in the specified selection.
- *
- * @param {selection} selection The selection of currently selected components
- */
- var canCreateTemplate = function (selection) {
- return nfCanvasUtils.canWriteCurrentGroup() && (selection.empty() || nfCanvasUtils.canRead(selection));
- };
-
- /**
- * Determines whether user can upload a template.
- *
- * @param {selection} selection The selection of currently selected components
- */
- var canUploadTemplate = function (selection) {
- return nfCanvasUtils.canWriteCurrentGroup() && selection.empty();
- };
-
/**
* Determines whether components in the specified selection are group-able.
*
@@ -875,9 +857,6 @@
{id: 'download-menu-item-with', condition: supportsDownloadFlow, menuItem: {clazz: 'fa', text: 'With external services', action: 'downloadFlowWithExternalServices'}}
]},
{separator: true},
- {id: 'upload-template-menu-item', condition: canUploadTemplate, menuItem: {clazz: 'icon icon-template-import', text: 'Upload template', action: 'uploadTemplate'}},
- {id: 'template-menu-item', condition: canCreateTemplate, menuItem: {clazz: 'icon icon-template-save', text: 'Create template', action: 'template'}},
- {separator: true},
{id: 'copy-menu-item', condition: isCopyable, menuItem: {clazz: 'fa fa-copy', text: 'Copy', action: 'copy'}},
{id: 'paste-menu-item', condition: isPastable, menuItem: {clazz: 'fa fa-paste', text: 'Paste', action: 'paste'}},
{separator: true},
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
index c0bf9d6357ac..0c63094448a8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js
@@ -1611,60 +1611,6 @@
return loadPolicy().always(showPolicy);
},
- /**
- * Shows the template policy.
- *
- * @param d
- */
- showTemplatePolicy: function (d) {
- initializingComponentPolicy = true;
-
- // reset the policy message
- resetPolicyMessage();
-
- // update the policy controls visibility
- $('#component-policy-controls').show();
- $('#global-policy-controls').hide();
-
- // update the visibility
- if (d.permissions.canRead === true) {
- $('#policy-selected-template-container div.policy-selected-component-name').text(d.template.name);
- } else {
- $('#policy-selected-template-container div.policy-selected-component-name').text(d.id);
- }
- $('#policy-selected-template-container').show();
-
- // populate the initial resource
- $('#selected-policy-component-id').text(d.id);
- $('#selected-policy-component-type').text('templates');
- $('#component-policy-target')
- .combo('setOptionEnabled', {
- value: 'operate-component'
- }, false)
- .combo('setOptionEnabled', {
- value: 'write-receive-data'
- }, false)
- .combo('setOptionEnabled', {
- value: 'write-send-data'
- }, false)
- .combo('setOptionEnabled', {
- value: 'read-data'
- }, false)
- .combo('setOptionEnabled', {
- value: 'read-provenance'
- }, false)
- .combo('setOptionEnabled', {
- value: 'write-data'
- }, false)
- .combo('setSelectedOption', {
- value: 'read-component'
- });
-
- initializingComponentPolicy = false;
-
- return loadPolicy().always(showPolicy);
- },
-
/**
* Shows the parameter context policy.
*
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
index a1b1a4385383..003113aef088 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
@@ -52,7 +52,6 @@
remoteProcessGroup: 'Remote Process Group',
connection: 'Connection',
funnel: 'Funnel',
- template: 'Template',
label: 'Label',
node: 'Node'
},
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js
deleted file mode 100644
index 6a5a77c3d874..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates-table.js
+++ /dev/null
@@ -1,450 +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.
- */
-
-/* global define, module, require, exports */
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery',
- 'Slick',
- 'nf.Common',
- 'nf.Dialog',
- 'nf.ErrorHandler'],
- function ($, Slick, nfCommon, nfDialog, nfErrorHandler) {
- return (nf.TemplatesTable = factory($, Slick, nfCommon, nfDialog, nfErrorHandler));
- });
- } else if (typeof exports === 'object' && typeof module === 'object') {
- module.exports = (nf.TemplatesTable =
- factory(require('jquery'),
- require('Slick'),
- require('nf.Common'),
- require('nf.Dialog'),
- require('nf.ErrorHandler')));
- } else {
- nf.TemplatesTable = factory(root.$,
- root.Slick,
- root.nf.Common,
- root.nf.Dialog,
- root.nf.ErrorHandler);
- }
-}(this, function ($, Slick, nfCommon, nfDialog, nfErrorHandler) {
- 'use strict';
-
- var isDisconnectionAcknowledged = false;
-
- /**
- * Configuration object used to hold a number of configuration items.
- */
- var config = {
- urls: {
- templates: '../nifi-api/flow/templates'
- }
- };
-
- /**
- * Sorts the specified data using the specified sort details.
- *
- * @param {object} sortDetails
- * @param {object} data
- */
- var sort = function (sortDetails, data) {
- // defines a function for sorting
- var comparer = function (a, b) {
- if (a.permissions.canRead && b.permissions.canRead) {
- if (sortDetails.columnId === 'timestamp') {
- var aDate = nfCommon.parseDateTime(a.template[sortDetails.columnId]);
- var bDate = nfCommon.parseDateTime(b.template[sortDetails.columnId]);
- return aDate.getTime() - bDate.getTime();
- } else {
- var aString = nfCommon.isDefinedAndNotNull(a.template[sortDetails.columnId]) ? a.template[sortDetails.columnId] : '';
- var bString = nfCommon.isDefinedAndNotNull(b.template[sortDetails.columnId]) ? b.template[sortDetails.columnId] : '';
- return aString === bString ? 0 : aString > bString ? 1 : -1;
- }
- } else {
- if (!a.permissions.canRead && !b.permissions.canRead) {
- return 0;
- }
- if (a.permissions.canRead) {
- return 1;
- } else {
- return -1;
- }
- }
- };
-
- // perform the sort
- data.sort(comparer, sortDetails.sortAsc);
- };
-
- /**
- * Prompts the user before attempting to delete the specified template.
- *
- * @argument {object} templateEntity The template
- */
- var promptToDeleteTemplate = function (templateEntity) {
- // prompt for deletion
- nfDialog.showYesNoDialog({
- headerText: 'Delete Template',
- dialogContent: 'Delete template \'' + nfCommon.escapeHtml(templateEntity.template.name) + '\'?',
- yesHandler: function () {
- deleteTemplate(templateEntity);
- }
- });
- };
-
- /**
- * Opens the access policies for the specified template.
- *
- * @param templateEntity
- */
- var openAccessPolicies = function (templateEntity) {
- // only attempt this if we're within a frame
- if (top !== window) {
- // and our parent has canvas utils and shell defined
- if (nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.PolicyManagement) && nfCommon.isDefinedAndNotNull(parent.nf.Shell)) {
- parent.nf.PolicyManagement.showTemplatePolicy(templateEntity);
- parent.$('#shell-close-button').click();
- }
- }
- };
-
- /**
- * Deletes the template with the specified id.
- *
- * @argument {string} templateEntity The template
- */
- var deleteTemplate = function (templateEntity) {
- $.ajax({
- type: 'DELETE',
- url: templateEntity.template.uri + '?' + $.param({
- 'disconnectedNodeAcknowledged': isDisconnectionAcknowledged
- }),
- dataType: 'json'
- }).done(function () {
- var templatesGrid = $('#templates-table').data('gridInstance');
- var templatesData = templatesGrid.getData();
- templatesData.deleteItem(templateEntity.id);
-
- // update the total number of templates
- $('#total-templates').text(templatesData.getItems().length);
- }).fail(nfErrorHandler.handleAjaxError);
- };
-
- /**
- * Get the text out of the filter field. If the filter field doesn't
- * have any text it will contain the text 'filter list' so this method
- * accounts for that.
- */
- var getFilterText = function () {
- return $('#templates-filter').val();
- };
-
- /**
- * Applies the filter found in the filter expression text field.
- */
- var applyFilter = function () {
- // get the dataview
- var templatesGrid = $('#templates-table').data('gridInstance');
-
- // ensure the grid has been initialized
- if (nfCommon.isDefinedAndNotNull(templatesGrid)) {
- var templatesData = templatesGrid.getData();
-
- // update the search criteria
- templatesData.setFilterArgs({
- searchString: getFilterText(),
- property: $('#templates-filter-type').combo('getSelectedOption').value
- });
- templatesData.refresh();
- }
- };
-
- /**
- * 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) {
- if (args.searchString === '') {
- return true;
- }
-
- try {
- // perform the row filtering
- var filterExp = new RegExp(args.searchString, 'i');
- } catch (e) {
- // invalid regex
- return false;
- }
-
- // perform the filter
- return item.template[args.property].search(filterExp) >= 0;
- };
-
- /**
- * Downloads the specified template.
- *
- * @param {object} templateEntity The template
- */
- var downloadTemplate = function (templateEntity) {
- window.open(templateEntity.template.uri + '/download');
- };
-
- return {
- /**
- * Initializes the templates list.
- */
- init: function (disconnectionAcknowledged) {
- isDisconnectionAcknowledged = disconnectionAcknowledged;
-
- // define the function for filtering the list
- $('#templates-filter').keyup(function () {
- applyFilter();
- });
-
- // filter type
- $('#templates-filter-type').combo({
- options: [{
- text: 'by name',
- value: 'name'
- }, {
- text: 'by description',
- value: 'description'
- }],
- select: function (option) {
- applyFilter();
- }
- });
-
- var timestampFormatter = function (row, cell, value, columnDef, dataContext) {
- if (!dataContext.permissions.canRead) {
- return '';
- }
-
- return nfCommon.escapeHtml(dataContext.template.timestamp);
- };
-
- var nameFormatter = function (row, cell, value, columnDef, dataContext) {
- if (!dataContext.permissions.canRead) {
- return '' + nfCommon.escapeHtml(dataContext.id) + '';
- }
-
- return nfCommon.escapeHtml(dataContext.template.name);
- };
-
- var descriptionFormatter = function (row, cell, value, columnDef, dataContext) {
- if (!dataContext.permissions.canRead) {
- return '';
- }
-
- return nfCommon.formatValue(dataContext.template.description);
- };
-
- var groupIdFormatter = function (row, cell, value, columnDef, dataContext) {
- if (!dataContext.permissions.canRead) {
- return '';
- }
-
- return nfCommon.escapeHtml(dataContext.template.groupId);
- };
-
- // function for formatting the actions column
- var actionFormatter = function (row, cell, value, columnDef, dataContext) {
- var markup = '';
-
- if (dataContext.permissions.canRead === true) {
- markup += '';
- }
-
- if (dataContext.permissions.canWrite === true) {
- markup += '';
- }
-
- // allow policy configuration conditionally if framed
- if (top !== window && nfCommon.canAccessTenants()) {
- if (nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.CanvasUtils) && parent.nf.CanvasUtils.isManagedAuthorizer()) {
- markup += '';
- }
- }
-
- return markup;
- };
-
- // initialize the templates table
- var templatesColumns = [
- {
- id: 'timestamp',
- name: 'Date/Time',
- sortable: true,
- defaultSortAsc: false,
- resizable: false,
- formatter: timestampFormatter,
- width: 225,
- maxWidth: 225
- },
- {
- id: 'name',
- name: 'Name',
- sortable: true,
- resizable: true,
- formatter: nameFormatter
- },
- {
- id: 'description',
- name: 'Description',
- sortable: true,
- resizable: true,
- formatter: descriptionFormatter
- },
- {
- id: 'groupId',
- name: 'Process Group Id',
- sortable: true,
- resizable: true,
- formatter: groupIdFormatter
- },
- {
- id: 'actions',
- name: ' ',
- sortable: false,
- resizable: false,
- formatter: actionFormatter,
- width: 100,
- maxWidth: 100
- }
- ];
-
- var templatesOptions = {
- autosizeColsMode: Slick.GridAutosizeColsMode.LegacyForceFit,
- enableTextSelectionOnCells: true,
- enableCellNavigation: false,
- enableColumnReorder: false,
- autoEdit: false,
- rowHeight: 24
- };
-
- // initialize the dataview
- var templatesData = new Slick.Data.DataView({
- inlineFilters: false
- });
- templatesData.setItems([]);
- templatesData.setFilterArgs({
- searchString: getFilterText(),
- property: $('#templates-filter-type').combo('getSelectedOption').value
- });
- templatesData.setFilter(filter);
-
- // initialize the sort
- sort({
- columnId: 'timestamp',
- sortAsc: false
- }, templatesData);
-
- // initialize the grid
- var templatesGrid = new Slick.Grid('#templates-table', templatesData, templatesColumns, templatesOptions);
- templatesGrid.setSelectionModel(new Slick.RowSelectionModel());
- templatesGrid.registerPlugin(new Slick.AutoTooltips());
- templatesGrid.setSortColumn('timestamp', false);
- templatesGrid.onSort.subscribe(function (e, args) {
- sort({
- columnId: args.sortCol.id,
- sortAsc: args.sortAsc
- }, templatesData);
- });
-
- // configure a click listener
- templatesGrid.onClick.subscribe(function (e, args) {
- var target = $(e.target);
-
- // get the node at this row
- var item = templatesData.getItem(args.row);
-
- // determine the desired action
- if (templatesGrid.getColumns()[args.cell].id === 'actions') {
- if (target.hasClass('export-template')) {
- downloadTemplate(item);
- } else if (target.hasClass('prompt-to-delete-template')) {
- promptToDeleteTemplate(item);
- } else if (target.hasClass('edit-access-policies')) {
- openAccessPolicies(item);
- }
- }
- });
-
- // wire up the dataview to the grid
- templatesData.onRowCountChanged.subscribe(function (e, args) {
- templatesGrid.updateRowCount();
- templatesGrid.render();
-
- // update the total number of displayed processors
- $('#displayed-templates').text(args.current);
- });
- templatesData.onRowsChanged.subscribe(function (e, args) {
- templatesGrid.invalidateRows(args.rows);
- templatesGrid.render();
- });
-
- // hold onto an instance of the grid
- $('#templates-table').data('gridInstance', templatesGrid);
-
- // initialize the number of displayed items
- $('#displayed-templates').text('0');
- },
-
- /**
- * Update the size of the grid based on its container's current size.
- */
- resetTableSize: function () {
- var templateGrid = $('#templates-table').data('gridInstance');
- if (nfCommon.isDefinedAndNotNull(templateGrid)) {
- templateGrid.resizeCanvas();
- }
- },
-
- /**
- * Load the processor templates table.
- */
- loadTemplatesTable: function () {
- return $.ajax({
- type: 'GET',
- url: config.urls.templates,
- dataType: 'json'
- }).done(function (response) {
- // ensure there are groups specified
- if (nfCommon.isDefinedAndNotNull(response.templates)) {
- var templatesGrid = $('#templates-table').data('gridInstance');
- var templatesData = templatesGrid.getData();
-
- // set the items
- templatesData.setItems(response.templates);
- templatesData.reSort();
- templatesGrid.invalidate();
-
- // update the stats last refreshed timestamp
- $('#templates-last-refreshed').text(response.generated);
-
- // update the total number of processors
- $('#total-templates').text(response.templates.length);
- } else {
- $('#total-templates').text('0');
- }
- }).fail(nfErrorHandler.handleAjaxError);
- }
- };
-}));
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js
deleted file mode 100644
index 649d79708942..000000000000
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/templates/nf-templates.js
+++ /dev/null
@@ -1,263 +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.
- */
-
-/* global top, define, module, require, exports */
-
-(function (root, factory) {
- if (typeof define === 'function' && define.amd) {
- define(['jquery',
- 'nf.Common',
- 'nf.Dialog',
- 'nf.TemplatesTable',
- 'nf.ErrorHandler',
- 'nf.Storage'],
- function ($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage) {
- return (nf.Templates = factory($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage));
- });
- } else if (typeof exports === 'object' && typeof module === 'object') {
- module.exports = (nf.Templates =
- factory(require('jquery'),
- require('nf.Common'),
- require('nf.Dialog'),
- require('nf.TemplatesTable'),
- require('nf.ErrorHandler'),
- require('nf.Storage')));
- } else {
- nf.Templates = factory(root.$,
- root.nf.Common,
- root.nf.Dialog,
- root.nf.TemplatesTable,
- root.nf.ErrorHandler,
- root.nf.Storage);
- }
-}(this, function ($, nfCommon, nfDialog, nfTemplatesTable, nfErrorHandler, nfStorage) {
- 'use strict';
-
- $(document).ready(function () {
- // initialize the templates page
- nfTemplates.init();
- });
-
- /**
- * Configuration object used to hold a number of configuration items.
- */
- var config = {
- urls: {
- banners: '../nifi-api/flow/banners',
- about: '../nifi-api/flow/about',
- currentUser: '../nifi-api/flow/current-user'
- }
- };
-
- /**
- * Loads the current users.
- */
- var loadCurrentUser = function () {
- return $.ajax({
- type: 'GET',
- url: config.urls.currentUser,
- dataType: 'json'
- }).done(function (currentUser) {
- nfCommon.setCurrentUser(currentUser);
- }).fail(nfErrorHandler.handleAjaxError);
- };
-
- /**
- * Verifies if the current node is disconnected from the cluster.
- */
- var verifyDisconnectedCluster = function () {
- return $.Deferred(function (deferred) {
- if (top !== window && nfCommon.isDefinedAndNotNull(parent.nf) && nfCommon.isDefinedAndNotNull(parent.nf.Storage)) {
- deferred.resolve(parent.nf.Storage.isDisconnectionAcknowledged());
- } else {
- $.ajax({
- type: 'GET',
- url: '../nifi-api/flow/cluster/summary',
- dataType: 'json'
- }).done(function (clusterSummaryResult) {
- var clusterSummaryResponse = clusterSummaryResult;
- var clusterSummary = clusterSummaryResponse.clusterSummary;
-
- if (clusterSummary.connectedToCluster) {
- deferred.resolve(false);
- } else {
- if (clusterSummary.clustered) {
- nfDialog.showDisconnectedFromClusterMessage(function () {
- deferred.resolve(true);
- });
- } else {
- deferred.resolve(false);
- }
- }
- }).fail(nfErrorHandler.handleAjaxError).fail(function () {
- deferred.reject();
- });
- }
- }).promise();
- };
-
- /**
- * Initializes the templates table.
- */
- var initializeTemplatesPage = function () {
- // define mouse over event for the refresh button
- $('#refresh-button').click(function () {
- nfTemplatesTable.loadTemplatesTable();
- });
-
- // get the banners if we're not in the shell
- return $.Deferred(function (deferred) {
- if (top === window) {
- $.ajax({
- type: 'GET',
- url: config.urls.banners,
- dataType: 'json'
- }).done(function (response) {
- // ensure the banners response is specified
- if (nfCommon.isDefinedAndNotNull(response.banners)) {
- if (nfCommon.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') {
- // update the header text
- var bannerHeader = $('#banner-header').text(response.banners.headerText).show();
-
- // show the banner
- var updateTop = function (elementId) {
- var element = $('#' + elementId);
- element.css('top', (parseInt(bannerHeader.css('height'), 10) + parseInt(element.css('top'), 10)) + 'px');
- };
-
- // update the position of elements affected by top banners
- updateTop('templates');
- }
-
- if (nfCommon.isDefinedAndNotNull(response.banners.footerText) && response.banners.footerText !== '') {
- // update the footer text and show it
- var bannerFooter = $('#banner-footer').text(response.banners.footerText).show();
-
- var updateBottom = function (elementId) {
- var element = $('#' + elementId);
- element.css('bottom', parseInt(bannerFooter.css('height'), 10) + 'px');
- };
-
- // update the position of elements affected by bottom banners
- updateBottom('templates');
- }
- }
-
- deferred.resolve();
- }).fail(function (xhr, status, error) {
- nfErrorHandler.handleAjaxError(xhr, status, error);
- deferred.reject();
- });
- } else {
- deferred.resolve();
- }
- }).promise();
- };
-
- var nfTemplates = {
- /**
- * Initializes the templates page.
- */
- init: function () {
- nfStorage.init();
-
- // load the current user
- $.when(verifyDisconnectedCluster(), loadCurrentUser()).done(function (verifyDisconnectedClusterResult) {
-
- // create the templates table
- nfTemplatesTable.init(verifyDisconnectedClusterResult);
-
- // load the table
- nfTemplatesTable.loadTemplatesTable().done(function () {
- // once the table is initialized, finish initializing the page
- initializeTemplatesPage().done(function () {
- var setBodySize = function () {
- //alter styles if we're not in the shell
- if (top === window) {
- $('body').css({
- 'height': $(window).height() + 'px',
- 'width': $(window).width() + 'px'
- });
-
- $('#templates').css('margin', 40);
- $('#templates-table').css('bottom', 127);
- $('#templates-refresh-container').css('margin', 40);
- }
-
- // configure the initial grid height
- nfTemplatesTable.resetTableSize();
- };
-
- // get the about details
- $.ajax({
- type: 'GET',
- url: config.urls.about,
- dataType: 'json'
- }).done(function (response) {
- var aboutDetails = response.about;
- var templatesTitle = aboutDetails.title + ' Templates';
-
- // set the document title and the about title
- document.title = templatesTitle;
- $('#templates-header-text').text(templatesTitle);
-
- // set the initial size
- setBodySize();
- }).fail(nfErrorHandler.handleAjaxError);
-
- $(window).on('resize', function (e) {
- setBodySize();
- // resize dialogs when appropriate
- var dialogs = $('.dialog');
- for (var i = 0, len = dialogs.length; i < len; i++) {
- if ($(dialogs[i]).is(':visible')) {
- setTimeout(function (dialog) {
- dialog.modal('resize');
- }, 50, $(dialogs[i]));
- }
- }
-
- // resize grids when appropriate
- var gridElements = $('*[class*="slickgrid_"]');
- for (var j = 0, len = gridElements.length; j < len; j++) {
- if ($(gridElements[j]).is(':visible')) {
- setTimeout(function (gridElement) {
- gridElement.data('gridInstance').resizeCanvas();
- }, 50, $(gridElements[j]));
- }
- }
-
- // toggle tabs .scrollable when appropriate
- var tabsContainers = $('.tab-container');
- var tabsContents = [];
- for (var k = 0, len = tabsContainers.length; k < len; k++) {
- if ($(tabsContainers[k]).is(':visible')) {
- tabsContents.push($('#' + $(tabsContainers[k]).attr('id') + '-content'));
- }
- }
- $.each(tabsContents, function (index, tabsContent) {
- nfCommon.toggleScrollable(tabsContent.get(0));
- });
- });
- });
- });
- });
- }
- };
-
- return nfTemplates;
-}));
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
index cf96108f6f70..d7fd74d0770f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/users/nf-users-table.js
@@ -639,8 +639,6 @@
policyLabel += 'remote process group ';
} else if (resource.startsWith('/reporting-tasks')) {
policyLabel += 'reporting task ';
- } else if (resource.startsWith('/templates')) {
- policyLabel += 'template ';
} else if (resource.startsWith('/parameter-contexts')) {
policyLabel += 'parameter context '
}
@@ -693,8 +691,6 @@
markup += '';
} else if (dataContext.component.resource.indexOf('/reporting-tasks') >= 0) {
//TODO: implement go to for RT
- } else if (dataContext.component.resource.indexOf('/templates') >= 0) {
- //TODO: implement go to for Templates
} else if (dataContext.component.resource.indexOf('/parameter-contexts') >= 0) {
markup += '';
}
@@ -883,7 +879,7 @@
return markup;
};
- // initialize the templates table
+ // initialize the users table
var usersColumns = [
{
id: 'identity',