Table of Contents
Add a New Snippet #
The Snippets section allows you to define reusable code snippets for various tasks.
Select the “Snippets” option from the main menu.
Click on the “+” button to open the “Add Snippet” page.
Fill in the Snippet Details:
- Name: Provide a descriptive name for the snippet.
- Description: Optionally, add details about the snippet’s usage or purpose.
- Code: Enter the code related to the snippet.
Save the Snippet: After filling out the information, click the “Save” button to store the snippet
Viewing and Managing Snippets #
After saving, you will see a list of all snippets that have been created and once you have added snippets, you can view and manage them
- Options Available for Each Snippet
- Edit: Click the edit icon next to a snippet to modify its name, description, or code.
- Data: you can monitor the execution details of your snippets:
- View Execution History: After executing snippets, you can view the time each code was executed, complete with additional details.
- Download Execution Data: You can download the execution logs in Excel format for further analysis. This file typically includes:
- Device ID: The unique identifier for the device on which the snippet was executed.
- IP Address: The IP address of the device.
- Success Status: Indicates whether the execution was successful or not.
- Result: You can see the output of the executed code.
- Execute: To run the snippet:
- Click the “Execute” button next to the desired snippet.
- Select Devices: In the pop-up window, choose the group of devices on which you want to execute the snippet.
- Confirm Execution: Click the “Execute” button to run the code across the selected devices simultaneously.
- Delete: Click the delete icon to permanently remove the snippet from the list.
Feedback on Execution: After executing a snippet, check Data section to ensure it ran successfully on all selected devices.
Testing and Validation: Before running snippets on production devices, consider testing them in a controlled environment to prevent unintended changes.
Testing and Validation: Before running snippets on production devices, consider testing them in a controlled environment to prevent unintended changes.