Raw datum that we store:
{
"_day_start_at": "2014-03-10T00:00:00+00:00",
"_hour_start_at": "2014-03-10T00:00:00+00:00",
"_id": "20140310_apply-carers-allowance",
"_month_start_at": "2014-03-01T00:00:00+00:00",
["_at", index: 6, input: "_start_at"] |
from stagecraft.apps.dashboards.models.module import ModuleType | |
grouped_timeseries = ModuleType.objects.get(name='grouped_timeseries') | |
new_json = {u'definitions': {u'axis': {u'type': u'object', u'properties': {u'label': {u'required': True, u'type': u'string'}, u'key': {u'oneOf': [{u'type': u'string'}, {u'type': u'array'}], u'required': False}, u'format': {u'oneOf': [{u'type': u'string'}, {u'type': u'object', u'properties': {u'type': {u'type': u'string'}}}]}}}}, u'$schema': u'http://json-schema.org/draft-03/schema#', u'allOf': [{u'definitions': {u'query-params': {u'type': u'object', u'properties': {u'start_at': {u'required': False, u'type': u'string'}, u'period': {u'allOf': [{u'required': False}, {u'enum': [u'hour', u'day', u'week', u'month', u'quarter'], u'type': u'string'}]}, u'filter_by': {u'items': {u'type': u'string'}, u'required': False, u'type': u'array'}, u'collect': {u'items': {u'pattern': u':(sum|mean|set|count)$', u'type': u'string'}, u'required': False, u'type': u'array'}, u'group_by': {u'oneOf': |
{ | |
"entrypoint": "performanceplatform.collector.webtrends.reports", | |
"data-set": { | |
"data-group": "foo", | |
"data-type": "bar" | |
}, | |
"query": { | |
"report_id": "alphanumeric-string" | |
}, | |
"options": { |
Ubuntu 12.04.2 LTS | |
Ubuntu 12.04.2 LTS | |
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-70-virtual x86_64) | |
* Documentation: https://help.ubuntu.com/ | |
84 packages can be updated. | |
0 updates are security updates. | |
New release '14.04.1 LTS' available. |
{"trim": false, "value-attribute": "rating", "axis-period": "month"} |
{ | |
"data": [ | |
{ | |
"_day_start_at": "2014-04-07T00:00:00+00:00", | |
"_end_at": "2014-04-14T00:00:00+00:00", | |
"_hour_start_at": "2014-04-07T00:00:00+00:00", | |
"_id": "MjAxNC0wNC0wN1QwMDowMDowMCswMDowMF8yMDE0LTA0LTE0VDAwOjAwOjAwKzAwOjAw", | |
"_month_start_at": "2014-04-01T00:00:00+00:00", | |
"_quarter_start_at": "2014-04-01T00:00:00+00:00", | |
"_start_at": "2014-04-07T00:00:00+00:00", |
ctrl + w
, s
ctrl + w
, ctrl + w
ctrl + f
ctrl + b
.drone.yml
file: https://github.com/drone/drone/blob/v0.2.1/README.md#buildsdef set_content_security_policy | |
asset_hosts = "http://static.dev.gov.uk http://assets-origin.dev.gov.uk" | |
default_src = "default-src 'none'" | |
script_src = "script-src #{asset_hosts} http://www.google-analytics.com 'unsafe-inline'" | |
style_src = "style-src #{asset_hosts} 'unsafe-inline'" | |
img_src = "img-src #{asset_hosts}" | |
report_uri = "report-uri http://www.dev.gov.uk:8080/e" | |
csp_header = "#{default_src}; #{script_src}; #{style_src}; #{img_src}; #{report_uri}" |