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

[BUG] Disable the functionality to edit the default dashboard details #576

Closed
venkateshamatam opened this issue Feb 23, 2024 · 9 comments · Fixed by #601
Closed

[BUG] Disable the functionality to edit the default dashboard details #576

venkateshamatam opened this issue Feb 23, 2024 · 9 comments · Fixed by #601
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@venkateshamatam
Copy link
Collaborator

Description

Since the details of default dashboards cannot be modified, we should deactivate this feature in the user interface.

Steps to Reproduce

  1. Go to any of the default dashboard page page /dashboard.html?id=a28f485c-4747-4024-bb6b-d230f101f852 and click on the gear icon on top right to edit the dashboard details.
  2. Disable the functionality to edit the dashboard details since they are not editable with a small message/indication to the user that these details cannot be edited.

Expected Behavior

  • The ability to edit should be disabled only for default dashboards, without affecting the functionality of non-default dashboards.
  • Rely on the API response to determine if these dashboards are editable. This approach simplifies the process of controlling which dashboards can be edited, as it only requires changes to the server code.
@venkateshamatam venkateshamatam added the bug Something isn't working label Feb 23, 2024
@AndrewHess AndrewHess added the good first issue Good for newcomers label Feb 23, 2024
@KiritoCyanPine
Copy link
Contributor

Hi , I'd like to work on this issue.

@AndrewHess
Copy link
Collaborator

Great, go ahead

@KiritoCyanPine
Copy link
Contributor

Hi @AndrewHess @venkateshamatam , I think the current api/dashboards/{dbID} API dosent give enough information to determine if the dashboard is a default one.

The properties returned are -> name, description, panels, and timeRange.
I think the absence of the properties like isFavorite and refresh could determine if the dashboard is a default one. But in longer run it may not be that effective for a solution.

Should it be fine to create a new api to determine default dashboards ? something like api/dashboards/isdefault/{dbID} .

@AndrewHess
Copy link
Collaborator

Yes you can add that endpoint. Alternatively, you should be able to call api/dashboards/defaultlistall to get the IDs of all the default dashboards and check if the current dashboard's ID is in that list

@KiritoCyanPine
Copy link
Contributor

Cool, should be able to do that . Thanks

@Sneha393
Copy link

I want to work on it

@nbhavana
Copy link
Collaborator

go ahead

@KiritoCyanPine
Copy link
Contributor

Is the above issue resolved ?

@AndrewHess
Copy link
Collaborator

@sonamgupta21 can you review #601 to fix this issue?

sonamgupta21 added a commit that referenced this issue May 29, 2024
…ails (#601)

* Fix: #553 Add alt text for images in dashboard.html

* disable content modification on default dashboards

* remove log statement in dashboard.js 

Signed-off-by: Debasish Nandi <45676471+KiritoCyanPine@users.noreply.github.com>

* disable default dashboard edit, remove tooltip

Signed-off-by: Debasish Nandi <45676471+KiritoCyanPine@users.noreply.github.com>

---------

Signed-off-by: Debasish Nandi <45676471+KiritoCyanPine@users.noreply.github.com>
Signed-off-by: Sonam Gupta <71771131+sonamgupta21@users.noreply.github.com>
Co-authored-by: Debasish Nandi <debasish.nandi-intl@cylogic.com>
Co-authored-by: Sonam Gupta <71771131+sonamgupta21@users.noreply.github.com>
Co-authored-by: nbhavana <bnawale@sigscalr.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants