-
Notifications
You must be signed in to change notification settings - Fork 43
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
ignore some jobs on highstate page #458
Conversation
Is there also a solution if we use several salt masters (multimaster with salt-syndic) ? |
@pju51 |
I'm not considering to be selective on the commands that were used (state.highstate/state.apply/etc) as that will differ too much per user. I see the following solutions:
one of the consequences of both solutions is that it might not be sufficient to look for the latest 10 highstate related commands. e.g. the latest 10 jobs might have been for XXX leading to no results being shown. From the proposed 2 solutions, I think that nr. 2 is the easiest one as there are no GUI changes involved.
the new parameters may be used to limit the jobs shown on the jobs-page, or on the jobs-panel. but there wouldn't be a way to make the jobs visible again. so I'll ignore that possibility for now. |
Thanks for your answer, and I will create new tickets for my other questions, sorry. from my point of view I think the results of state.apply should be in the job page and state.highstate in the highstate page. the other thing, if I run this command: |
that's why I use 2 lists: saltgui_hide_envs / saltgui_show_envs |
Ah yes can be a good solution. I tested; I added saltgui_show_env: master in my /etc/salt/master.d/master.conf file on my saltstack master server Did I miss anything? on the hidden page I can't find this information added. |
:-)
I will go ahead to create this solution. |
my bad, yes, I thought it was already implemented and that I had missed something lol :D ok I will review and test when its ready, no problem. |
note: changes will be on branch note: during build of this feature, I realized that there are several occasions where structured data is read back from the session storage. I added 2 utility functions to convert such data back to an object or an array. note: during build of this feature, I realized that there are several occasions where allowlist+denylist matching was used. I added a utility function to compare an item to an allowlist and a denylist in one function call. |
@pju51: the configuration parameters have a slightly different name now: |
@pju51 I guess that this solution should be extended to the "Issues" page. That page tries to find failed states (and a handful of other categories). But let's do this one page at a time. |
@erwindon |
@erwindon After this I used your branch also on the hidden page, I dont see the variables |
I also tested :
unfortunately same result, not work. |
You are using the correct branch. just in case this is an effect of the browser-cache, can you SHIFT-refresh the relevant pages? |
I did push out all changes, so that was not the problem. |
7d706e9
to
230ae30
Compare
Hello @erwindon , it was wrong, because I added : so normally it should exclude from display all commands that do not use the branch base (or master) but in my case it displays them. I don't use an old code, I pull from your repo. Otherwise I didn't understand what saltgui_show_saltenvs is for. from what I understood the parameter saltgui_show_saltenvs: allows to display only the commands which use the specified env? maybe because of the browser cache, so I will try again with your new code + and cache refresh between each tests. |
@pju51 In case you are wondering... I just forgot to mark this one as 'draft' :-) (and no rebase was needed here) |
@pju51 with the code in this branch, the browser console should show 2 types of lines:
Using can you please specify a single combination that is NOT working? |
230ae30
to
549c9d4
Compare
it's simple. if I add this : and if I try with a saltenv parameter like : |
I cannot literally add the first part to SaltGUI as the word |
Thanks @erwindon I will test soon. I was a little busy previous weeks |
Hello @erwindon so I tested and.... This MR is done for me, I validated and you can merge ! Thanks a lot |
549c9d4
to
7a69d46
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hello,
it's not a bug, but questions or improvements.
I am using the separate SaltGUI (1.28.0) solution in a nginx container (nginx:1.21.6).
Everything works fine but I have 2 problems with the hightstate page:
my saltstack master uses a Gitlab as a backend, so to deploy a specific branch with salt, I use this command on the host as an example:
salt-call state.apply saltenv=XXX pillarenv=XXX test=true
(XXX = git branch)The problem is that the result of the command will also be displayed on the saltgui hightstate page, but we should only see the results of the master branch and not the result of my XXX branch, because only the master branch is important to define if the server is in highstate or not.
Is it possible to hide these parasitic results in order to keep only the results of the master branch? or any other solution (like to show only the state.highstate and hide everything else) ?
I have a lot of minions and states, and in the highstate page, the result of the highstate is far too long:
Is it possible to have only the final result ? and the detail if we click on the green/yellow/red circle ? or another proper solution.
I already tried this solution: https://github.com/erwindon/SaltGUI#performance, but I didn't see any change, maybe because I use a separate SaltGUI.
Screenshots
thanks a lot.
NOTE: nr. 2 is now in #459
NOTE: question about salt-syndic (below) is now in #460