sipcapture / homer-app

HOMER 7.x Front-End and API Server
http://sipcapture.io
GNU Affero General Public License v3.0
204 stars 79 forks source link

JSON dashboard provided in dashboard_home doesn't seem to work #455

Closed gedia closed 2 years ago

gedia commented 2 years ago

Hello,

I've tested the dashboard_home feature to provide new users with a default dashboard upon first login, but it doesn't seem to work:

  "dashboard_settings": {
    "_comment": "Here you can define a customs dashboards home",
    "dashboard_home": "/usr/local/homer/etc/dashboard_home.json"
  },

I'm attaching the json used to this ticket. It was produced by homer-ui's visual editor (renamed to .txt to allow github upload): dashboard_home.json.txt

This provided json is indeed imported to create entries in user_settings when a new user logs in, but they get a blank home dashboard in the GUI when they log-in. Additionally, in the GUI "user settings", the "Name" and "param" columns are empty despite these fields seemingly being populated in the attached json file.

Is this some sort of bug, or are dashboards created using the GUI editor not suitable for export and need further editing to be used? Thanks!

adubovikov commented 2 years ago

looks like you have to provide only data object :-)

adubovikov commented 2 years ago

here is the example: https://github.com/sipcapture/homer-app/blob/master/migration/jsonschema/jsonschema.go#L25

adubovikov commented 2 years ago

and the example is correct

https://github.com/sipcapture/homer-app/blob/master/etc/dashboard_home.json.example

gedia commented 2 years ago

Geez do you ever sleep @adubovikov ?

Thanks I'll try it out :-)

adubovikov commented 2 years ago

Robots are never sleep :-)

gedia commented 2 years ago

OK, so with the data object only in the custom home JSON file, home dashboard generation seems to work for new logins.

However, I've noticed that when a user logs in, multiple copies of dashboards get created (sometimes two, sometimes three, but never one), not only for the home dashboard but also for the default "smartsearch" dashboard. Perhaps this affects LDAP users only? I haven't tried with local users.

Should I open a separate ticket for this?

adubovikov commented 2 years ago

Yes, please do

On Mon, 8 Nov 2021, 07:28 George Diamantopoulos, @.***> wrote:

OK, so with the data object only in the custom home JSON file, home dashboard generation seems to work for new logins.

However, I've noticed that when a user logs in, multiple copies of dashboards get created (sometimes two, sometimes three, but never one), not only for the home dashboard but also for the default "smartsearch" dashboard. Perhaps this affects LDAP users only? I haven't tried with local users.

Should I open a separate ticket for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sipcapture/homer-app/issues/455#issuecomment-962849884, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCN2JKQIXTUHU6PBDY4WELUK5U2HANCNFSM5HQG4YZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

gedia commented 2 years ago

OK, I'm closing this