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

Wildcard support #144

Open
rouba002 opened this issue May 5, 2019 · 1 comment
Open

Wildcard support #144

rouba002 opened this issue May 5, 2019 · 1 comment
Labels

Comments

@rouba002
Copy link

rouba002 commented May 5, 2019

This is more of a feature request.

It would be handy for some cases to support wildcard searches.
Using the SQL LIKE syntax
./dcm.pl -r vlan_campus_display campus='%East%'

As I went through the code it looks like adjustments are needed in 'ona/www/include/functions_db.inc.php, function db_get_record' but I am not really good at PHP to get this done, sorry.

@mattpascoe
Copy link
Member

In general the system should support % and _ sql constructs.. however many of the dcm options such as this are specifically meant to operate on a single entry. I.e this could possibly return many vlan campus matches but the code does not support that as it is unable to determine the ONE match. There is of course more to it than that but simply put, to do a display like this you would need it to match a single entry.

Now I will mention that I have worked on a true rest api endpoint that would replace the dcm.pl construct and it is able to do what you are talking about. It is not yet fully released however. You can play with it here if you want tho it is not ready for real use: https://github.com/opennetadmin/ona-core

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

No branches or pull requests

2 participants