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

Add or allow adding currency symbol to all costs in default dashboards #3137

Open
1 task done
AkshayRao27 opened this issue Mar 1, 2023 · 14 comments
Open
1 task done
Labels
note:discussion Details or approval are up for discussion

Comments

@AkshayRao27
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

The current default dashboards in Teslamate do not have any currency symbols
image

While adding a currency symbol to these values is possible fairly easily:
image

The changes cannot be saved as Grafana says that it "Cannot save provisioned dashboard"
image

A potential workaround would be to specify a currency symbol in preferences and have all dashboards take this symbol over. Alternatively, telling Grafana to allow saving provisioned dashboards somehow would also work

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

-

Screenshots

No response

Additional data

Grafana v8.5.6 (623255cf2d)

Type of installation

Docker

Version

v1.27.1

@DrMichael
Copy link
Collaborator

Well, $ would obviously not be correct for me...
I think, all money values are coming from manually input cost of charges. So, yes, adding a currency symbol in the preferences would be possible. (Although I could live without...:-)

@vzhivkov
Copy link

This would be very useful since when traveling abroad charges are in different currencies even at Tesla Superchargers.

@Hjlfmir
Copy link

Hjlfmir commented Jul 16, 2023

Hi all, +1 for this feature :)

@putianhui
Copy link

When modifying grafana's dashboard to save, it prompts Cannot save provisioned dashboard, you can try the following solutions

  1. Copy the /etc/grafana/provisioning/dashboards/dashboards.yml configuration file of the teslamate-grafana-1 docker container to the /tmp directory
$ docker cp teslamate-grafana-1:/etc/grafana/provisioning/dashboards/dashboards.yml /tmp/
  1. Modify the /tmp/dashboards.yml configuration file just copied to the local, add allowUiUpdates: true configuration item, the content of the modified configuration file is as follows:
$ vim /tmp/dashboards.yml
apiVersion: 1

providers:
- name: 'teslamate_EN'
  orgId: 1
  folder: TeslaMate_EN
  folderUid: Nr4ofiDZk
  type: file
  disableDeletion: false
  editable: true
  updateIntervalSeconds: 86400
  # newly added
  allowUiUpdates: true
  options:
    path: /dashboards_en
- name: 'teslamate_internal'
  orgId: 1
  folder: Internal
  folderUid: Nr5ofiDZk
  type: file
  disableDeletion: false
  editable: true
  updateIntervalSeconds: 86400
  # newly added
  allowUiUpdates: true
  options:
    path: /dashboards_internal
- name: 'teslamate_reports'
  orgId: 1
  folder: Reports
  folderUid: Nr6ofiDZk
  type: file
  disableDeletion: false
  editable: true
  updateIntervalSeconds: 86400
  # newly added
  allowUiUpdates: true
  options:
    path: /dashboards_reports
  1. Copy the modified /tmp/dashboards.yml configuration file to teslamate-grafana-1 under the /etc/grafana/provisioning/dashboards/dashboards.yml directory of the docker container
$ docker cp /tmp/dashboards.yml teslamate-grafana-1:/etc/grafana/provisioning/dashboards/dashboards.yml
  1. Restart the teslamate-grafana-1 docker container, re-access grafana, modify the dashboard and try to find that it can be saved
$ docker restart teslamate-grafana-1

@Hjlfmir
Copy link

Hjlfmir commented Aug 14, 2023

Hi.
I tried this, file is corretly modified but the issue is still the same :s

@AkshayRao27
Copy link
Author

AkshayRao27 commented Nov 14, 2023

When modifying grafana's dashboard to save, it prompts Cannot save provisioned dashboard, you can try the following solutions

  1. Copy the /etc/grafana/provisioning/dashboards/dashboards.yml configuration file of the teslamate-grafana-1 docker container to the /tmp directory
$ docker cp teslamate-grafana-1:/etc/grafana/provisioning/dashboards/dashboards.yml /tmp/

This fixed it. I had to change teslamate-grafana-1 to root-grafana-1 for my install.

I tried FTPing into the server to change the file manually without CLI, but I straight up cannot find where Graphana's files are stored. There is no Graphana folder in /etc/ or in /var/lib/

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Jan 14, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2024
@Hjlfmir
Copy link

Hjlfmir commented Nov 1, 2024

Hi everyone, since last update, it seems this solution does not work anymore. Once restarted, Grafana is not working anymore. I need to pull the clean image to get it work :s
Any idea ?

@cwanja
Copy link
Collaborator

cwanja commented Nov 1, 2024

@JakobLichterfeld @swiffer @DrMichael time to add another setting that allows a user to insert their desired currency? Similar to temperature, tire pressure and length. Then use that variable before the value. Is that even possible?

@JakobLichterfeld
Copy link
Collaborator

@JakobLichterfeld @swiffer @DrMichael time to add another setting that allows a user to insert their desired currency? Similar to temperature, tire pressure and length. Then use that variable before the value. Is that even possible?

Hm, on the one hand I do see a bit of improvement in UX, but on the other hand there comes lots of drawbacks with it. More settings mean more room for failure. What If someone moves the location where it is now another currency. My expectation would be an automatic conversion in my currency from setting. All this is not in the scope of TeslaMate nor should it be. So I strongly vote against it.

Hm, on the one hand I see a slight improvement in the UX, but on the other hand there are a lot of drawbacks. More settings means more room for error. What if someone changes location, with a different currency. As a user I would expect an automatic conversion to my currency from the settings. All this is not in the scope of TeslaMate, nor should it be. So I strongly vote against it.

@JakobLichterfeld JakobLichterfeld added note:discussion Details or approval are up for discussion and removed Stale labels Nov 2, 2024
@DrMichael
Copy link
Collaborator

Well, temperature, tire pressure and length are coming from Tesla, whereas the costs are in the responsibility of the user itself.
So I also voter against adding the currency symbol (although it would look nicer).

@swiffer
Copy link
Contributor

swiffer commented Nov 2, 2024

Ok with adding a symbol to make it visually more appealing but agree with both of you that that might open expectations of handling & converting currencies - and as currency exchange rates are changing i wouldn' step into the topic at all.

@Hjlfmir
Copy link

Hjlfmir commented Nov 3, 2024

I understand your arguments. Maybe a "kind of solution" would be to set by default dashboards editable by users. I think it would be enough for most of users, just to be able to add their own currency if they want, but not an among of work for devs.

@swiffer
Copy link
Contributor

swiffer commented Nov 3, 2024

we are doing that with PR #4338 - however changes are overwritten on update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note:discussion Details or approval are up for discussion
Projects
None yet
Development

No branches or pull requests

8 participants