From 4d720aa64d12db40788101d18cb96828b25f5a08 Mon Sep 17 00:00:00 2001 From: anon Date: Sun, 5 Jun 2022 15:36:57 -0300 Subject: [PATCH] fixing loading time for charts --- monerojnet/models.py | 40 + monerojnet/templates/monerojnet/base.html | 7 +- monerojnet/templates/monerojnet/bitcoin.html | 2 - monerojnet/templates/monerojnet/commit.html | 4 +- .../templates/monerojnet/commitntv.html | 4 +- .../monerojnet/dailyemissionntv.html | 8 +- monerojnet/templates/monerojnet/fr.html | 4 +- monerojnet/templates/monerojnet/index.html | 3 +- .../templates/monerojnet/minerfees.html | 4 +- monerojnet/templates/monerojnet/powerlaw.html | 31 +- monerojnet/templates/monerojnet/pt.html | 1 - .../templates/monerojnet/sfmultiple.html | 8 +- .../templates/monerojnet/tail_emission.html | 300 +++ .../templates/monerojnet/thermocap.html | 4 +- .../templates/monerojnet/transcost.html | 27 +- monerojnet/urls.py | 8 +- monerojnet/views.py | 2159 ++++++++++++----- moneropro/settings.py | 2 +- time_test.txt | 66 +- 19 files changed, 1961 insertions(+), 721 deletions(-) create mode 100644 monerojnet/templates/monerojnet/tail_emission.html diff --git a/monerojnet/models.py b/monerojnet/models.py index 0f43679..22252b4 100644 --- a/monerojnet/models.py +++ b/monerojnet/models.py @@ -52,5 +52,45 @@ class Sfmodel(models.Model): stocktoflow = models.FloatField() greyline = models.FloatField() + def __str__(self): + return self.date + +class DailyData(models.Model): + date = models.DateField() + btc_usd = models.FloatField() + btc_ntv = models.FloatField() + xmr_usd = models.FloatField() + xmr_ntv = models.FloatField() + xmr_transacpercentage = models.FloatField() + xmr_priceusd = models.FloatField() + xmr_pricebtc = models.FloatField() + btc_inflation = models.FloatField() + xmr_inflation = models.FloatField() + dash_inflation = models.FloatField() + grin_inflation = models.FloatField() + zcash_inflation = models.FloatField() + btc_supply = models.IntegerField() + xmr_supply = models.IntegerField() + btc_return = models.FloatField() + xmr_return = models.FloatField() + btc_minerrevntv = models.FloatField() + xmr_minerrevntv = models.FloatField() + btc_minerrevusd = models.FloatField() + xmr_minerrevusd = models.FloatField() + btc_minerfeesntv = models.FloatField() + xmr_minerfeesntv = models.FloatField() + btc_minerfeesusd = models.FloatField() + xmr_minerfeesusd = models.FloatField() + btc_transcostntv = models.FloatField() + xmr_transcostntv = models.FloatField() + btc_transcostusd = models.FloatField() + xmr_transcostusd = models.FloatField() + btc_commitntv = models.FloatField() + xmr_commitntv = models.FloatField() + btc_commitusd = models.FloatField() + xmr_commitusd = models.FloatField() + xmr_metcalfebtc = models.FloatField() + xmr_metcalfeusd = models.FloatField() + def __str__(self): return self.date \ No newline at end of file diff --git a/monerojnet/templates/monerojnet/base.html b/monerojnet/templates/monerojnet/base.html index 8e344c4..7462312 100644 --- a/monerojnet/templates/monerojnet/base.html +++ b/monerojnet/templates/monerojnet/base.html @@ -124,8 +124,8 @@ Fractal Golden Ratio Multiplier Performance ($) - Performance (Sats, log) - Performance (Sats, lin.) + Performance (Sats, Log.) + Performance (Sats, Lin.) Return vs. Inflation Comparison to Bitcoin Power Law @@ -177,7 +177,7 @@
@@ -186,6 +186,7 @@ Coins in Circulation Supply Difference Annual Inflation + Tail Emission Competitors' Inflation Daily Emission ($) Daily Emission (Ntv.) diff --git a/monerojnet/templates/monerojnet/bitcoin.html b/monerojnet/templates/monerojnet/bitcoin.html index d5af98a..8d82002 100644 --- a/monerojnet/templates/monerojnet/bitcoin.html +++ b/monerojnet/templates/monerojnet/bitcoin.html @@ -67,8 +67,6 @@
- - diff --git a/monerojnet/templates/monerojnet/commit.html b/monerojnet/templates/monerojnet/commit.html index 5c0b3ad..e438092 100644 --- a/monerojnet/templates/monerojnet/commit.html +++ b/monerojnet/templates/monerojnet/commit.html @@ -226,7 +226,7 @@ color: 'white' } }, - tickformat :",.2f" + tickformat :",.5f" ,nticks: 10 ,tickfont: { color: "#ffffff" @@ -280,7 +280,7 @@ showlegend: false, yaxis: { type: "log", - tickformat :",.2f" + tickformat :",.5f" ,nticks: 10 ,tickfont: { color: "#ffffff" diff --git a/monerojnet/templates/monerojnet/commitntv.html b/monerojnet/templates/monerojnet/commitntv.html index eb489d3..d89e9cd 100644 --- a/monerojnet/templates/monerojnet/commitntv.html +++ b/monerojnet/templates/monerojnet/commitntv.html @@ -227,7 +227,7 @@ color: 'white' } }, - tickformat :",.2f" + tickformat :",.3f" ,nticks: 10 ,tickfont: { color: "#ffffff" @@ -281,7 +281,7 @@ showlegend: false, yaxis: { type: "log", - tickformat :",.2f" + tickformat :",.3f" ,nticks: 10 ,tickfont: { color: "#ffffff" diff --git a/monerojnet/templates/monerojnet/dailyemissionntv.html b/monerojnet/templates/monerojnet/dailyemissionntv.html index 5d074cb..8f979fa 100644 --- a/monerojnet/templates/monerojnet/dailyemissionntv.html +++ b/monerojnet/templates/monerojnet/dailyemissionntv.html @@ -127,7 +127,7 @@ mode: "lines", name: 'Monero Daily Emission', x: {{ dates|safe }}, - y: {{ costxmr|safe }}, + y: {{ emissionxmr|safe }}, line: { color: '#dd1d1d' ,width: 2 @@ -139,7 +139,7 @@ mode: "lines", name: 'Monero Daily Emission', x: {{ dates|safe }}, - y: {{ costxmr|safe }}, + y: {{ emissionxmr|safe }}, line: { color: '#dd1d1d' ,width: 2 @@ -151,7 +151,7 @@ mode: "lines", name: 'Bitcoin Daily Emission', x: {{ dates|safe }}, - y: {{ costbtc|safe }}, + y: {{ emissionbtc|safe }}, line: { color: '#ffd311' ,width: 2 @@ -163,7 +163,7 @@ mode: "lines", name: 'Bitcoin Daily Emission', x: {{ dates|safe }}, - y: {{ costbtc|safe }}, + y: {{ emissionxmr|safe }}, line: { color: '#ffd311' ,width: 2 diff --git a/monerojnet/templates/monerojnet/fr.html b/monerojnet/templates/monerojnet/fr.html index 46567ca..d6e5f18 100644 --- a/monerojnet/templates/monerojnet/fr.html +++ b/monerojnet/templates/monerojnet/fr.html @@ -318,9 +318,7 @@

Monero est la pointe de la lance en matière d'intimité. Sa technologie de pointe en a fait le choix optimal pour la plupart des pirates - informatiques. Il existe une loi économique qui dit - les gens préfèrent se débarrasser du mauvais argent - et détenir le meilleur argent. C'est ce à quoi nous assistons, Bitcoin + informatiques. C'est ce à quoi nous assistons, Bitcoin est abandonné au profit de Monero, la seule véritable option de confidentialité.

diff --git a/monerojnet/templates/monerojnet/index.html b/monerojnet/templates/monerojnet/index.html index 84dbda8..1ec13bd 100644 --- a/monerojnet/templates/monerojnet/index.html +++ b/monerojnet/templates/monerojnet/index.html @@ -238,8 +238,7 @@

Hackers prefer Monero over Bitcoin

-

Monero is the tip of the spear in privacy. Its cutting edge technology made it the optimal choice for most hackers. There is an economics law that states - people prefer to get rid of bad money and hold the best money. That's what we are witnessing, Bitcoin is being abandoned in favour of Monero, +

Monero is the tip of the spear in privacy. Its cutting edge technology made it the optimal choice for most hackers. That's what we are witnessing, Bitcoin is being abandoned in favour of Monero, the only true privacy option.

diff --git a/monerojnet/templates/monerojnet/minerfees.html b/monerojnet/templates/monerojnet/minerfees.html index f125805..b865511 100644 --- a/monerojnet/templates/monerojnet/minerfees.html +++ b/monerojnet/templates/monerojnet/minerfees.html @@ -241,7 +241,7 @@ ,size: 13 } ,gridcolor: "#333333" - ,range: ['2010-06-14', '2024-01-01'] + ,range: ['2011-02-14', '2024-01-01'] ,zeroline: true }, margin: { @@ -295,7 +295,7 @@ ,size: 7 } ,gridcolor: "#444444" - ,range: ['2010-06-14', '2024-01-01'] + ,range: ['2011-02-14', '2024-01-01'] ,zeroline: true }, margin: { diff --git a/monerojnet/templates/monerojnet/powerlaw.html b/monerojnet/templates/monerojnet/powerlaw.html index c9c483a..919fede 100644 --- a/monerojnet/templates/monerojnet/powerlaw.html +++ b/monerojnet/templates/monerojnet/powerlaw.html @@ -185,7 +185,7 @@ var data2 = { type: "scatter", mode: "lines", - name: 'Buy Zone', + name: 'Neutral Line', x: {{ counter|safe }}, y: {{ line2|safe }}, line: { @@ -198,7 +198,7 @@ var data2_mobile = { type: "scatter", mode: "lines", - name: 'Buy Zone', + name: 'Neutral Line', x: {{ counter|safe }}, y: {{ line2|safe }}, line: { @@ -414,18 +414,25 @@ var layout_mobile = { ,gridcolor: "#444444" }, xaxis: { - hoverformat: "%Y", - showgrid: true, - type: 'date', - nticks: 10 - ,tickfont: { - color: "#dddddd" - ,size: 7 + type: "log", + title: { + text: 'Year', + font: { + family: 'Nunito, monospace', + size: 14, + color: '#7f7f7f' } - ,gridcolor: "#444444" - ,range: ['2009-12-20', '2026-01-10'] - ,zeroline: true }, + nticks: 20, + tickvals: {{ dates|safe }}, + ticktext: {{ years|safe }}, + showgrid: true, + gridcolor: "#444444", + tickfont: { + color: "#dddddd" + ,size: 13 + }, +}, margin: { l: 40, r: 0, diff --git a/monerojnet/templates/monerojnet/pt.html b/monerojnet/templates/monerojnet/pt.html index d75d980..e1fab01 100644 --- a/monerojnet/templates/monerojnet/pt.html +++ b/monerojnet/templates/monerojnet/pt.html @@ -245,7 +245,6 @@

Hackers preferem Monero a Bitcoin

Monero é a ponta da lança em privacidade. Sua tecnologia de o tornou a escolha ideal para a maioria dos hackers. - Existe uma lei econômica que diz que as pessoas preferem se livrar do dinheiro ruim e ficar com o melhor dinheiro. Isso é o que estamos testemunhando, o Bitcoin está sendo abandonado em favor do Monero, a única opção de privacidade verdadeira.

diff --git a/monerojnet/templates/monerojnet/sfmultiple.html b/monerojnet/templates/monerojnet/sfmultiple.html index c753069..0469934 100644 --- a/monerojnet/templates/monerojnet/sfmultiple.html +++ b/monerojnet/templates/monerojnet/sfmultiple.html @@ -127,7 +127,7 @@ var data1 = { type: "scatter", mode: "lines", - name: 'Buy', + name: 'Oversold', x: {{ dates|safe }}, y: {{ buy|safe }}, line: { @@ -139,7 +139,7 @@ var data1_mobile = { type: "scatter", mode: "lines", - name: 'Buy', + name: 'Oversold', x: {{ dates|safe }}, y: {{ buy|safe }}, line: { @@ -151,7 +151,7 @@ var data2 = { type: "scatter", mode: "lines", - name: 'Sell', + name: 'Overbought', x: {{ dates|safe }}, y: {{ sell|safe }}, line: { @@ -163,7 +163,7 @@ var data2_mobile = { type: "scatter", mode: "lines", - name: 'Sell', + name: 'Overbought', x: {{ dates|safe }}, y: {{ sell|safe }}, line: { diff --git a/monerojnet/templates/monerojnet/tail_emission.html b/monerojnet/templates/monerojnet/tail_emission.html new file mode 100644 index 0000000..b281d38 --- /dev/null +++ b/monerojnet/templates/monerojnet/tail_emission.html @@ -0,0 +1,300 @@ +{% extends 'monerojnet/base.html' %} +{% block content %} + + +
+ + +
+ + +

+
+
+
+
+
Monero's Tail Emission
+ +
+
+
+
+
+
+
+
+ + + +
+ + +
+
+
+
+
+
+ Current Monero Annualized Inflation (%)
+
{{ now_xmr }}
+
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ + +
+ + + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/monerojnet/templates/monerojnet/thermocap.html b/monerojnet/templates/monerojnet/thermocap.html index d278973..9071e3d 100644 --- a/monerojnet/templates/monerojnet/thermocap.html +++ b/monerojnet/templates/monerojnet/thermocap.html @@ -113,7 +113,7 @@ var data2 = { type: "scatter", mode: "lines", - name: 'Buy line', + name: 'Neutral line', x: {{ dates|safe }}, y: {{ calories2|safe }}, line: { @@ -126,7 +126,7 @@ var data2_mobile = { type: "scatter", mode: "lines", - name: 'Buy line', + name: 'Neutral line', x: {{ dates|safe }}, y: {{ calories2|safe }}, line: { diff --git a/monerojnet/templates/monerojnet/transcost.html b/monerojnet/templates/monerojnet/transcost.html index 083ed0c..3a601c3 100644 --- a/monerojnet/templates/monerojnet/transcost.html +++ b/monerojnet/templates/monerojnet/transcost.html @@ -121,29 +121,6 @@