Skip to content

Commit

Permalink
1.34.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
baumandm committed Jul 7, 2016
1 parent bc4b032 commit 0868040
Show file tree
Hide file tree
Showing 43 changed files with 1,158 additions and 265 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 1.34.0 (07/07/2016)

## Features

- Dashboard Sidebar: Added a new sidebar with a toolbar of relevent links, ability to show/hide Widgets, and space for Dashboard-defined content to appear. Dashboards can use this space to provide useful information about the data or visualizations, or to add controls, filters, etc.

- Cyclotron.functions.forceUpdate: Added method to manually trigger an Angular.js digest cycle.

- Upgraded Moment.js to 2.13.0

## Bug Fixes

- Dashboard Performance: improved dashboard performance across the board

- Table Widget: fixed broken Freeze Headers functionality

- Header Widget: when displaying page name in the header, value was always blank

- Fixed Numeral formatting errors with non-numeric strings; added unit tests

# 1.33.0 (06/23/2016)

## Features
Expand Down
12 changes: 8 additions & 4 deletions cyclotron-site/app/partials/dashboard.jade
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

//- Dashboards
div.dashboard
div.dashboard.dashboard-page-background(ng-class='{ "has-sidebar": dashboard.sidebar.showDashboardSidebar }')

.click-cover

include dashboardSidebar

.dashboard-controls(ng-hide='dashboard.showDashboardControls == false')
i.fa.fa-chevron-left(ng-click='moveBack()', ng-class='{ disabled: !canMoveBack() }', title='Go to the previous page')
Expand All @@ -12,7 +16,7 @@ div.dashboard
i.fa.fa-chevron-right(ng-click='moveForward()', ng-class='{ disabled: !canMoveForward() }', title='Go to the next page')

.dashboard-pages
div(dashboard-page, dashboard='dashboard',
page='page', page-number='{{ currentPageIndex }}', page-overrides='dashboardOverrides.pages[currentPageIndex]',
ng-repeat='page in currentPage')
div(dashboard-page, ng-repeat='page in currentPage',
dashboard='dashboard', page='page', page-number='{{ currentPageIndex }}',
page-overrides='dashboardOverrides.pages[currentPageIndex]')

42 changes: 42 additions & 0 deletions cyclotron-site/app/partials/dashboardSidebar.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.dashboard-sidebar.collapsed.dashboard-page-background(ng-if='dashboard.sidebar.showDashboardSidebar')
.sidebar-expander-hitbox
.sidebar-expander
i.fa.fa-caret-right

.sidebar-header
h1(ng-if='dashboard.sidebar.showDashboardTitle == true') {{ dashboardDisplayName }}
table.iconbar(ng-if='dashboard.sidebar.showToolbar == true')
tr
td
a(ng-href='/edit/{{ dashboard.name }}', title='Edit this Dashboard', target='_blank')
i.fa.fa-edit
td(ng-if='analyticsEnabled()')
a(ng-href='/analytics/{{ dashboard.name }}', title='View Analytics for this Dashboard', target='_blank')
i.fa.fa-bar-chart
td
a(ng-href='{{ exportUrl }}', title='Export this Dashboard', target='_blank')
i.fa.fa-download
td(requires-auth)
i.fa.fa-thumbs-o-up(ng-if='!isLiked', ng-click='toggleLike()', title='Like this Dashboard')
i.fa.fa-thumbs-up(ng-if='isLiked', ng-click='toggleLike()', title='Unlike this Dashboard')

.sidebar-accordion

accordion-group(ng-repeat='content in dashboard.sidebar.sidebarContent track by $index', heading='{{ content.heading }}')
div(ng-bind-html='trustHtml(content.html)')

