Giter VIP home page Giter VIP logo

volkovlabs-form-panel's People

Contributors

asimonok avatar githubdante avatar maleksan avatar mikhail-vl avatar vitpinchuk avatar zverbatim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

volkovlabs-form-panel's Issues

Text of the inscriptions

How to customize the inscriptions (like "Please confirm to update changed values?") in the confirmation window (button names)?
This is useful to localize the interface to other languages (not English).

how to update other fields (onOptionsChange usage)

Hi,
I use my own scripts for both initial request and update request. However, I don't know how to update other elements once I select a dropdown element. My use case is that I loaded a list of items. And once I select an item, the rest of the form should load that item properties so I can edit them. However, I still don't know how to call to update the other elements. Is there a hook to listen to the selected element like onChange? or anything like that?

Initialize element value from a Data Source query

I am trying to initialize a "Select with Custom options" element with Custom Code in the Initial Request. The initial request is '-' and the URL is blank as I am just trying to use data from a Prometheus query. I see that I have the values I want in the data element and I am able to assign them to the element.value fields. But this does not seem to affect the "initial" value which is used to detect changes in the elements and is shown as the "Old Value" in the confirmation table. Is there a way to set the initial value from Custom Code without an Initial Request query

reload only the panel, not the entire page after update

Hi,

One of the examples contains custom code to reload the page after an update. It uses location.reload():

if (response && response.ok) { location.reload(); } else { alert(Error: ${response.status}); }

However, that reloads the whole page. It would be much faster and more elegant if I can reload only the panel for which I submit the update, exactly like what the reset button does. Is this possible? Maybe by triggering the reset button itself?

URL for Submit Button

Hi @mikhail-vl,

How can I assign a URL to a button which will navigate to another dashboard instead of the default API endpoints?

The URL assigned to the button contains dashboard parameters that are used for the initial GET request in the navigated dashboard.

Thank you.

Changes to custom code fields will not save unless other fields have changed.

Hello,
First off, I love this plugin, thank you for making it, but I did find a issue that is proving to be quite annoying.

I am trying to make changes to some of my custom code under the Initial request field.
image
However, when I click apply, the changes will not retain. The only way I can get them to retain is if I make some changes to other options, then sometimes it retains. I've tried to find a field I can change that will reliably cause it to update but I've yet to find a reliable pattern.

Grafana build V9.1.6

Thanks for the great plugin.

http localhost:3000 has been blocked CORS

Hello, I actually get stocked by this error.
image

I am a NodeRed running on the same machine with Grafana. I am using nodered as may API, I simply want to get what the user inputted in my grafana to my nodered API.
However, I always get error as mentioned above.
In addition, I have a basic authentication on my nodered API, but I don't know where should I add those authentication from Data Manipulation Panel.

Is there a configuration or settings that I need to properly config it?

Thank you.

Add variables in URL to call from form elements.

Hi!

I need to insert a variable from form elements into the query link. How can i do this?

I want do create payload from form elements and then create API call.

Dashboard variables not suitable.

Doubt about query synchronization

Hello,
I have a doubt about the query synchronization, please take a look a this sequences:

after panel loading (at the begin) I have this sequence:

  • query execution having a template variable of Grafana, for example $varOne, and a correct syncronization with the query termination
  • call to Init custom code and "data.series" correctly filled

changing $varOne I have this sequence:

  • query execution without synchronization with the termination
  • immediately call to Init custom code and "data.series" with the previous (initial) values

I'm using Grafana 9.2.1

I would really appreciate a clarification about the load/refresh dynamic.

Thank you,
Fabrizio

[Q] Panel integration with a MariaDB database

Unfortunately, it is not clear to me how to configure the panel so that the form could be written back to a MariaDB database? This database is independent from the Grafana database, but runs on the same server. Can you help me with this? I don't understand exactly what steps have to be taken in order to be able to write to the database?

Thank you for your help!

OS: CentOS 7
Grafana: v8.5
with an Apache reverse proxy on local network

Interface with the Amazon Athena data source

If your data manipulation panel could interface with the Amazon Athena data source, one could build complete CRUD operations on S3 stored data without using an API.

For read-only operations, you would only need a table in Glue, which can be auto-created by running a crawler on a bucket containing equal schema .csv files. For complete CRUD, you could still do it as long as the table in Glue is of type Apache Iceberg.

Query for reset button

