Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • Courses
    • Tutorials
    • Certification
      • DataMiner Operator
      • DataMiner Administrator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
    • Video Library
    • Books We Like
    • Third-party Courses
    • DevOps Enablement Services
    • Quizzes
  • RESOURCES
  • Agile
    • Agile Webspace
    • Everything Agile
      • The Agile Manifesto
      • Best Practices
      • Retro Recipes
    • Methodologies
      • The Scrum Framework
      • Kanban
      • Extreme Programming
    • Roles
      • The Product Owner
      • The Agile Coach
      • The Quality & UX Coach (QX)
  • Expert Hubs
    • DataMiner DevOps Professional Program
    • DataMiner
      • DataMiner Releases & Updates
      • System Architecture
      • Integration Studio
      • Visual Overview
      • Security
    • Technologies
      • Converged Interconnect Networks
      • DOCSIS 3.1 / DAA
      • Kubernetes
      • Telemetry / Flow Monitoring
      • PTP
      • SDN / ST2110 / NMOS
    • Business
      • Software Business models
      • Perpetual Use or Usage-based Services
      • Storage as a Service (STaaS)
  • Discover
    • Markets
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Solutions
    • Use Case Library
    • DataMiner Dashboards
    • DataMiner Downloads
    • DataMiner Modules
      • Core features
      • SRM features
    • DataMiner Apps
    • Professional Services
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • Pricing
  • More
    • Feature Suggestions
    • Online DataMiner Systems
    • Leaderboard
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
    • Verify a certificate
  • >> Go to dataminer.services

How to create Single Select Dropdown & how to get selected value on button click and pass to script

739 views19th October 2023Application Custom Apps user defined apps
1
Vikas Choudhary [DevOps Enabler]372 18th October 2023 0 Comments

Hello Dojo Community,

For learning purpose, I created user defined api & deployed it successfully where I'm passing element name and action like Mask/Unmask etc. and API working fine with postman and reflecting action on my elements as well.

Now I'm creating an Web App and I want to provide GUI based app to user to perform certain allowed actions(Mask/Unmask/Change Value/etc) from App itself. I created App where Admin can configured actions which is supported by user defined api at element level.

On Element List page, I'm displaying all elements for DMA where user can select one or more elements , also user can select one action Mask/Unmask/etc. from Drop down and can click on execute button.

I'm facing below challenges, please guide me

  1. I'm not able to make single select drop down, currently I displayed as table as title "Perform Action", Please guide me how can I make it single select drop down.
  2. is there any direct way to configure button event to call User defined API / rest API or only need to select "Launch a script" option and need to call user defined api from script only?
  3. On custom defined "Execute Now" button click, how can I pick selected elements name & selected perform action, and how can pass them to script configured through "Launch a script" or user defined api (if & only if user defined api directly supported by button event) ?

Wouter Van Robays [SLC] [DevOps Advocate] Answered question 19th October 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
4
Wouter Van Robays [SLC] [DevOps Advocate]387 Posted 19th October 2023 5 Comments

Hi Vikas

I'm glad you succeeded in creating your first user-defined API!

To answer your second and third question, you don't actually need to call your API through the low-code app. In the background, you API call will just execute the automation script, and doing this through a user-defined API is adding some extra bloat. Executing automation scripts is supported out of the box in low code apps as the 'Launch a script' action. To pass information to that script you can use script parameters. When script parameters are defined on your automation script, you'll be able to pass them in the action as you can see in the screenshot. (https://docs.dataminer.services/user-guide/Advanced_Modules/Automation_module/Designing_Automation_scripts/Script_variables.html#creating-a-parameter).

You would have to refactor your API automation script to have two entrypoints: the entrypoint for your API that you currently have in there, and the Run method that will be executed when executing your automation script through cube or through your low-code app. Instead of then getting the user data through the rawBody of the requestData of the API entrypoint. You can use the script parameters instead.

We actually have a similar example in the documentation. This example transforms an existing automation script that uses script parameters to a script that can also be executed through a user-defined API. Please only refer to the first two menu items in the example: 'Example script' and 'Using the script with the OnApiTrigger entry point'. The last item is not recommended for your situation. https://docs.dataminer.services/user-guide/Advanced_Modules/User%20Defined%20APIs/Defining_an_API/UD_APIs_Using_existing_scripts.html

Please let me know if anything is unclear or if you have additional questions.

Vikas Choudhary [DevOps Enabler] Posted new comment 26th October 2023
Sebastiaan Dumoulein [SLC] [DevOps Catalyst] commented 20th October 2023

And to answer the first question, showing GQI results in a drop down is not yet possible. We do aim to have this in the near future. I’ll post an update here when this is available.

Vikas Choudhary [DevOps Enabler] commented 20th October 2023

Thank you Wouter Van Robays. 🙂

Vikas Choudhary [DevOps Enabler] commented 20th October 2023

Thank you Sebastiaan Dumoulein. It’ll be a good feature. Please keep us posted once delivered.

Do we have any work around till this feature is rolled out? like adding radio button for each row and user can select particular row, and will pick selected radio button value in parameter ? if you have any reference, please share.

Thank you for your help & support 🙂

Sebastiaan Dumoulein [SLC] [DevOps Catalyst] commented 20th October 2023

Yes, will definitely update here. I believe you have a decent workaround in place. Another thing I can come up with, is to use a grid component instead. Where every row of your data source can become a button. This was shared during Empower I believe.

Vikas Choudhary [DevOps Enabler] commented 26th October 2023

Yes, thank you

Please login to be able to comment or post an answer.

My Dojo Points

0 Credits
0 Reputation

Question Tag Cloud

adl2099 (59) Alarm Console (55) alarms (73) alarm template (63) Automation (155) automation scipt (74) Automation script (105) backup (55) C++ (40) Cassandra (150) cloud (38) Connector (48) Correlation (42) Cube (120) Dashboard (142) Dashboards (142) database (67) DataMiner Cube (42) DIS (57) DMS (49) DOM (82) driver (52) DVE (45) Elastic (76) Elasticsearch (100) elements (53) Failover (91) GQI (65) HTTP (50) IDP (59) low code app (82) low code apps (50) lowcodeapps (39) MySQL (52) protocol (153) QAction (61) resources (36) security (74) SNMP (61) SRM (287) SRM resources (39) trending (70) upgrade (48) Visio (395) Visual Overview (302)
Privacy Policy • Terms & Conditions • Contact

© 2023 Skyline Communications. All rights reserved.

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin