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.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---