Read parameter value within script

Started by gkaudewitz, May 26, 2023, 03:23:11 PM

Previous topic - Next topic

gkaudewitz

With NXSL it is possible to generate an output with "println" to the client.
Is there a possibility to create an input-window from an nxsl-script where an input can be requested with an individual description (value=readln("Please insert a value:")). Something like You have implemented with objecttools "InputFileds" but even generated as a result of some script-calculation.
Best regards
Georg

Victor Kirhenshtein

Can you please describe use case for that? Usually NXSL scripts are non-interactive, the only place where user normally invokes NXSL script is script based object tool - but there you can use input fields.

Best regards,
Victor

gkaudewitz

Having an environmental Control unit where it is not possible to change sensornames via webgui I want to create a form from within netxms-gui where all connected sensors are listed with theire type (temperature, humidity, leakage). Within this form user should have the possibility to name the sensors and the data should be written via SNMP-set to the unit.
For user-convinience this should be done to for all used controller-units, even if there is possibility to change these data via web.
It would bee interesting applying some other data to the sensors like warning temperatur-settings individually per sensor with the same procedure.
Best regards
Georg

Victor Kirhenshtein

You should be able to do that with object tools. Create tool that will call a script, define necessary input fields, and when user will run the tool he will be asked for additional input. This input will be available in a script.
You can even create context dashboard and add those tools as action buttons.

Best regards,
Victor