VolkovLabs / volkovlabs-dynamictext-panel

Business Text Panel for @grafana
https://docs.volkovlabs.io
Apache License 2.0
78 stars 14 forks source link

Bootstrap init JavaScript code #202

Closed yosiasz closed 11 months ago

yosiasz commented 11 months ago

Greetings

How would one run js code on init to initialize few things

The following does not seem to work


$(function () {
  initTable()

  $('#locale').change(initTable)
})

Trying to see if I can spin up a table with sorting and other fancier capabilities

https://examples.bootstrap-table.com/#view-source Thanks

mikhail-vl commented 11 months ago

The whole JS code is initialized when the panel renders. It should work as is.

initTable();
$('#locale').change(initTable);
yosiasz commented 11 months ago

maybe this puppy has limits with the js files I have loaded . Will keep hammering at it

image
mikhail-vl commented 11 months ago

@yosiasz, keep us updated on your progress.

yosiasz commented 11 months ago

seems to be like a monaco issue?

https://github.com/microsoft/monaco-editor/issues/2283

yosiasz commented 11 months ago

switched to google material design, much more promising

https://m2.material.io/components/data-tables/web#data-tables

image

mikhail-vl commented 11 months ago

@yosiasz Monaco Editor is a part of the Grafana, we don't control it.

I remember, @asimonok told me that the behavior is different between Edit and View/Dashboard mode. Have you tried not in the edit mode?

yosiasz commented 11 months ago

@yosiasz Monaco Editor is a part of the Grafana, we don't control it.

I remember, @asimonok told me that the behavior is different between Edit and View/Dashboard mode. Have you tried not in the edit mode?

I just went with google material. the bootstrap approach for sorting, filtering etc is a bit clunky and/or I am not well versed on implementing it in Dynamic Text

yosiasz commented 11 months ago

hitting a lot of walls with loader.js sadly. I think it must be on grafana monaco side of things, too bad

mikhail-vl commented 11 months ago

If Google material works for you, I am going to close it.