Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"label" is missing when adding angular directive 'secretFormField' from react. #20258

Closed
cisko3000 opened this issue Nov 8, 2019 · 1 comment

Comments

@cisko3000
Copy link

** What is happening **
I am trying to use directive and passing it label="My Label" but my label does not show up in the UI, instead I get the default "Password" as my label

** What I expected **
I expected for "My Label" to show up.

** How to reproduce **
Create a datasource plugin and write your own template for it, add a directive to your template and give label prop a value.**:

Anything else we need to know?:
I think passing 'label' as an option in the following file line 88 will fix the issue?
https://github.com/grafana/grafana/blob/c9b11bfc7ae1ce89d737c938993db5fa0e421fdb/public/app/core/angular_wrappers.ts

Please advice if I am right about above or if it's normal behavior to not be able to give secret-form-field your own custom label. I'm kind of new to Grafana. Thanks

Environment:

  • Grafana version: Grafana v6.4.3
  • Data source type & version: using a docker image
  • OS Grafana is installed on: Grafana v6.4.3
  • User OS & Browser: 70.0.1 64-bit
  • Grafana plugins: None, just custom datasource plugin I'm developing.
  • Others: none.
@torkelo
Copy link
Member

torkelo commented Nov 8, 2019

from 6.5 forward (master/beta next week) we support full react config datasource editor :

So you can use SecretInputField directly from React

example:
https://github.com/grafana/grafana/blob/master/public/app/plugins/datasource/loki/configuration/ConfigEditor.tsx

@torkelo torkelo closed this as completed Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants