Comments (8)
Thanks so much @mikhail-vl.
Its works for me.
from volkovlabs-form-panel.
@RohitSharma2k122 Thank you for your interested in the Data Manipulation plugin.
Plugin is doing POST requests with parameters in the body. Does .netcore support POST with body? I am not familiar with it.
We have a Node.js example for reference: https://github.com/VolkovLabs/volkovlabs-form-panel/blob/main/server-pg/server.ts
Please let me know.
from volkovlabs-form-panel.
HI @mikhail-vl
This is my Json data, Now i am passing on POST requests with parameters in the body. Can you help me where its missing plz suggest.
{
"id": 4,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"type": "volkovlabs-form-panel",
"title": "Feedback",
"datasource": {
"uid": "grafana",
"type": "grafana"
},
"options": {
"initial": {
"method": "-",
"contentType": "application/json",
"code": "console.log(options, data, response, elements, locationService, templateService)",
"highlight": false,
"highlightColor": "red"
},
"update": {
"method": "POST",
"contentType": "application/json",
"code": "console.log(options, data, response, elements, locationService, templateService)",
"confirm": false,
"body": [
{
"name": "ID",
"value": "$1"
},
{
"name": "Name",
"value": "$2"
},
{
"name": "Email",
"value": "$3"
}
],
"url": "http://localhost:61761/Test"
},
"layout": {
"variant": "single"
},
"buttonGroup": {
"orientation": "center",
"size": "md"
},
"submit": {
"variant": "primary",
"foregroundColor": "text",
"backgroundColor": "semi-dark-green",
"icon": "anchor",
"text": "Submit"
},
"reset": {
"variant": "destructive",
"foregroundColor": "yellow",
"backgroundColor": "purple",
"icon": "process",
"text": "Reset"
},
"elements": [
{
"id": "ID",
"labelWidth": 10,
"section": "",
"title": "ID",
"tooltip": "",
"type": "string",
"value": "1"
},
{
"id": "Name",
"labelWidth": 10,
"section": "",
"title": "Name",
"tooltip": "",
"type": "string",
"value": "Rohit"
},
{
"id": "Email",
"labelWidth": 10,
"section": "",
"title": "Email",
"tooltip": "",
"type": "string",
"value": "[email protected]"
}
]
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "datasource",
"uid": "grafana"
}
}
]
}
from volkovlabs-form-panel.
@RohitSharma2k122 I see that your URL is "url": "http://localhost:61761/api/Test"
.
Are you running Grafana and .netcore
on your localhost? This is the URL your browsers will make a POST call, so you should be able to reach it.
What do you see in the Browser's Console -> Network?
from volkovlabs-form-panel.
Thanks @mikhail-vl for helps. Appreciate your support.
Am able to Post the data back to data source.
Even am able to clear value of the form data after the POST request, while adding below line of code inside Custom Code.
elements.map((element) => { element.value = '' });
But not able to clear the value of the form on click of reset button. Can you do the needfull here.
Thanks in adavance
from volkovlabs-form-panel.
@RohitSharma2k122 The Reset button perform Initial Request and runs custom code.
If you don't use Initial Request you can clear out all the fields using custom code:
elements.map((element) => {element.value = ''});
Or any particular fields if required
elements.map((element) => {
if (element.id === 'name') {
element.value = '';
};
})
Please let me know if there is anything else.
from volkovlabs-form-panel.
@RohitSharma2k122 Thank you, let us know if there is anything else.
from volkovlabs-form-panel.
Thanks @mikhail-vl !
All works!
from volkovlabs-form-panel.
Related Issues (20)
- Dashboard variable not replaced in Update request payload HOT 3
- Implement Height coding area for Data Manipulation HOT 1
- Going to default values after dashboard load and unable to send same value as submit button getting disabled HOT 1
- please disable initial request when dashboard load HOT 1
- Getting values from Payload into panel elements HOT 6
- cannot import JS resource HOT 1
- Hide Reset request and other options when hide Reset button
- Updating dashboard variables from form element code block. HOT 4
- Required Form Fields HOT 1
- Default Value Display '0' Issue in Number Field in Data Manipulation Form HOT 3
- Date and Time input shows dates as browser timezone instead of dashboard timezone HOT 2
- Remove outdated options
- mysql multiple SQL queries simultaneous HOT 2
- Drag and Drop for Form Elements isn't working. HOT 5
- Getting Missing boundary in multipart/form-data error in logs while uploading the files HOT 3
- multivalue variable gives value with curly brackets HOT 1
- Clear specific element on Update in Data Manipulation panel HOT 2
- More problems with zeros HOT 10
- file upload to datasource with custom code HOT 2
- Add code editors suggestions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volkovlabs-form-panel.