This commit is contained in:
2025-12-26 20:39:32 +01:00
parent 4998dc066a
commit a34f02db00
3 changed files with 7 additions and 1 deletions

View File

@@ -228,6 +228,8 @@ class Dashboard(ModelSQL, ModelView):
return round(1/last_rate,6), round(1/prev_rate,6)
def get_tremor(self,name):
Configuration = Pool().get('gr.configuration')
config = Configuration.search(['id','>',0])[0]
Pnl = Pool().get('valuation.valuation')
pnls = Pnl.search(['id','>',0])
pnl_amount = "{:,.0f}".format(round(sum([e.amount for e in pnls]),0))
@@ -282,7 +284,8 @@ class Dashboard(ModelSQL, ModelView):
move_cash = len(accs)
return (
"https://srv413259.hstgr.cloud/dashboard/index.html?pnl_amount="
config.dashboard +
"/dashboard/index.html?pnl_amount="
+ str(pnl_amount)
+ "&exposure="
+ str(exposure)

View File

@@ -12,4 +12,5 @@ class GRConfiguration(ModelSingleton, ModelSQL, ModelView):
__name__ = 'gr.configuration'
bi = fields.Char("BI connexion")
dashboard = fields.Char("Dashboard connexion")
dark = fields.Boolean("Dark mode")

View File

@@ -1,6 +1,8 @@
<form>
<label name="bi"/>
<field name="bi"/>
<label name="dashboard"/>
<field name="dashboard"/>
<label name="dark"/>
<field name="dark"/>
</form>