NIFI-350:

- Updating the default sort direction where appropriate.
This commit is contained in:
Matt Gilman 2015-02-13 08:29:24 -05:00
parent bf97094b8c
commit 5c0ed559b5
6 changed files with 18 additions and 18 deletions

View File

@ -445,11 +445,11 @@ nf.ClusterTable = (function () {
var columnModel = [
{id: 'moreDetails', name: ' ', sortable: false, resizable: false, formatter: moreDetailsFormatter, width: 50, maxWidth: 50},
{id: 'node', field: 'node', name: 'Node Address', formatter: nodeFormatter, resizable: true, sortable: true},
{id: 'activeThreadCount', field: 'activeThreadCount', name: 'Active Thread Count', resizable: true, sortable: true},
{id: 'queued', field: 'queued', name: '<span class="queued-title">Queue</span>&nbsp;/&nbsp;<span class="queued-size-title">Size</span>', resizable: true, sortable: true},
{id: 'activeThreadCount', field: 'activeThreadCount', name: 'Active Thread Count', resizable: true, sortable: true, defaultSortAsc: false},
{id: 'queued', field: 'queued', name: '<span class="queued-title">Queue</span>&nbsp;/&nbsp;<span class="queued-size-title">Size</span>', resizable: true, sortable: true, defaultSortAsc: false},
{id: 'status', field: 'status', name: 'Status', formatter: statusFormatter, resizable: true, sortable: true},
{id: 'uptime', field: 'nodeStartTime', name: 'Uptime', formatter: valueFormatter, resizable: true, sortable: true},
{id: 'heartbeat', field: 'heartbeat', name: 'Last Heartbeat', formatter: valueFormatter, resizable: true, sortable: true}
{id: 'uptime', field: 'nodeStartTime', name: 'Uptime', formatter: valueFormatter, resizable: true, sortable: true, defaultSortAsc: false},
{id: 'heartbeat', field: 'heartbeat', name: 'Last Heartbeat', formatter: valueFormatter, resizable: true, sortable: true, defaultSortAsc: false}
];
// only allow the admin to modify the cluster

View File

@ -172,7 +172,7 @@ nf.CountersTable = (function () {
var countersColumns = [
{id: 'context', name: 'Context', field: 'context', sortable: true, resizable: true},
{id: 'name', name: 'Name', field: 'name', sortable: true, resizable: true},
{id: 'value', name: 'Value', field: 'value', sortable: true, resizable: true}
{id: 'value', name: 'Value', field: 'value', sortable: true, resizable: true, defaultSortAsc: false}
];
// only allow dfm's to reset counters

View File

@ -584,10 +584,10 @@ nf.ProvenanceTable = (function () {
// initialize the provenance table
var provenanceColumns = [
{id: 'moreDetails', name: '&nbsp;', sortable: false, resizable: false, formatter: moreDetailsFormatter, width: 50, maxWidth: 50},
{id: 'eventTime', name: 'Date/Time', field: 'eventTime', sortable: true, resizable: true},
{id: 'eventTime', name: 'Date/Time', field: 'eventTime', sortable: true, defaultSortAsc: false, resizable: true},
{id: 'eventType', name: 'Type', field: 'eventType', sortable: true, resizable: true},
{id: 'flowFileUuid', name: 'FlowFile Uuid', field: 'flowFileUuid', sortable: true, resizable: true},
{id: 'fileSize', name: 'Size', field: 'fileSize', sortable: true, resizable: true},
{id: 'fileSize', name: 'Size', field: 'fileSize', sortable: true, defaultSortAsc: false, resizable: true},
{id: 'componentName', name: 'Component Name', field: 'componentName', sortable: true, resizable: true, formatter: valueFormatter},
{id: 'componentType', name: 'Component Type', field: 'componentType', sortable: true, resizable: true}
];

View File

@ -301,10 +301,10 @@ nf.SummaryTable = (function () {
// define the input, read, written, and output columns (reused between both tables)
var nameColumn = {id: 'name', field: 'name', name: 'Name', sortable: true, resizable: true};
var runStatusColumn = {id: 'runStatus', field: 'runStatus', name: 'Run Status', formatter: runStatusFormatter, sortable: true};
var inputColumn = {id: 'input', field: 'input', name: '<span class="input-title">In</span>&nbsp;/&nbsp;<span class="input-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, resizable: true};
var ioColumn = {id: 'io', field: 'io', name: '<span class="read-title">Read</span>&nbsp;/&nbsp;<span class="written-title">Write</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Data size in the last 5 min', formatter: ioFormatter, sortable: true, resizable: true};
var outputColumn = {id: 'output', field: 'output', name: '<span class="output-title">Out</span>&nbsp;/&nbsp;<span class="output-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, resizable: true};
var tasksTimeColumn = {id: 'tasks', field: 'tasks', name: '<span class="tasks-title">Tasks</span>&nbsp;/&nbsp;<span class="time-title">Time</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / duration in the last 5 min', formatter: taskTimeFormatter, sortable: true, resizable: true};
var inputColumn = {id: 'input', field: 'input', name: '<span class="input-title">In</span>&nbsp;/&nbsp;<span class="input-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, defaultSortAsc: false, resizable: true};
var ioColumn = {id: 'io', field: 'io', name: '<span class="read-title">Read</span>&nbsp;/&nbsp;<span class="written-title">Write</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Data size in the last 5 min', formatter: ioFormatter, sortable: true, defaultSortAsc: false, resizable: true};
var outputColumn = {id: 'output', field: 'output', name: '<span class="output-title">Out</span>&nbsp;/&nbsp;<span class="output-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, defaultSortAsc: false, resizable: true};
var tasksTimeColumn = {id: 'tasks', field: 'tasks', name: '<span class="tasks-title">Tasks</span>&nbsp;/&nbsp;<span class="time-title">Time</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / duration in the last 5 min', formatter: taskTimeFormatter, sortable: true, defaultSortAsc: false, resizable: true};
// define the column model for the processor summary table
var processorsColumnModel = [
@ -565,7 +565,7 @@ nf.SummaryTable = (function () {
};
// define the input, read, written, and output columns (reused between both tables)
var queueColumn = {id: 'queued', field: 'queued', name: '<span class="queued-title">Queue</span>&nbsp;/&nbsp;<span class="queued-size-title">Size</span>', sortable: true, resize: true};
var queueColumn = {id: 'queued', field: 'queued', name: '<span class="queued-title">Queue</span>&nbsp;/&nbsp;<span class="queued-size-title">Size</span>', sortable: true, defaultSortAsc: false, resize: true};
// define the column model for the summary table
var connectionsColumnModel = [
@ -1264,8 +1264,8 @@ nf.SummaryTable = (function () {
var transmissionStatusColumn = {id: 'transmissionStatus', field: 'transmissionStatus', name: 'Transmitting', formatter: transmissionStatusFormatter, sortable: true, resizable: true};
var targetUriColumn = {id: 'targetUri', field: 'targetUri', name: 'Target URI', sortable: true, resizable: true};
var sentColumn = {id: 'sent', field: 'sent', name: '<span class="sent-title">Sent</span>&nbsp;/&nbsp;<span class="sent-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, resizable: true};
var receivedColumn = {id: 'received', field: 'received', name: '<span class="received-title">Received</span>&nbsp;/&nbsp;<span class="received-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, resizable: true};
var sentColumn = {id: 'sent', field: 'sent', name: '<span class="sent-title">Sent</span>&nbsp;/&nbsp;<span class="sent-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, defaultSortAsc: false, resizable: true};
var receivedColumn = {id: 'received', field: 'received', name: '<span class="received-title">Received</span>&nbsp;/&nbsp;<span class="received-size-title">Size</span>&nbsp;<span style="font-weight: normal; overflow: hidden;">5 min</span>', toolTip: 'Count / data size in the last 5 min', sortable: true, defaultSortAsc: false, resizable: true};
// define the column model for the summary table
var remoteProcessGroupsColumnModel = [

View File

@ -204,7 +204,7 @@ nf.TemplatesTable = (function () {
// initialize the templates table
var templatesColumns = [
{id: 'timestamp', name: 'Date/Time', field: 'timestamp', sortable: true, resizable: false, formatter: valueFormatter, width: 225, maxWidth: 225},
{id: 'timestamp', name: 'Date/Time', field: 'timestamp', sortable: true, defaultSortAsc: false, resizable: false, formatter: valueFormatter, width: 225, maxWidth: 225},
{id: 'name', name: 'Name', field: 'name', sortable: true, resizable: true},
{id: 'description', name: 'Description', field: 'description', sortable: true, resizable: true, formatter: valueFormatter},
{id: 'actions', name: '&nbsp;', sortable: false, resizable: false, formatter: actionFormatter, width: 100, maxWidth: 100}
@ -231,14 +231,14 @@ nf.TemplatesTable = (function () {
// initialize the sort
sort({
columnId: 'timestamp',
sortAsc: true
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', true);
templatesGrid.setSortColumn('timestamp', false);
templatesGrid.onSort.subscribe(function (e, args) {
sort({
columnId: args.sortCol.field,

View File

@ -592,7 +592,7 @@ nf.UsersTable = (function () {
{id: 'userName', name: 'User', field: 'userName', sortable: true, resizable: true},
{id: 'userGroup', name: 'Group', field: 'userGroup', sortable: true, resizable: true, formatter: valueFormatter},
{id: 'authorities', name: 'Roles', field: 'authorities', sortable: true, resizable: true, formatter: roleFormatter},
{id: 'lastAccessed', name: 'Last Accessed', field: 'lastAccessed', sortable: true, resizable: true, formatter: valueFormatter},
{id: 'lastAccessed', name: 'Last Accessed', field: 'lastAccessed', sortable: true, defaultSortAsc: false, resizable: true, formatter: valueFormatter},
{id: 'status', name: 'Status', field: 'status', sortable: true, resizable: false, formatter: statusFormatter},
{id: 'actions', name: '&nbsp;', sortable: false, resizable: false, formatter: actionFormatter, width: 100, maxWidth: 100}
];