Skip to content

Commit

Permalink
1.45.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
baumandm committed Jan 4, 2017
1 parent 5d8f980 commit 256f6a9
Show file tree
Hide file tree
Showing 12 changed files with 260 additions and 10 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# 1.45.0 (12/21/2016)

## Features

- Clock Widget: Added option for Time Zone

- Moment Timezone: Added to Cyclotron and available for use in Dashboards. Includes all timezones, with data for years 2010-2020

- Table Widget: Added a JavaScript function to programmatically change the current page in the Table

- Example-London Dashboard: Added the example-london dashboard featured on the http://cyclotron.io page

# 1.44.0 (12/07/2016)

## Features

- InfluxDB Data Source: a new Data Source which runs queries against InfluxDB

- Example Portal Dashboard: a new example which implements a portal with links to various dashboards. Data is stored internally in CyclotronData, and an admin page is provided for adding/updating/deleting links.

## Bug Fixes

- Splunk Data Source: Fix error handling, avoid displaying error message if query finds no data

- Dashboard Editor: Fixed an issue with editing the Pages JSON before any Pages had been created

- Node.js 7.x: Fix compatibility issues by upgrading Karma and Mongoose versions

- Update included Nginx configuration to point to _public

# 1.43.0 (11/24/2016)

## Features
Expand Down
5 changes: 5 additions & 0 deletions cyclotron-site/app/partials/help/3rdparty.jade
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ table
a(href='http://momentjs.com/', target='_blank') Moment.js
td 2.13.0
td Parse, validate, manipulate, and display dates in javascript
tr
td
a(href='http://momentjs.com/timezone/', target='_blank') Moment Timezone
td 0.5.10
td Parse and display dates in any timezone. (Note: includes 2010-2020)
tr
td
a(href='http://numeraljs.com/', target='_blank') Numeral.js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cyclotronServices.factory 'commonConfigService', ->

