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

Fix broken link in dashboard with broken objects #4224

Merged
merged 7 commits into from
Jun 16, 2015

Conversation

lukasolson
Copy link
Member

Closes #4200.

When you have an object inside a dashboard that links to a no-longer-existent index pattern (or is in some way otherwise broken), the edit link was bad and would send you to a 404 page.

With this change, we link to the object editor in such cases, so you can modify the object. If the object itself has been deleted, the edit link should no longer show up at all.

This PR also removes the Inflection library, because it was only used in one place (to singularize "searches" to "search" etc.) and it wasn't even necessary.

@w33ble
Copy link
Contributor

w33ble commented Jun 15, 2015

This LGTM.

There seems to be a lot of custom code in a number of places when using the saved_object_registry though - I wonder if some of the functionality can be moved to that module instead.

Also, if we used an IndexedArray in there, you could get rid of your type mapping stuff and just use registry.all().byType[$scope.panel.type] in the _.find.

@w33ble w33ble assigned lukasolson and spalger and unassigned w33ble and lukasolson Jun 15, 2015
@spalger
Copy link
Contributor

spalger commented Jun 15, 2015

Yeah, saved_object_registry is a legacy module we should replace with an IndexedArray or actual Registry someday. Created #4243 to track

@spalger
Copy link
Contributor

spalger commented Jun 15, 2015

Everything here looks good, except that the 'notFound' query string param accepted by the saved object editor is not being utilized. This param displays a message helping the user understand what's going on.

image

The simplest solution was pretty dirty so I played around and wrote a solution that I think is a little cleaner. @lukasolson sent you a pr lukasolson#5

@spalger spalger assigned lukasolson and unassigned spalger Jun 15, 2015
@lukasolson lukasolson assigned spalger and unassigned lukasolson Jun 15, 2015
@spalger
Copy link
Contributor

spalger commented Jun 16, 2015

LGTM!

spalger added a commit that referenced this pull request Jun 16, 2015
Fix broken link in dashboard with broken objects
@spalger spalger merged commit 505fff6 into elastic:master Jun 16, 2015
@rashidkpc rashidkpc added v4.1.2 and removed v4.1.1 labels Jul 22, 2015
@rashidkpc rashidkpc mentioned this pull request Jul 22, 2015
@lukasolson lukasolson deleted the issues/4200 branch February 11, 2016 18:22
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.

4 participants