New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacked charts #1513

Merged
merged 15 commits into from Jul 13, 2015

Conversation

Projects
None yet
2 participants
@edmundoa
Member

edmundoa commented Jul 2, 2015

These changes make possible to create and view stacked charts on the web interface. To create a new stacked widget you need to put together some widgets on the search results page and then add them to a dashboard.

Known issues: custom interpolation is not supported by c3, and at the moment is not possible to edit the series data. I will work on those issues once the changes are in master.

Thanks!

@edmundoa edmundoa added this to the 1.2.0 milestone Jul 2, 2015

@edmundoa

This comment has been minimized.

Member

edmundoa commented Jul 3, 2015

Forgot to mention that this depends on Graylog2/graylog2-server#1284, that's why travis is now failing :)

case FIELD_CHART:
Map<String, Object> config = new HashMap<String, Object>() {{
final Map<String, Object> config = new HashMap<String, Object>() {{

This comment has been minimized.

@joschi

joschi Jul 3, 2015

Contributor

Maybe use ImmutableMap.of() instead of the anonymous HashMap class? This will only work if none of the values is null.

This comment has been minimized.

@edmundoa

edmundoa Jul 3, 2015

Member

The frontend should provide all those values when creating the widget without the user filling them in, so I think we can use the ImmutableMap.

String interval = (String) requestConfig.get("interval");
List<Map<String, Object>> series = (List<Map<String, Object>>) requestConfig.get("series");
if (!canReadStream(streamId)) return unauthorized();

This comment has been minimized.

@joschi

joschi Jul 3, 2015

Contributor

This should be checked first, before "unpacking" the configuration map.
Also: codestyle (yadda, yadda, yadda 😉).

This comment has been minimized.

@edmundoa

edmundoa Jul 3, 2015

Member

Tried to improve that a little, let me know what you think 😄

@joschi joschi self-assigned this Jul 3, 2015

@joschi

This comment has been minimized.

Contributor

joschi commented Jul 13, 2015

LGTM. 👍

joschi added a commit that referenced this pull request Jul 13, 2015

@joschi joschi merged commit 0cf7d47 into master Jul 13, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@joschi joschi deleted the stacked-charts branch Jul 13, 2015

@joschi joschi referenced this pull request Jul 24, 2015

Closed

Merged charts on dashboards #604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment