asterics / WebACS

HTML5/JS version of the AsTeRICS Configuration Suite
Apache License 2.0
3 stars 2 forks source link

Klaus/add test auto revert mode #40

Closed klues closed 5 years ago

klues commented 5 years ago

Added an new optional "test-and-auto-revert" mode to WebACS.

Background: one of our clients uses an AsTeRICS based computer control and would like to be able to adapt the solution on his own. Unfortunately this is currently not possible because as soon as he clicks "upload model" in ACS the old (computer control) model is stopped and it's not possible to do a click on "start model" afterwards.

Idea: my approch is a mode where the user can click on "test model" which uploads and starts the current model in ACS and sets a timer for reverting it to the old model after e.g. 30 seconds. Therefore a user with an AsTeRICS based computer control solution can safely edit and test his own models.

Implementation: In "Misc." menu I've added two options: Screenshot_1 By enabling test-auto-revert mode the menu changes to: Screenshot_2 --> Upload Model changes to Test model and there is no Stop Model or Pause Model anymore in order to prevent unintended stopping of the (computer control) model.

A click on Test model uploads and starts the current model and starts a timer that is shown in the status bar: Screenshot_3 After the time is finished the previous (working computer control) model is re-uploaded and started. The timeout can be prolonged or directly cancelled using the provided buttons.

TODO: the options in Misc. are added in a quick and dirty way - what do you think you it should look like?

klues commented 5 years ago

adapted status bar, now looks like this: Screenshot_14

I think it makes sense to give the user the possibility to also approve a model that is currently being tested ;)

deinhofer commented 5 years ago

Hi,

I really like the idea!! :+1: Just one suggestion for improvement: What about a shortcut for the Test model action? Because I think any developer would benefit from this feature and having a shortcut could speed up the development workflow again.

deinhofer commented 5 years ago

what about this PR? I think we can merge it. Maybe you could add a shortcut as you already know how to do it :-)

klues commented 5 years ago

for now I'll merge it as it is, the shortcut can be added later...