latenighttales / alcali

Featureful Saltstack GUI
https://alcali.dev
MIT License
356 stars 61 forks source link

Job Templates losing argument format when saving resulting in invalid commands #439

Open Ataye opened 2 years ago

Ataye commented 2 years ago

Describe the bug When saving a template, new or existing, it removes single quotes. Without single quotes in either the Keyword Arguments or Arguments fields the query for git.pull is messed up and thus produces an error. I am currently only getting this with git.pull since this is currently the only command with these sets of arguments. An example using the Reproduces steps below:

Results

server.local: ERROR: Command 'git master pull remotename' failed: git: 'master' is not a git command. See 'git --help'.

The most similar command is
    restore

Arguments are out of place, and the repo path appears to be missing altogether.

To Reproduce Steps to reproduce the behavior:

  1. Open 'Run' and enter a Target, and:
  2. Function=git.pull, Arguments=d://git_folder, Keyword Arguments=opts='remotename master'
  3. Check 'Save as Template' and enter a template name and Save,
  4. Open Job Templates,
  5. Click 'Edit' for the template,
  6. Observe missing quotes.

Expected behavior The quotes should remain, and the query run with the arguments in the correct order and format.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.