accordion-group(heading='Show/Hide Widgets', ng-if='dashboard.sidebar.showHideWidgets == true')
table.table
tr(ng-repeat='widget in widgetVisibilities track by $index')
td {{ widget.label }}
td
switch(ng-model='widget.visible', ng-change='changeVisibility(widget, $index)')
p.centered
a(ng-click='resetDashboardOverrides()', title='Reset to default')
i.fa.fa-refresh
| Reset to default
.sidebar-footer
.logos
a.logo(ng-repeat='logo in footerLogos', title='{{ logo.title }}',
ng-href='{{ logo.href }}', target='_self')
img(ng-src='{{ logo.src }}', alt='{{ logo.title }}')
2 changes: 1 addition & 1 deletion cyclotron-site/app/partials/header.jade
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
i.fa.fa-file-o
a.documentation(ui-sref='help', target='_blank' title='Documentation for Cyclotron')
i.fa.fa-question-circle
a.analytics(ui-sref='analytics', title='Analytics for Cyclotron')
a.analytics(ng-if='analyticsEnabled()', ui-sref='analytics', title='Analytics for Cyclotron')
i.fa.fa-bar-chart
a.login(requires-auth, ng-click='login()', ng-if='!isLoggedIn()', title='Login')
i.fa.fa-unlock
Expand Down
2 changes: 1 addition & 1 deletion cyclotron-site/app/partials/help/3rdparty.jade
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ table
tr
td
a(href='http://momentjs.com/', target='_blank') Moment.js
td 2.8.4
td 2.13.0
td Parse, validate, manipulate, and display dates in javascript
tr
td
Expand Down
12 changes: 12 additions & 0 deletions cyclotron-site/app/partials/help/javascriptApi.jade
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ table
td Cyclotron.getDeeplink()
td Returns a deeplink URL to the current Dashboard, including the values of all Parameters

h4 Functions

p These functions are hooks into Cyclotron that can be leveraged by Dashboards

table
tr
th Function
th Description
tr
td Cyclotron.functions.forceUpdate()
td Forces Cyclotron to do an internal update of Dashboard state, e.g. syncing parameters to the URL. In general, this should not be needed, but can be used to immediately trigger an update cycle after running custom JavaScript.

h4 Built-In Parameters

p These Parameters are built-in to every Dashboard, and appear in the URL when set. They don't have to be configured manually in the Parameters section of the Dashboard, but they can be added there in order to change the default value.
Expand Down
2 changes: 1 addition & 1 deletion cyclotron-site/app/partials/home.jade
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
a.documentation(ui-sref='help', title='Documentation for Cyclotron')
i.fa.fa-question-circle
span Help
a.login(ui-sref='analytics', title='Analytics for Cyclotron')
a.login(ng-if='analyticsEnabled()', ui-sref='analytics', title='Analytics for Cyclotron')
i.fa.fa-bar-chart
span Analytics
a.login(requires-auth, ng-if='!isLoggedIn()', ng-click='login()',title='Login')
Expand Down
1 change: 1 addition & 0 deletions cyclotron-site/app/partials/sidebarAccordion.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.panel-group(ng-transclude='')
8 changes: 8 additions & 0 deletions cyclotron-site/app/partials/sidebarAccordionGroup.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.panel.panel-default
.panel-heading(ng-click='toggleOpen()')
h4.panel-title
a.accordion-toggle(accordion-transclude='heading')
span(ng-class='{"text-muted": isDisabled}') {{heading}}

.panel-collapse(uib-collapse='!isOpen')
.panel-body(ng-style='styles', ng-transclude='')
7 changes: 5 additions & 2 deletions cyclotron-site/app/scripts/common/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ cyclotronApp = angular.module 'cyclotronApp', [
'ui.bootstrap'
'ui.ace'
'drahak.hotkeys'
'googlechart'
'LocalForageModule'
'tableSort'
'googlechart'
'uiSwitch'
]

cyclotronDirectives = angular.module 'cyclotronApp.directives', []
Expand Down Expand Up @@ -309,7 +310,7 @@ cyclotronApp.config ($stateProvider, $urlRouterProvider, $locationProvider, $con
}
$locationProvider.hashPrefix = '!'

