Forum Discussion
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?
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_Beard16 days ago
Expert
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.
- Mike_Rodrigues15 days ago
Product Manager
I appreciate the honest followup.
I spun up a Windows VM in AWS today, tried Edge, Firefox, and Chrome. Tabbed around, logged in and out (RDP session). Locked the screen and came back. Could not get it to blow any unpersisted changes away.- Lewis_Beard7 days ago
Expert
I just had this happen to me again today. It never happens when testing, but always when I'm actually coding. I have an idea on why this may be happening. When I'm coding, I don't my changes to take effect in a way that would actually impact the devices, especially on a new datasource.
So I make the config source (in this case) with my AppliesTo set to be false() and I put in some basics for the config source. Then I save it. But as I develop, I will comment out the false() with /*false()/ and add other lines of code such as system.displayname == "myserver.whatever". But I DONT SAVE because I dont want the config source to actually get applied .... its not ready. I'm literally make it from scratch.So then I'll add a few more lines of code, maybe I'm trying to get expect to work up to a certain point, or I want to crawl through a successful login with expect etc before I actually save the config source.
So I'm doing all my coding with my AppliesTo altered. BUT NOT SAVED. Sometimes I'll even have a little popup that says something about my appliesTo, and to make sure its right. The IDE is trying too hard. But it wont wipe it yet. But it seems to be the case that, if I've altered my AppliesTo so that the code can target a device, but I have NOT saved the config source because I dont want to save change, this seems to be the scenario I remember from the past.
And it definitely happened to me just now. I tabbed over to a text file to look at some related info, and tabbed back to the LM IDE or UI for editing my module maybe 10-20 seconds later and ..... both my CODE as well as my APPLIESTO had been reverted.
I will be coding quite a bit more today so if this seems to be the issue, the AppliesTo, I'll update. Because when I was failing to reproduce my own complaint previously, I was just editing code, I wasnt touching the AppliesTo. This time I was, and that seems to jog my memory on the other times I had this happen for real.