Forum Discussion

Cole_McDonald's avatar
Cole_McDonald
Icon for Professor rankProfessor
30 days ago

UIv4 Module Code Editor/IDE funkiness

  1. code reverting (reproducable):  If I make changes to some powershell in the new code editor, then change tabs/windows.  When I change back to the window with my editor, it has reverted to the previous save point.  An Undo will bring back my changes... but it's scary after making a few changes after staring at your code for longer than expected working through logic in your head.
  2. property source error output:  In UIv3, there was side by side output vs. error screens.  We now just get the little info bar at the bottom that states "couldn't do"... but not where/why/what that could be troubleshot.  I'm having to add in a ton of troubleshooting output to the property definition to be able to expose the data I need to fix the scripts.  The one I just completed is nearly 30% error output handling to be able to figure out what is wrong with it.

Other than those two things, I'm pretty happy with the changes from the old.

11 Replies

  • Hi Cole_McDonald​ , thanks for posting this.

    I've sent this post to the LMX team and have asked them to take a look at the code reverting issue. My first guess is it is related to caching, but not sure.

    As for the PropertySource error output, I've got an improvement written up for this but I can't provide a timeline on when it will be done and in product.

    The idea was to basically show standard out and error for both Collection and AD "Test Script". It would be shown in a window or modal, not in some toast message that will disappear in 3 seconds.

    Also, for "Test Active Discovery", I'm hoping to combine this with "Test (AD) Script" so that users can see both their output, and our interpretation of it for help debugging AD issues.

  • I can also confirm the first problem. I just developed a datasource to do something, and its frustrating having to remember to comment out the AppliesTo (replacing it with false()) and/or comment out new parts of the code over and over, so that I can hit save, so that I can dare tab out to look at the Swagger API docs or something. :)

  • Lewis_Beard​ , Mike_Moniz​, Cole_McDonald​ 

    I'm unable to reproduce this, but I'm concerned to see 3 reports. Could you please let me know which browsers and operating systems you're using. And how long it is between tabbing away and tabbing back, that the content reverrs?

    I've tried on Firefox on Linux, and Google Chrome on OS X, but I can't reproduce it.

    Does it usually happen immediately after tabbing away and back? Any other details you can remember that might help me reproduce it?

    • Mike_Moniz's avatar
      Mike_Moniz
      Icon for Professor rankProfessor

      I haven't been coding as frequently as I have in the past, but from what I recall it would happen like described where I would be writing up code unsaved in the code box, switch over to another tab for likely several minutes (like 10+min) then go back and the code would revert. I didn't even realize you can undo to get it back. The last time I was coding was perhaps a month or two ago and I'm using Windows 11 with Firefox.

      Actually at one point this forum was doing something pretty similar but I haven't seen it recently.

    • Lewis_Beard's avatar
      Lewis_Beard
      Icon for Expert rankExpert

      I am using Chrome, Version 136.0.7103.114 (Official Build) (64-bit). I'm on Windows 11 Enterprise, and our IT keeps our versions and etc fairly up to date. Since you tested on non-Windows systems exclusively, maybe its Windows-specific? Not sure.

      Anyway, for me, it happens in about 60 seconds, tops. It is constant for me. If I even so much as click on another tab, say the API reference or another tab that has something else open in LogicMonitor, and I poke around for just a few moments and come back .... my code is gone. I didn't know about Undo either, but I generally don't trust Undo type operations. Especially in situations like this.

      So if I even so much as want to throw down a println to see a property coming back from a map response, and I cant remember the name for the property I want to snag, and I pop over to the API to see "oh yeah, its dataSourceId and not dataSourceTemplateId" or whatever .... wham. My code is gone if I'm over on another tab more than just a few seconds.

      So I end up commenting and saving on every line or block of code if I need to tab over.

      • Lewis_Beard's avatar
        Lewis_Beard
        Icon for Expert rankExpert

        Well of course now that I say it happens in 60 seconds tops, now it doesnt. I'll do some testing to see if I can pin anything down.

    • Cole_McDonald's avatar
      Cole_McDonald
      Icon for Professor rankProfessor

      I'm in Edge for Business: Version 136.0.3240.64 (Official build) (64-bit)