Skip to content

Fix dashboard create (copy, from file) #68

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jan 11, 2019
Merged

Conversation

davideschiera
Copy link
Contributor

  1. Scope is expected to be a string (no longer an object)
  2. Public sharing is disabled
  3. Old grouping configuration and scope support removed
  4. Patch dashboard format to fix UI custom scope warning

1. Scope is expected to be a string (no longer an object)
2. Public sharing is disabled
3. Old grouping configuration and scope support removed
4. Patch dashboard format to fix UI custom scope warning
@davideschiera davideschiera self-assigned this Jan 9, 2019
for sentry in scope:
baseconfid = baseconfid + str(list(sentry.keys())[0])
baseconfid = baseconfid + str(list(sentry.values())[0])
def create_dashboard_from_template(self, dashboard_name, template, scope, shared=False, annotations={}):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need the scope validation logic anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the old code, it seems that the logic assumes that the scope string is always a list of anded expressions, each with = operator. Also, the logic was then applied to use the obsolete JSON structure for the filter.

I trust the backend validation more than this obsolete logic.

@davideschiera
Copy link
Contributor Author

@nagsubram @alexgallotta how does this PR look? Thanks!

Copy link

@nagsubram nagsubram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls confirm that you tested the modified script and copying dashboard works correctly.

@davideschiera
Copy link
Contributor Author

If I'm not mistaken, the function I changed is used by 3 API functions: I tested the one used by the example "copy dashboard", and it was working properly. I expect the other 2 functions to work fine as well.

@davideschiera davideschiera merged commit cafb8f2 into master Jan 11, 2019
@davideschiera davideschiera deleted the fix-dashboard-create branch January 11, 2019 17:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants