Skip to content
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

Dashboard: Enable filtering dashboards in search by current folder #16790

Merged
merged 8 commits into from
May 2, 2019

Conversation

dprokop
Copy link
Member

@dprokop dprokop commented Apr 26, 2019

First proposal to solve #14739

It assumes introducing simple query lang to the search (similar to Gmail's) https://github.com/nepsilon/search-query-parser

For now it naively supports folder:current keyword only, but I want to expand on this idea a little bit more when working on Search -> React migration.

The folder keyword results in search results from within specified folders. In longer run I would like to be able to add folder:[current|folder_name|folder_id] resolving. I assume (not sure if there is a real need for that) but we could in the same manner search for specific tags and enable shareable search queries. But first we have to make sure this is something worth exploring.

@torkelo I don't want to put too much effort into this ATM, would love to focus on general search rewrite and deliver MVP here only. WDYT?

FYI @Ijin08

TODO:

  • Add tests
  • Add missing pointer cursors on dashboard folder/name

Copy link
Member

@torkelo torkelo left a comment

Choose a reason for hiding this comment

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

Great job!

  • Missing cursor: pointer on the navbar-page-btn (due to change from a tag to div)
  • There are different behavior when you click on dashboard name or folder name. Think both should behave the same it's a single "button". That is always open in folder context when in a folder.

public/app/core/components/search/search.ts Outdated Show resolved Hide resolved
@torkelo torkelo merged commit 7194c6d into master May 2, 2019
@torkelo torkelo deleted the search/current-folder-filter branch May 2, 2019 06:49
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 2, 2019
* grafana/master:
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 2, 2019
* grafana/master:
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 3, 2019
* grafana/master:
  Chore: Lowered implicit anys limit to 5623
  TestData: Add dashboards to testdata (grafana#16855)
  Input Datasource: convert from angular config to react ConfigEditor (grafana#16856)
  DataSources: minor typescript cleanups and comments (grafana#16860)
  TestDataDatasource: Add config editor (grafana#16861)
  App Plugins: support react pages and tabs (grafana#16586)
  Add Windows MSI generation to build process (grafana#16502)
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 3, 2019
…MetricPanelCtrl

* grafana/master: (24 commits)
  CSV: escape quotes in toCSV  (grafana#16874)
  Dashboard: Lazy load out of view panels (grafana#15554)
  LDAP: Added reload endpoint for LDAP config (grafana#15470)
  PluginsList: Removed icons and updated snapshots (grafana#16872)
  Panels: Fixed issue with panel type change and data updates (grafana#16871)
  Chore: fix modes for non-executable files (grafana#16864)
  DataSourceSettings: Minor fix for uncontrolled input (grafana#16863)
  Chore: Lowered implicit anys limit to 5623
  TestData: Add dashboards to testdata (grafana#16855)
  Input Datasource: convert from angular config to react ConfigEditor (grafana#16856)
  DataSources: minor typescript cleanups and comments (grafana#16860)
  TestDataDatasource: Add config editor (grafana#16861)
  App Plugins: support react pages and tabs (grafana#16586)
  Add Windows MSI generation to build process (grafana#16502)
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  ...
ryantxu added a commit to ryantxu/grafana that referenced this pull request May 3, 2019
* grafana/master: (44 commits)
  CSV: escape quotes in toCSV  (grafana#16874)
  Dashboard: Lazy load out of view panels (grafana#15554)
  LDAP: Added reload endpoint for LDAP config (grafana#15470)
  PluginsList: Removed icons and updated snapshots (grafana#16872)
  Panels: Fixed issue with panel type change and data updates (grafana#16871)
  Chore: fix modes for non-executable files (grafana#16864)
  DataSourceSettings: Minor fix for uncontrolled input (grafana#16863)
  Chore: Lowered implicit anys limit to 5623
  TestData: Add dashboards to testdata (grafana#16855)
  Input Datasource: convert from angular config to react ConfigEditor (grafana#16856)
  DataSources: minor typescript cleanups and comments (grafana#16860)
  TestDataDatasource: Add config editor (grafana#16861)
  App Plugins: support react pages and tabs (grafana#16586)
  Add Windows MSI generation to build process (grafana#16502)
  Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690)
  Add pattern validation in configs (grafana#16837)
  Search: Enable filtering dashboards in search by current folder (grafana#16790)
  FormLabel: allow any rather than just a string for tooltip (grafana#16841)
  prometheus: fix regression after adding support for tracing headers (grafana#16829)
  area/circleci: Speed up circleci build process for branches and pr (grafana#16778)
  ...
@marefr marefr changed the title Enable filtering dashboards in search by current folder Dashboard: Enable filtering dashboards in search by current folder May 7, 2019
@wolph
Copy link

wolph commented May 14, 2019

While this is a really cool feature, it would be great if it would still show a list of other categories as well.

Perhaps a nice option would be to have a separate action for clicking the folder vs. clicking the dashboard?

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

Successfully merging this pull request may close these issues.

None yet

3 participants