exports = {

version: '1.44.0'
version: '1.45.0'

logging:
enableDebug: false
Expand Down Expand Up @@ -3081,6 +3081,12 @@ cyclotronServices.factory 'commonConfigService', ->
default: 'dddd, MMMM Do YYYY, h:mm:ss a'
required: false
order: 10
timezone:
label: 'Time Zone'
description: 'Enter time zone of your choice. "http://momentjs.com/timezone/" can help in choosing time zone'
required: false
type: 'string'
order: 11

header:
name: 'header'
Expand Down
7 changes: 5 additions & 2 deletions cyclotron-site/app/widgets/clock/clock.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
div.clock-widget(ng-controller='ClockWidget')
.the-number(number-count='1', is-horizontal='"false"')
h1.big {{ currentTime }}
h1.title(ng-if='::widget.title') {{ widgetTitle() }}
.widget-body
.widget-error(ng-if='widgetContext.dataSourceError')
.the-number(number-count='1', is-horizontal='"false"', ng-if='widgetContext.dataSourceError == false')
h1.big {{ currentTime }}
20 changes: 16 additions & 4 deletions cyclotron-site/app/widgets/clock/clockWidget.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,30 @@ cyclotronApp.controller 'ClockWidget', ($scope, $interval, configService) ->
$scope.widgetContext.allowExport = false

$scope.format = configService.widgets.clock.properties.format.default

$scope.timezone = null

# Load user-specified format if defined
if $scope.widget.format?
if !_.isEmpty($scope.widget.format)
$scope.format = _.jsExec $scope.widget.format

# Load user-specified time-zone if defined
if !_.isEmpty($scope.widget.timezone)
if moment.tz.zone($scope.widget.timezone)
$scope.timezone = _.jsExec $scope.widget.timezone
else
$scope.widgetContext.dataSourceError = true
$scope.widgetContext.dataSourceErrorMessage = '"' + _.jsExec $scope.widget.timezone + '" is not a valid time zone'

# Schedule an update every second
$scope.updateTime = ->
$scope.currentTime = moment().format $scope.format
temp = moment()
if $scope.timezone?
temp = temp.tz($scope.timezone)
$scope.currentTime = temp.format $scope.format

$scope.updateTime()
$scope.interval = $interval $scope.updateTime, 1000

#
# Cleanup
#
Expand Down
7 changes: 6 additions & 1 deletion cyclotron-site/app/widgets/table/tableWidget.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Optionally, headers can be provided by the callback as well
#

cyclotronApp.controller 'TableWidget', ($scope, $location, dashboardService, dataService, logService) ->
cyclotronApp.controller 'TableWidget', ($scope, $location, $window, dashboardService, dataService, logService) ->

$scope.columnGroups = []
sortFunction = _.jsEval $scope.widget.sortFunction
Expand All @@ -42,6 +42,11 @@ cyclotronApp.controller 'TableWidget', ($scope, $location, dashboardService, dat

if $scope.widget.pagination?.enabled
$scope.paging.itemsPerPage = $scope.widget.pagination.itemsPerPage

if $scope.widget.name?
$window.Cyclotron.currentPage.widgets[$scope.widget.name].goToPage = (pageNumber) ->
$scope.$evalAsync ->
$scope.paging.currentPage = 1

$scope.linkTarget = (column) ->
if column.openLinksInNewWindow?
Expand Down
1 change: 1 addition & 0 deletions cyclotron-site/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"masonry": "~4.1.1",
"metrics-graphics": "2.6.0",
"moment": "2.13.0",
"moment-timezone": "0.5.10",
"ngTranscludeMod": "izhaki/ngTranscludeMod",
"node-uuid": "1.4.3",
"numeraljs": "1.5.3",
Expand Down
1 change: 1 addition & 0 deletions cyclotron-site/gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ gulp.task 'vendor-scripts', ->
'highcharts.js'
'd3.js'
'ng-google-chart.js'
'moment.js'
'**'
])
.pipe concat 'vendor.js'
Expand Down
2 changes: 1 addition & 1 deletion cyclotron-site/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cyclotron-site",
"description": "Cyclotron: website",
"version": "1.44.0",
"version": "1.45.0",
"author": "Dave Bauman <dbauman@expedia.com>",
"license": "MIT",
"private": true,
Expand Down
9 changes: 9 additions & 0 deletions cyclotron-svc/examples/example-clock.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@
"gridRows": 2
},
"widgets": [{
"format": "",
"name": "Default",
"timezone": "",
"title": "Clock With Default Timezone",
"widget": "clock"
}, {
"format": "HH:mm:ss",
"layout": {},
"timezone": "America/Los_Angeles",
"title": "Clock With Timezone America/Los_Angeles",
"widget": "clock"
}, {
"format": "YYYY-MM-DD",
"timezone": "Asia/Kolkata",
"title": "Clock With Timezone Asia/Kolkata",
"widget": "clock"
}]
}],
"parameters": [],
"theme": "dark"
}
178 changes: 178 additions & 0 deletions cyclotron-svc/examples/example-london.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{
"dataSources": [{
"name": "unemployment",
"postProcessor": "/* Sourced from http://data.london.gov.uk/dataset/london-economy-today */\npp = function (data) {\n return _.map(data, function (row) {\n /* Parse Date string */\n var matches = /(\\w{3})-\\w{3} (\\d{4})/.exec(row.time);\n var time = moment(matches[1] + ' ' + matches[2], 'MMM YYYY');\n row.time = time.valueOf();\n return row;\n });\n}",
"type": "json",
"url": "http://pastebin.com/raw.php?i=Em3ErTvs"
}, {
"name": "workforce_jobs",
"postProcessor": "/* Sourced from http://data.london.gov.uk/dataset/workforce-jobs */\npp = function (data) {\n return _.map(data, function (row) {\n /* Parse Date string */\n var date = moment(row.date, 'MMM-YYYY');\n row.date = date.valueOf();\n return row;\n });\n}",
"type": "json",
"url": "http://pastebin.com/raw.php?i=awS9PNw4"
}, {
"name": "workforce_jobs_pie",
"postProcessor": "/* Sourced from http://data.london.gov.uk/dataset/workforce-jobs */\npp = function (data) {\n var last = _.omit(_.last(data), 'date');\n \n /* Pivot data for Pie Chart */\n var r = _.map(_.keys(last), function (key) {\n return {\n job_type: _.titleCase(key.replace(/_/g, ' ')).replace('Uk', 'UK'),\n total: last[key]\n };\n });\n console.log(r);\n return r;\n}",
"type": "json",
"url": "http://pastebin.com/raw.php?i=awS9PNw4"
}, {
"name": "workforce_change",
"type": "json",
"url": "http://pastebin.com/raw.php?i=FNKThZgt"
}],
"description": "Demonstration dashboard using data from http://data.london.gov.uk/. Contains public sector information licensed under the Open Government Licence v2.0.",
"name": "example-london",
"pages": [{
"frequency": 1,
"layout": {
"gridColumns": 6,
"gridHeightAdjustment": -100,
"gridRows": 2,
"gutter": 8,
"margin": 8
},
"widgets": [{
"allowFullscreen": false,
"gridWidth": 6,
"height": "90px",
"html": "<h1 style=\"margin-bottom: 0.3rem\">London/UK Employment and Workforce Statistics</h1>\n<p>Data sourced from the <a href=\"http://data.london.gov.uk/\">London Datastore</a>. Contains public sector information licensed under the <a href=\"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/2/\">Open Government Licence v2</a>.</p>",
"noscroll": true,
"themeVariant": "transparent",
"widget": "html"
}, {
"dataSource": "unemployment",
"gridHeight": 1,
"gridWidth": 3,
"highchart": {
"chart": {
"spacingTop": 15
},
"legend": {
"margin": 12,
"padding": 0
},
"series": [{
"name": "London",
"x": "time",
"y": "london_unemployment_rate"
}, {
"name": "UK",
"x": "time",
"y": "uk_unemployment_rate"
}],
"xAxis": {
"type": "datetime"
},
"yAxis": {
"title": {
"text": "Unemployment Rate (%)"
}
}
},
"layout": {},
"sortBy": ["time"],
"title": "Unemployment rate - 16 and over (Seasonally Adjusted)",
"widget": "chart"
}, {
"dataSource": "workforce_jobs",
"gridHeight": 1,
"gridWidth": 3,
"highchart": {
"chart": {
"spacingTop": 15
},
"legend": {
"margin": 12,
"padding": 0
},
"series": [{
"name": "London",
"x": "date",
"y": "london_total_workforce_jobs"
}, {
"name": "UK",
"x": "date",
"y": "uk_total_workforce_jobs",
"yAxis": 1
}],
"xAxis": {
"type": "datetime"
},
"yAxis": [{
"title": {
"text": "UK Workforce Jobs"
}
}, {
"opposite": true,
"title": {
"text": "London Workforce Jobs"
}
}]
},
"sortBy": ["date"],
"title": "Workforce Jobs (Seasonally Adjusted)",
"widget": "chart"
}, {
"columns": [{
"label": "Metric",
"name": "metric"
}, {
"group": "Total Workforce Jobs",
"label": "UK",
"name": "uk_total_workforce_jobs"
}, {
"border": "right",
"group": "Total Workforce Jobs",
"label": "London",
"name": "london_total_workforce_jobs"
}, {
"group": "Employee Jobs",
"label": "UK",
"name": "uk_employee_jobs"
}, {
"border": "right",
"group": "Employee Jobs",
"label": "London",
"name": "london_employee_jobs"
}, {
"group": "Self Employed Jobs",
"label": "UK",
"name": "uk_self_employed_jobs"
}, {
"group": "Self Employed Jobs",
"label": "London",
"name": "london_self_employed_jobs"
}],
"dataSource": "workforce_change",
"gridHeight": 1,
"gridWidth": 4,
"rules": [{
"columnsIgnored": ["metric"],
"numeralformat": "0.0%",
"rule": "'#{metric}'.indexOf('% Change') == 0"
}, {
"columnsIgnored": ["metric"],
"numeralformat": "0,0",
"rule": "'#{metric}'.indexOf('Change') == 0"
}],
"widget": "table"
}, {
"dataSource": "workforce_jobs_pie",
"filters": {
"job_type": "/UK (?!Total).*/"
},
"gridHeight": 1,
"gridWidth": 2,
"highchart": {
"series": [{
"type": "pie",
"x": "job_type",
"y": "total"
}]
},
"title": "UK Workforce Job Types (June 2015)",
"widget": "chart"
}]
}],
"parameters": [],
"theme": "darkmetro"
}
2 changes: 1 addition & 1 deletion cyclotron-svc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cyclotron-svc",
"description": "Cyclotron: REST API",
"version": "1.44.0",
"version": "1.45.0",
"author": "Dave Bauman <dbauman@expedia.com>",
"license": "MIT",
"private": true,
Expand Down

0 comments on commit 256f6a9

Please sign in to comment.