latenighttales / alcali

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

Unable to execute a commande before parsing modules from a minion #387

Closed baby-gnu closed 2 years ago

baby-gnu commented 2 years ago

Describe the bug

On a fresh installation of Alcali, I can't run a test.ping because alcali try to run null.

To Reproduce Steps to reproduce the behavior:

  1. Having a salt-master with one or more minion
  2. Install a fresh alcali
  3. Go to Run menu
  4. Click in Target field
  5. Input * to target all minions
  6. Click in Function field
  7. Input test.ping
  8. Click on Run button

Expected behavior

The Results should dispaly the list of minion with True as output.

Output of a successful job ![alcali-run-ok](https://user-images.githubusercontent.com/1233212/135061898-b6d4a0c8-51a3-4ea6-810c-ac54ef752ab2.png)

Screenshots

Output of running the failed job ![alcali-run](https://user-images.githubusercontent.com/1233212/135060398-9793e0e1-557b-4606-b878-bc92bab976c5.png)
Details of the failed job ![alcali-null-job](https://user-images.githubusercontent.com/1233212/135060723-9439234f-bda7-4244-b698-e62afd503b45.png)

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

mattLLVW commented 2 years ago

i think the issue is around here we definitely should not send the command if it is empty, and typing a command should behave as expected

buffman23 commented 2 years ago

@baby-gnu I found the problem. You have to make the combo-box lose focus before hitting run. That way the 'selectedFunction' variable in javascript gets updated.

Here is a stackoverflow post of someone with a similar issue: https://stackoverflow.com/questions/63896901/problem-with-updating-model-in-vuetify-combobox

mattLLVW commented 2 years ago

fixed by #450