NIFI-8937 Show component name and version in configure dialog's title bar
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>
This closes #5238.
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.css
index 32aa8f3..1795d6d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.css
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.css
@@ -72,17 +72,25 @@
height: 56px;
background-color: #728E9B;
overflow: hidden;
-}
-
-.dialog-header-text {
color: #fff;
font-size: 18px;
font-family: 'Roboto Slab';
font-style: normal;
font-weight: bold;
- line-height: 56px;
- padding-left: 20px;
text-overflow: ellipsis;
+ line-height: 56px;
+ padding: 0 20px;
+ white-space: nowrap;
+}
+
+.dialog-header-subtitle {
+ font-size: 12px;
+ font-weight: normal;
+ padding-left: 10px;
+ margin-left: 10px;
+}
+.dialog-header-subtitle:not(:empty) {
+ border-left: 1px solid white;
}
.dialog-content {
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js
index 25fe57f..d8d1f6e 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/modal/jquery.modal.js
@@ -28,6 +28,7 @@
* header: true,
* footer: true,
* headerText: 'Dialog Header',
+ * subtitleText: 'Dialog subtitle',
* scrollableContentStyle: 'scrollable',
* buttons: [{
* buttonText: 'Cancel',
@@ -191,6 +192,9 @@
dialogHeaderText.text(nfDialogData.headerText);
}
+ $('<span></span>').addClass("dialog-header-subtitle").text(nfDialogData.subtitleText).appendTo(dialogHeader);
+
+
dialog.prepend(dialogHeader);
}
@@ -314,6 +318,12 @@
});
},
+ setSubtitle: function (text) {
+ return this.each(function () {
+ $(this).find('span.dialog-header-subtitle').text(text);
+ });
+ },
+
resize: function () {
var dialog = $(this);
var dialogContent = dialog.find('.dialog-content');
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
index 9c82f98..3fe01cd 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-service.js
@@ -1939,7 +1939,10 @@
// populate the controller service settings
nfCommon.populateField('controller-service-id', controllerService['id']);
+
nfCommon.populateField('controller-service-type', nfCommon.formatType(controllerService));
+ $('#controller-service-configuration').modal('setSubtitle', nfCommon.formatType(controllerService));
+
nfCommon.populateField('controller-service-bundle', nfCommon.formatBundle(controllerService['bundle']));
$('#controller-service-name').val(controllerService['name']);
$('#controller-service-comments').val(controllerService['comments']);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
index 4437b4f..b786604 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
@@ -712,7 +712,10 @@
// populate the processor settings
$('#processor-id').text(processor['id']);
+
$('#processor-type').text(nfCommon.formatType(processor));
+ $('#processor-configuration').modal('setSubtitle', nfCommon.formatType(processor));
+
$('#processor-bundle').text(nfCommon.formatBundle(processor['bundle']));
$('#processor-name').val(processor['name']);
$('#processor-enabled').removeClass('checkbox-unchecked checkbox-checked').addClass(processorEnableStyle);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
index f8b0b1a..6ffd8e9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-reporting-task.js
@@ -459,7 +459,10 @@
// populate the reporting task settings
nfCommon.populateField('reporting-task-id', reportingTask['id']);
+
nfCommon.populateField('reporting-task-type', nfCommon.formatType(reportingTask));
+ $('#reporting-task-configuration').modal('setSubtitle', nfCommon.formatType(reportingTask));
+
nfCommon.populateField('reporting-task-bundle', nfCommon.formatBundle(reportingTask['bundle']));
$('#reporting-task-name').val(reportingTask['name']);
$('#reporting-task-enabled').removeClass('checkbox-unchecked checkbox-checked').addClass(reportingTaskEnableStyle);