[
https://issues.apache.org/jira/browse/NIFI-2795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511235#comment-15511235
]
ASF GitHub Bot commented on NIFI-2795:
--------------------------------------
Github user jvwing commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1042#discussion_r79936607
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js
---
@@ -24,13 +24,275 @@ nf.ClusterTable = (function () {
*/
var config = {
primaryNode: 'Primary Node',
- clusterCoorindator: 'Cluster Coordinator',
+ clusterCoordinator: 'Cluster Coordinator',
urls: {
cluster: '../nifi-api/controller/cluster',
- nodes: '../nifi-api/controller/cluster/nodes'
- }
+ nodes: '../nifi-api/controller/cluster/nodes',
+ systemDiagnostics: '../nifi-api/system-diagnostics'
+ },
+ data: [{
+ name: 'cluster',
+ update: refreshClusterData
+ },{
+ name: 'systemDiagnostics',
+ update: refreshSystemDiagnosticsData
+ }
+ ]
};
+ var commonTableOptions = {
+ forceFitColumns: true,
+ enableTextSelectionOnCells: true,
+ enableCellNavigation: false,
+ enableColumnReorder: false,
+ autoEdit: false,
+ rowHeight: 24
+ };
+
+ var nodesTab = {
+ name: 'Nodes',
+ data: {
+ dataSet: 'cluster',
+ update: updateNodesTableData
+ },
+ tabContentId: 'cluster-nodes-tab-content',
+ tableId: 'cluster-nodes-table',
+ tableColumnModel: createNodeTableColumnModel,
+ tableIdColumn: 'nodeId',
+ tableOptions: commonTableOptions,
+ tableOnClick: nodesTableOnClick,
+ init: commonTableInit,
+ onSort: sort,
+ onTabSelected: onSelectTab,
+ filterOptions: [{
+ text: 'by address',
+ value: 'address'
+ }, {
+ text: 'by status',
+ value: 'status'
+ }]
+ };
+
+ var jvmTab = {
+ name: 'JVM',
+ data: {
+ dataSet: 'systemDiagnostics',
+ update: updateJvmTableData
+ },
+ tabContentId: 'cluster-jvm-tab-content',
+ tableId: 'cluster-jvm-table',
+ tableColumnModel: [
+ {id: 'node', field: 'node', name: 'Node Address', sortable:
true, resizable: true},
+ {id: 'heapMax', field: 'maxHeap', name: 'Heap Max', sortable:
true, resizable: true, cssClass: 'cell-right', headerCssClass: 'header-right'},
+ {id: 'heapTotal', field: 'totalHeap', name: 'Heap Total',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'heapUsed', field: 'usedHeap', name: 'Heap Used',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'heapUtilPct', field: 'heapUtilization', name: 'Heap
Utilization', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'},
+ {id: 'nonHeapTotal', field: 'totalNonHeap', name: 'Non-Heap
Total', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'},
+ {id: 'nonHeapUsed', field: 'usedNonHeap', name: 'Non-Heap
Used', sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'gcOldGen', field: 'gcOldGen', name: 'G1 Old Generation',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'gcNewGen', field: 'gcNewGen', name: 'G1 Young
Generation', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'}
+ ],
+ tableIdColumn: 'id',
+ tableOptions: commonTableOptions,
+ tableOnClick: null,
+ init: commonTableInit,
+ onSort: sort,
+ onTabSelected: onSelectTab,
+ filterOptions: [{
+ text: 'by address',
+ value: 'address'
+ }]
+ };
+
+ var systemTab = {
+ name: 'System',
+ data: {
+ dataSet: 'systemDiagnostics',
+ update: updateSystemTableData
+ },
+ tabContentId: 'cluster-system-tab-content',
+ tableId: 'cluster-system-table',
+ tableColumnModel: [
+ {id: 'node', field: 'node', name: 'Node Address', sortable:
true, resizable: true},
+ {id: 'processors', field: 'processors', name: 'Processors',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'processorLoadAverage', field: 'processorLoadAverage',
name: 'Processor Load Average', sortable: true, resizable: true, cssClass:
'cell-right', headerCssClass: 'header-right'},
+ {id: 'totalThreads', field: 'totalThreads', name: 'Total
Threads', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'},
+ {id: 'daemonThreads', field: 'daemonThreads', name: 'Daemon
Threads', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'}
+ ],
+ tableIdColumn: 'id',
+ tableOptions: commonTableOptions,
+ tableOnClick: null,
+ init: commonTableInit,
+ onSort: sort,
+ onTabSelected: onSelectTab,
+ filterOptions: [{
+ text: 'by address',
+ value: 'address'
+ }]
+ };
+
+ var flowFileTab = {
+ name: 'FlowFile Storage',
+ data: {
+ dataSet: 'systemDiagnostics',
+ update: updateFlowFileTableData
+ },
+ tabContentId: 'cluster-flowfile-tab-content',
+ tableId: 'cluster-flowfile-table',
+ tableColumnModel: [
+ {id: 'node', field: 'node', name: 'Node Address', sortable:
true, resizable: true},
+ {id: 'ffRepoTotal', field: 'ffRepoTotal', name: 'Total Space',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'ffRepoUsed', field: 'ffRepoUsed', name: 'Used Space',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'ffRepoFree', field: 'ffRepoFree', name: 'Free Space',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'},
+ {id: 'ffStoreUtil', field: 'ffRepoUtil', name: 'Utilization',
sortable: true, resizable: true, cssClass: 'cell-right', headerCssClass:
'header-right'}
+ ],
+ tableIdColumn: 'id',
+ tableOptions: commonTableOptions,
+ tableOnClick: null,
+ init: commonTableInit,
+ onSort: sort,
+ onTabSelected: onSelectTab,
+ filterOptions: [{
+ text: 'by address',
+ value: 'address'
+ }]
+ };
+
+ var contentTab = {
+ name: 'Content Storage',
+ data: {
+ dataSet: 'systemDiagnostics',
+ update: updateContentTableData
+ },
+ tabContentId: 'cluster-content-tab-content',
+ tableId: 'cluster-content-table',
+ tableColumnModel: [
+ {id: 'node', field: 'node', name: 'Node Address', sortable:
true, resizable: true},
+ {id: 'contentRepoId', field: 'contentRepoId', name: 'Content
Repository', sortable: true, resizable: true},
+ {id: 'contentRepoTotal', field: 'contentRepoTotal', name:
'Total Space', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'},
+ {id: 'contentRepoUsed', field: 'contentRepoUsed', name: 'Used
Space', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'},
+ {id: 'contentRepoFree', field: 'contentRepoFree', name: 'Free
Space', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'},
+ {id: 'contentRepoUtil', field: 'contentRepoUtil', name:
'Utilization', sortable: true, resizable: true, cssClass: 'cell-right',
headerCssClass: 'header-right'}
+ ],
+ tableIdColumn: 'id',
+ tableOptions: commonTableOptions,
+ tableOnClick: null,
+ init: commonTableInit,
+ onSort: sort,
+ onTabSelected: onSelectTab,
+ filterOptions: [{
+ text: 'by address',
+ value: 'address'
+ }, {
+ text: 'by repository',
+ value: 'contentRepoId'
+ }]
+ };
+
+ var clusterTabs = [nodesTab, systemTab, jvmTab, flowFileTab,
contentTab];
--- End diff --
That's a great idea, @mcgilman, I'll look into it.
> Enhance Cluster UI with System Diagnostics
> ------------------------------------------
>
> Key: NIFI-2795
> URL: https://issues.apache.org/jira/browse/NIFI-2795
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Core UI
> Affects Versions: 1.0.0
> Reporter: James Wing
> Assignee: James Wing
> Priority: Minor
> Attachments: cluster-01-nodes.png, cluster-02-system.png,
> cluster-03-jvm.png, cluster-04-flowfile-store.png,
> cluster-05-content-store.png
>
>
> The Cluster UI currently provides some basic information on each node in the
> cluster and options for connecting and disconnecting nodes. I propose to add
> system diagnostics information in tables, contained in multiple tabs.
> Roughly, the tabs should cover the same content as the System Diagnostics
> dialog already in the System UI, but in a tabular format for comparing across
> nodes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)