cyclotronApp.run ($rootScope, $urlRouter, $location, $state, $stateParams, $uibModal, userService) ->
cyclotronApp.run ($rootScope, $urlRouter, $location, $state, $stateParams, $uibModal, configService, userService) ->

#
# Authentication-related scope variables
Expand All @@ -318,6 +319,8 @@ cyclotronApp.run ($rootScope, $urlRouter, $location, $state, $stateParams, $uibM
$rootScope.isAdmin = userService.isAdmin
$rootScope.currentUser = userService.currentUser

$rootScope.analyticsEnabled = -> configService.enableAnalytics

$rootScope.login = (isModal = false) ->
options =
templateUrl: '/partials/login.html'
Expand Down
3 changes: 2 additions & 1 deletion cyclotron-site/app/scripts/common/mixins.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ _.mixin({
return 'NaN' if _.isNaN value

if !_.isNumber(value)
value = parseFloat(value)
parsedValue = parseFloat(value)
if _.isNaN parsedValue then return value else value = parsedValue
return numeral(value).format(format)

# ngApply: Takes a scope and a function, and returns a function that calls $apply around the given function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cyclotronServices.factory 'commonConfigService', ->

exports = {

version: '1.33.0'
version: '1.34.0'

logging:
enableDebug: false
Expand Down Expand Up @@ -171,6 +171,67 @@ cyclotronServices.factory 'commonConfigService', ->
default: true
defaultHidden: true

sidebar:
label: 'Sidebar'
description: ''
type: 'propertyset'
default: {}
defaultHidden: true
properties:
showDashboardSidebar:
label: 'Show Dashboard Sidebar'
description: 'If false, hides the default Dashboard Sidebar.'
type: 'boolean'
required: false
default: false
order: 10
showDashboardTitle:
label: 'Include Dashboard Title'
description: 'Enables a section of the sidebar for the Dashboard title.'
type: 'boolean'
required: false
default: true
defaultHidden: true
order: 11
showToolbar:
label: 'Include Toolbar'
description: 'Enables a toolbar in the sidebar.'
type: 'boolean'
required: false
default: true
defaultHidden: true
order: 12
showHideWidgets:
label: 'Include Show/Hide Widgets'
description: 'Enables a section of the sidebar for overriding the visibility of Widgets.'
type: 'boolean'
required: false
default: false
defaultHidden: true
order: 13
sidebarContent:
label: 'Custom Sidebar Sections'
singleLabel: 'Section'
description: 'One or more sections of content to display in the Sidebar.'
type: 'propertyset[]'
default: []
order: 15
properties:
heading:
label: 'Heading'
description: 'Heading for the Sidebar section.'
type: 'string'
inlineJs: true
order: 1
html:
label: 'HTML Content'
description: 'HTML Content to display.'
placeholder: 'Value'
type: 'editor'
editorMode: 'html'
inlineJs: true
order: 2

pages:
label: 'Pages'
description: 'The list of Page definitions which compose the Dashboard.'
Expand Down Expand Up @@ -1065,6 +1126,17 @@ cyclotronServices.factory 'commonConfigService', ->

sample:
name: ''
sidebar:
showDashboardSidebar: true

# Dashboard Sidebar
dashboardSidebar:
footer:
logos: [{
title: 'Cyclotron'
src: '/img/favicon32.png'
href: '/'
}]

# List of help pages
help: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,16 @@ cyclotronServices.factory 'dashboardService', ($http, $resource, $q, analyticsSe
else
pageName

service.getWidgetName = (widget, index) ->
if !widget.widget? || widget.widget == ''
return 'Widget ' + (index + 1)
if widget?.name?.length > 0
return _.titleCase(widget.widget) + ': ' + widget.name
else if widget.title?.length > 0
return _.titleCase(widget.widget) + ': ' + widget.title
else
return _.titleCase(widget.widget)

service.getVisitCategory = (dashboard) ->
return null unless dashboard?
visits = dashboard.visits
Expand Down
Loading

0 comments on commit 0868040

Please sign in to comment.