dm-code/dm-web-assets/src/main/controllers/ObjectStatusHeaderController.js
/**
         * Updates the headers.
         * 
         * Month and date headers are re-populated based on the current list of
         * partition values.
         */
Updates the headers.

Month and date headers are re-populated based on the current list of
partition values.
Updates the headers . Month and date headers are re - populated based on the current list of partition values .
function updateHeaders()
        {
            vm.monthHeaders.splice(0);
            vm.dateHeaders.splice(0);
            var monthHeaderLookup = {};
            _(vm.partitionValues).each(function(partitionValue)
            {
                var partitionValueDate = moment(partitionValue);
                var monthHeaderId = partitionValueDate.format('YYYY-MM');
                var monthHeader = monthHeaderLookup[monthHeaderId];
                if (!monthHeader)
                {
                    monthHeader = {
                        id : monthHeaderId,
                        content : partitionValueDate.format('MMM'),
                        colspan : 1
                    };
                    monthHeaderLookup[monthHeaderId] = monthHeader;
                    vm.monthHeaders.push(monthHeader);
                }
                else
                {
                    monthHeader.colspan++;
                }
                vm.dateHeaders.push({
                    id : partitionValue,
                    content : partitionValueDate.format('D'),
                    isNotExpected : !expectedPartitionValueLookup[partitionValue]
                });
            });
        }
function updateHeaders ( ) { vm . monthHeaders . splice ( 0 ) ; vm . dateHeaders . splice ( 0 ) ; var monthHeaderLookup = { } ; _ ( vm . partitionValues ) . each ( function ( partitionValue ) { var partitionValueDate = moment ( partitionValue ) ; var monthHeaderId = partitionValueDate . format ( 'YYYY-MM' ) ; var monthHeader = monthHeaderLookup [ monthHeaderId ] ; if ( ! monthHeader ) { monthHeader = { id : monthHeaderId , content : partitionValueDate . format ( 'MMM' ) , colspan : 1 } ; monthHeaderLookup [ monthHeaderId ] = monthHeader ; vm . monthHeaders . push ( monthHeader ) ; } else { monthHeader . colspan ++ ; } vm . dateHeaders . push ( { id : partitionValue , content : partitionValueDate . format ( 'D' ) , isNotExpected : ! expectedPartitionValueLookup [ partitionValue ] } ) ; } ) ; }
Updates the headers.
Updates the headers .
// Clear headers // Lookup month header by year-month pair // Convert partition value into moment date // Create month ID. Concat of year and month // Find month header // If month header does not exist // Create new month header // Register to lookup // Add to month headers // If month header exists // Increment column span of header // Create and add to list of date headers