Hello! Can you add an option to attach query to reset button?
My case is: I have Data manipulation widget table with parameters, by clicking on Submit button with POST query I connect to REST API with values of all parameters and get the prediction of ML model.
What I want to add: add a query/ area for it for clicking reset button. If I had it, I can refresh my parameters data from database (only when I want it, by clicking the button).

I tried to use this query as initial one but my data manipulation panel always refreshes even I don't want it. For instance, It is refreshed after clicking submit button, but I don't want such behavior from it.

[Question] Automatic set to blank values after post request

Hi,

I wonder if there is a way to automatically set to "blank" values of all form once the user clicked the "Submit button"?
image

I found that there is a custom code where you can run after the post request, however I don't know how to access those "form elements" to set their values to be equal to nothing once post request is done, what I only tried is to have an "alert" function which works well.

image

Thank you.

Regards,
Henjoe

Add Monaco Code Editor suggestions for available parameters

The custom code has access to the Panel options, the response from the REST API call, form elements, various Grafana services and will be executed after the Initial and Update requests.

Available Parameters:

  • options - Panels' options.
  • data - Result set of panel queries.
  • response - Request's response.
  • elements - Form Elements.
  • locationService - Grafana's locationService to work with browser location and history.
  • templateService - Grafana's templateService provides access to variables and allows to up Time Range.
  • onOptionsChange() - Panel options Change handler to refresh panel.
  • initialRequest() - Perform the Initial Request to reload panel.

Add Authentication options

The basic Authentication option is not secure. The preferred way to communicate with REST API will be Proxy Data Source, which supports various authentication methods.

Is it possible to interact from with other panels from data manipulation one?

Is it possible to interact from with other panels from data manipulation one?
My case is: I send my post query to REST API, get the answer which is shown in the next data manipulation row with prediction label.
But it doesn't look fully distinguishable and that's why i want to highlight my result using stat panel because there I can set the size of query result text etc.

изображение

Maybe it's possible by using templateService because it provides access to variables and i can connect my result from data manipulation panel with dashboard variable?

Form Elements Validation

Hello @mikhail-vl,
I have tried elements validation in the Data Manipulation panel it is not showing any popup or warning if a user is entered data above the limits can you help my validation?
below is my panel configuration.
Screenshot from 2022-09-29 14-38-56
Screenshot from 2022-09-29 15-14-46

edit fields after first entry

after the first entry all subsequent changes are not saved. This has happened to me on Grafana v9.0.1. I have also tried editing the json directly but when the apply button is pressed the plugin returns to the state of the first insertion

Status notification after submit form

Hi!

How can I create status notification after submit form?
Like this:

image

With message "Form submitted successfully" + maybe some link or remote data from request response.

TY!

Improve Test Coverage

Current Test Coverage is ~40% and needs to be improved to check all input parameters and configuration options.

Initial GET request date time formatting

Hello @mikhail-vl,
I am using an initial GET request to populate the data, all the string fields get populated correctly but date-time field is not properly populated kindly see the below images of actual and expected results. Also unable to open the calendar option to select date-time after the initial GET request is finished.
Actual
Screenshot from 2022-10-07 14-12-56

Error while selecting the calendar option
Screenshot from 2022-10-07 14-13-16

Expected
Screenshot from 2022-10-07 14-14-11

Another concern is, if date-time field is populated in the correct format, is it required to click on Apply button in the calendar (if the calendar issue is fixed)?
Can you please help me with the issues?

Error when using the GET method

I have a very simple GET method that should return data...confirmed using postman but I get the error below when I try to call it from the panel
'FormPanel.tsx:169 Uncaught (in promise) TypeError: Failed to execute 'set' on 'Headers': Invalid name
at eval (FormPanel.tsx:169:15)
at Array.forEach ()
at eval (FormPanel.tsx:168:29)
at s (FormPanel.tsx:2:1)
at Generator.eval [as _invoke] (FormPanel.tsx:2:1)
at Generator.eval [as next] (FormPanel.tsx:2:1)
at Mo (FormPanel.tsx:2:1)
at a (FormPanel.tsx:2:1)
at eval (FormPanel.tsx:2:1)
at new Promise ()'

Reset Button

Hello Team I am not able to reset panal data using reset button and when i am using date and time as parameter in input panel error is occuring

Show/hide element

Hello,
my panel have a main select and a lot of fields, each select option needs a specific subset of fields and not all.
Is it possible to show/hide programmatically a specific element in order to simplify the user navigation?

Thank you,
Fabrizio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.