Skip to content

Commit db8b70a

Browse files
committed
1.32.0 release
1 parent d607432 commit db8b70a

25 files changed

+502
-65
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# 1.32.0 (06/09/2016)
2+
3+
## Features
4+
5+
- Number Widget: Extended auto-sizing of numbers to up to 4 numbers per widget.
6+
7+
- Header Widget: New Widget with basic functionality for displaying simple headers at the top of Dashboards.
8+
9+
- Table Widget: Added click event handler: can provide a JavaScript function that gets executed when a table cell is clicked.
10+
11+
- Grid Layout Adjustments: Added new Page layout properties for adding/subtracting height or width from the dimensions of the page when calculating grid dimensions. This is useful for allowing a header to have a fixed
12+
height, while sizing the remaining widgets to fit the browser window.
13+
14+
## Bug Fixes
15+
16+
- Number Widget: fixed flicker when a Data Source refreshes and content is redrawn.
17+
118
# 1.31.0 (05/26/2016)
219

320
## Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Dashboards are defined declaratively as a JSON document, which contains all the
3434

3535
* Declarative definition of Dashboards, requiring no HTML or JavaScript (although it's optionally available)
3636

37-
* Included Widgets: annotationChart, chart, table, number, html, javascript, iframe, image, qrcode, stoplight, treemap, youtube
37+
* Included Widgets: Annotation Chart, Chart, Header, HTML, iFrame, Image, Javascript, Number, QRCode, Stoplight, Treemap, Youtube
3838

3939
* Included Data Sources: CyclotronData, Elasticsearch, Javascript, JSON, Graphite, Splunk
4040

cyclotron-site/app/partials/help/about.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ul
3737
h4 Features
3838
ul
3939
li Declarative definition of Dashboards, requiring no HTML or JavaScript (although it's optionally available)
40-
li Included Widgets: chart, html, iframe, image, javascript, number, qrcode, stoplight, table, youtube
40+
li Included Widgets: Annotation Chart, Chart, Header, HTML, iFrame, Image, Javascript, Number, QRCode, Stoplight, Treemap, Youtube
4141
li Included Data Sources: CyclotronData, Elasticsearch, Graphite, JavaScript, JSON, Splunk
4242
li Built-in data loading, filtering, and sorting
4343
li LDAP/Active Directory Integration

cyclotron-site/app/partials/help/layout.jade

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,15 @@ p Absolute sizing can be combined with the Grid Layout by defining only one prop
105105
| property and the
106106
em gridWidth
107107
| property together will create a fixed-height but fluid-width Widget.
108+
109+
h5 Combining Absolutely-Sized Widgets with Grid Layout
110+
111+
p It's possible to mix Widgets with absolute sizes in a grid layout, by using the
112+
em gridWidthAdjustment
113+
| and/or
114+
em gridHeightAdjustment
115+
| properties. These can be set to negative values to indicate the number of pixels to remove from the page height or width before calculating the grid sizes.
116+
117+
p For example, to add a 150px header onto a dashboard with a 10px gutter, the
118+
em gridHeightAdjustment
119+
| would be set to -160. Then the remaining Widgets would be sized-to-fit as if the page height was actually 160 pixels shorter.

cyclotron-site/app/scripts/common/services/services.commonConfigService.coffee

Lines changed: 122 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cyclotronServices.factory 'commonConfigService', ->
2626

2727
exports = {
2828

29-
version: '1.31.0'
29+
version: '1.32.0'
3030

3131
logging:
3232
enableDebug: false
@@ -54,13 +54,23 @@ cyclotronServices.factory 'commonConfigService', ->
5454
required: true
5555
order: 0
5656

57+
displayName:
58+
label: 'Display Name'
59+
description: 'Display Name; this is displayed in the browser title bar or the Header Widget.'
60+
placeholder: 'Display Name'
61+
type: 'string'
62+
required: false
63+
inlineJs: true
64+
defaultHidden: true
65+
order: 1
66+
5767
description:
5868
label: 'Description'
5969
description: 'A short summary of the Dashboard\'s purpose or capabilities.'
6070
placeholder: 'A short summary of the Dashboard\'s purpose or capabilities.'
6171
type: 'string'
6272
required: false
63-
order: 1
73+
order: 2
6474

6575
theme:
6676
label: 'Theme'
@@ -84,7 +94,7 @@ cyclotronServices.factory 'commonConfigService', ->
8494
dark2:
8595
value: 'dark2'
8696
dashboardBackgroundColor: 'black'
87-
order: 2
97+
order: 5
8898

8999
style:
90100
label: 'Style'
@@ -98,7 +108,7 @@ cyclotronServices.factory 'commonConfigService', ->
98108
fullscreen:
99109
value: 'fullscreen'
100110
defaultHidden: true
101-
order: 3
111+
order: 6
102112

103113
autoRotate:
104114
label: 'Auto-Rotate'
@@ -107,7 +117,7 @@ cyclotronServices.factory 'commonConfigService', ->
107117
default: false
108118
required: false
109119
defaultHidden: true
110-
order: 4
120+
order: 10
111121

112122
duration:
113123
label: 'Auto-Rotate Duration (seconds)'
@@ -117,7 +127,7 @@ cyclotronServices.factory 'commonConfigService', ->
117127
default: 60
118128
required: false
119129
defaultHidden: true
120-
order: 5
130+
order: 11
121131

122132
preload:
123133
label: 'Pre-Load Time (seconds)'
@@ -127,7 +137,7 @@ cyclotronServices.factory 'commonConfigService', ->
127137
default: 0.050
128138
required: false
129139
defaultHidden: true
130-
order: 6
140+
order: 12
131141

132142
allowFullscreen:
133143
label: 'Allow Fullscreen'
@@ -194,38 +204,53 @@ cyclotronServices.factory 'commonConfigService', ->
194204
type: 'integer'
195205
required: false
196206
order: 1
207+
gridWidthAdjustment:
208+
label: 'Grid Page Width Adjustment'
209+
description: 'Specifies an adjustment (in pixels) to the width of the page when calculating the grid layout. If the value is positive, the page width will have the adjustment added to it (making each column wider), whereas if it is negative, the page width will be reduced (making each column skinnier).'
210+
type: 'integer'
211+
default: 0
212+
required: false
213+
defaultHidden: true
214+
order: 2
215+
gridHeightAdjustment:
216+
label: 'Grid Page Height Adjustment'
217+
description: 'Specifies an adjustment (in pixels) to the height of the page when calculating the grid layout. If the value is positive, the page height will have the adjustment added to it (making each row taller), whereas if it is negative, the page height will be reduced (making each row shorter). This is commonly used with a fixed-height Header widget.'
218+
type: 'integer'
219+
default: 0
220+
required: false
221+
order: 3
197222
gutter:
198223
label: 'Gutter'
199224
description: 'Controls the space (in pixels) between widgets positioned in the grid. The default value is 10.'
200225
type: 'integer'
201226
default: 10
202227
required: false
203228
defaultHidden: true
204-
order: 2
229+
order: 5
205230
borderWidth:
206231
label: 'Border Width'
207232
description: 'Specifies the pixel width of the border around each widget. Can be set to 0 to remove the border. If omitted, the theme default will be used.'
208233
type: 'integer'
209234
default: null
210235
required: false
211236
defaultHidden: true
212-
order: 3
237+
order: 6
213238
margin:
214239
label: 'Margin'
215240
description: 'Controls the empty margin width (in pixels) around the outer edge of the Dashboard. Can be set to 0 to remove the margin.'
216241
type: 'integer'
217242
default: 10
218243
required: false
219244
defaultHidden: true
220-
order: 4
245+
order: 7
221246
scrolling:
222247
label: 'Scrolling Enabled'
223248
description: 'Enables vertical scrolling of the page to display content longer than the current browser size.'
224249
type: 'boolean'
225250
default: true
226251
required: false
227252
defaultHidden: true
228-
order: 5
253+
order: 8
229254
order: 2
230255
widgets:
231256
label: 'Widgets'
@@ -2084,6 +2109,77 @@ cyclotronServices.factory 'commonConfigService', ->
20842109
required: false
20852110
order: 10
20862111

2112+
header:
2113+
name: 'header'
2114+
icon: 'fa-header'
2115+
properties:
2116+
headerTitle:
2117+
label: 'Header Title'
2118+
description: 'Contains properties for displaying a title in the header.'
2119+
type: 'propertyset'
2120+
order: 10
2121+
properties:
2122+
showTitle:
2123+
label: 'Show Title'
2124+
description: 'Determines whether a title will be shown. If the Widget has a Title, it will be shown, otherwise it defaults to the Dashboard\'s Display Name or Name.'
2125+
type: 'boolean'
2126+
default: true
2127+
required: false
2128+
inlineJs: true
2129+
order: 1
2130+
showPageName:
2131+
label: 'Show Page Name'
2132+
description: 'Determines whether the current page name will be shown as part of the title.'
2133+
type: 'boolean'
2134+
default: true
2135+
required: false
2136+
inlineJs: true
2137+
order: 2
2138+
pageNameSeparator:
2139+
label: 'Page Name Separator'
2140+
description: 'Configures a string to use to separate the Dashboard name from the Page name. Defaults to a space.'
2141+
type: 'string'
2142+
required: false
2143+
default: ''
2144+
inlineJs: true
2145+
defaultHidden: true
2146+
order: 3
2147+
titleSize:
2148+
label: 'Title Size'
2149+
description: 'Sets the font size for the header title (if displayed). Any valid CSS height is allowed.'
2150+
type: 'string'
2151+
required: false
2152+
inlineJs: true
2153+
order: 5
2154+
logoUrl:
2155+
label: 'Logo URL'
2156+
description: 'Contains a URL to a dashboard logo to display before the title. Data URLs can be used.'
2157+
type: 'string'
2158+
required: false
2159+
inlineJs: true
2160+
order: 10
2161+
logoSize:
2162+
label: 'Logo Size'
2163+
description: 'Sets the height for the header logo (if displayed). The logo will be scaled without changing the aspect ratio. Any valid CSS height is allowed.'
2164+
type: 'string'
2165+
required: false
2166+
inlineJs: true
2167+
order: 11
2168+
link:
2169+
label: 'Link'
2170+
description: 'If set, makes the Logo and Title a link to this URL.'
2171+
type: 'string'
2172+
required: false
2173+
inlineJs: true
2174+
order: 20
2175+
customHtml:
2176+
label: 'HTML Content'
2177+
description: 'Provides additional HTML content to be displayed in the header. This can be used to customize the header display.'
2178+
type: 'editor'
2179+
editorMode: 'html'
2180+
required: false
2181+
inlineJs: true
2182+
order: 11
20872183
html:
20882184
name: 'html'
20892185
icon: 'fa-html5'
@@ -2427,13 +2523,20 @@ cyclotronServices.factory 'commonConfigService', ->
24272523
horizontal:
24282524
value: 'horizontal'
24292525
order: 12
2526+
autoSize:
2527+
label: 'Auto-Size Numbers'
2528+
description: 'If true, up to 4 numbers will be automatically sized-to-fit in the Widget. If false, or if there are more than four numbers, all numbers will be listed sequentially.'
2529+
type: 'boolean'
2530+
required: false
2531+
default: true
2532+
order: 13
24302533
link:
24312534
label: 'Link'
24322535
description: 'Optional, specifies a URL that will be displayed at the bottom of the widget as a link.'
24332536
placeholder: 'URL'
24342537
type: 'url'
24352538
required: false
2436-
order: 13
2539+
order: 14
24372540
filters:
24382541
label: 'Filters'
24392542
description: "Optional, but if provided, specifies name-value pairs used to filter the data source's result set. This has no effect if the dataSource property is not set.\nOnly the first row of the data source is used to get data, so this property can be used to narrow down on the correct row"
@@ -2630,6 +2733,13 @@ cyclotronServices.factory 'commonConfigService', ->
26302733
type: 'string'
26312734
inlineJs: true
26322735
defaultHidden: true
2736+
onClick:
2737+
label: 'Click Event'
2738+
description: 'This event occurs when the user clicks on a cell in this column. If this property is set with a JavaScript function, the function will be called as an event handler.'
2739+
type: 'editor'
2740+
editorMode: 'javascript'
2741+
required: false
2742+
defaultHidden: true
26332743
link:
26342744
label: 'Link'
26352745
description: 'If provided, the cell text will be made into a link rather than plain text.'

cyclotron-site/app/scripts/dashboards/controller.dashboard.coffee

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,17 @@ cyclotronApp.controller 'DashboardController', ($scope, $stateParams, $location,
5252
currentPage = $scope.dashboard.pages[$scope.currentPageIndex]
5353
pageName = dashboardService.getPageName(currentPage, $scope.currentPageIndex)
5454

55-
loadService.setTitle $scope.dashboard.name + ' | ' + pageName + ' | Cyclotron'
55+
displayName = _.jsExec($scope.dashboard.displayName) || $scope.dashboard.name
56+
loadService.setTitle displayName + ' | ' + pageName + ' | Cyclotron'
5657
if currentPage.name? || $scope.currentPageIndex != 0
5758
$location.path '/' + $scope.dashboard.name + '/' + _.slugify pageName
5859
else
5960
$location.path '/' + $scope.dashboard.name
6061

62+
# Save values accessible to Dashboards
63+
Cyclotron.dashboardName = $scope.dashboard.name
64+
Cyclotron.pageName = pageName
65+
6166
#
6267
# Increments the page index and loads the next page into the dashboard (hidden)
6368
#

cyclotron-site/app/scripts/dashboards/services/services.layoutService.coffee

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ cyclotronServices.factory 'layoutService', ->
2727
gridSquareMax: 300
2828
gridSquareMid: 220
2929

30+
gridWidthAdjustment: dashboardPage.layout.gridWidthAdjustment || 0
31+
gridHeightAdjustment: dashboardPage.layout.gridHeightAdjustment || 0
32+
3033
# Padding around outer edge of dashboard
3134
margin: dashboardPage.layout.margin
3235

@@ -55,10 +58,10 @@ cyclotronServices.factory 'layoutService', ->
5558
layout.margin = 0
5659

5760
updateInnerWidth = ->
58-
layout.innerWidth = layout.width - (layout.margin * 2)
61+
layout.innerWidth = layout.width + layout.gridWidthAdjustment - (layout.margin * 2)
5962

6063
updateInnerHeight = ->
61-
layout.innerHeight = layout.height - (layout.margin * 2)
64+
layout.innerHeight = layout.height + layout.gridHeightAdjustment - (layout.margin * 2)
6265

6366
# Set the layout column count and calculate the width of each
6467
calculateSquareWidth = (gridColumns) ->
@@ -84,6 +87,9 @@ cyclotronServices.factory 'layoutService', ->
8487

8588
# Phone portrait mode (400px max width)
8689
if layout.width <= 400 and layout.width < layout.height
90+
layout.gridHeightAdjustment = 0
91+
layout.gridWidthAdjustment = 0
92+
8793
layout.width -= 16 # Add some padding on the right for the scroll bar
8894
reducePadding()
8995

@@ -95,6 +101,9 @@ cyclotronServices.factory 'layoutService', ->
95101

96102
# Phone landscape mode (400px max height)
97103
else if layout.height <= 400 and layout.width > layout.height
104+
layout.gridHeightAdjustment = 0
105+
layout.gridWidthAdjustment = 0
106+
98107
layout.width -= 16 # Add some padding on the right for the scroll bar
99108
reducePadding()
100109

cyclotron-site/app/styles/themes/dark.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
@import "../../widgets/annotationChart/_annotationChart.less";
9494
@import "../../widgets/chart/_chart.less";
9595
@import "../../widgets/clock/_clock.less";
96+
@import "../../widgets/header/_header.less";
9697
@import "../../widgets/html/_html.less";
9798
@import "../../widgets/iframe/_iframe.less";
9899
@import "../../widgets/image/_image.less";

cyclotron-site/app/styles/themes/dark2.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
@import "../../widgets/annotationChart/_annotationChart.less";
105105
@import "../../widgets/chart/_chart.less";
106106
@import "../../widgets/clock/_clock.less";
107+
@import "../../widgets/header/_header.less";
107108
@import "../../widgets/html/_html.less";
108109
@import "../../widgets/iframe/_iframe.less";
109110
@import "../../widgets/image/_image.less";

cyclotron-site/app/styles/themes/gto.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
@import "../../widgets/annotationChart/_annotationChart.less";
7777
@import "../../widgets/chart/_chart.less";
7878
@import "../../widgets/clock/_clock.less";
79+
@import "../../widgets/header/_header.less";
7980
@import "../../widgets/html/_html.less";
8081
@import "../../widgets/iframe/_iframe.less";
8182
@import "../../widgets/image/_image.less";

0 commit comments

Comments
 (0)