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

[RFE] Provide override/filter for including certain models in quads-web #374

Closed
sadsfae opened this issue Apr 27, 2021 · 1 comment
Closed

Comments

@sadsfae
Copy link
Member

sadsfae commented Apr 27, 2021

There is a need to filter out certain system "models" from displaying both in the Flask web/forms.py but also for their return results. In this case for example we'd want to omit Dell R620 systems from showing up in results but also in general we might have certain model systems like SuperMicro 6029P which are solely used for utility purposes but may be in QUADS.

This RFE is to provide a sort of model filter on the intelligence used for showcasing them in UI search but also being picked up in the subsquent results.

e.g.

class ModelSearchForm(FlaskForm):
    excluded_models = conf.get("excluded_models")
    models_list = conf.get("models").split(",")
    models_choices = []
    for model in models_list if model not in excluded_models:
        models_choices.append((model, model))
    model = SelectMultipleField('Models:', choices=models_choices)
    start = DateField('Start at', format="%m/%d/%Y", validators=[validators.data_required()])
    end = DateField('End at', format="%m/%d/%Y", validators=[validators.data_required()])

pseudocode from https://github.com/redhat-performance/quads/blob/master/web/forms.py#L9

Some adjustment to web/forms.py may suffice here but likely there is a more clever place, as we don't want anything in excluded_models: to be presented as available either via wiki, future heatmap visuals, UI search or --report-available

Note that we already utilize the models: key/value pair here: https://github.com/redhat-performance/quads/blob/master/conf/quads.yml#L235 but we might not want the model removed, only filtered out from visuals/UI availability. Also, removing the respective model would still return that system type from results when searching by model is unselected as it's still a viable system.

Perhaps somewhere at the quads/model.py layer is best as we do today with exclude:

if exclude:

Likely this will buy time before we can get the more fairly complicated RFE of --retire functionality addressed in #364

@grafuls
Copy link
Contributor

grafuls commented Mar 30, 2022

Model types are still going to be shown as per those defined under models: key/value pair on the quads.yml.
Hosts marked as retired won't appear as a search result, hence an R620 filtered search will return no results.

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

No branches or pull requests

2 participants