Browse Source

Added more info to privacy page.

Added shortened url count to transparency page.
tags/2.0.3
Teknikode 5 years ago
parent
commit
3e2551d1fb

+ 1
- 1
Teknik/Areas/Privacy/Views/Privacy/Index.cshtml View File

@@ -47,7 +47,7 @@
</ul>
<h2>Analytics</h2>
<p>
We use <a href="http://piwik.org/">Piwik</a> to track user interaction with the site. This will store the first 2 bytes of your IP Address (e.g. 192.168.xxx.xxx) as an identifier.
We use <a href="http://piwik.org/">Piwik</a> to track user interaction with the site. This will store the first 2 bytes of your IP Address (e.g. 192.168.xxx.xxx) as an identifier. If you do not want to be tracked, enable Do Not Track in your browser (Recommended), or by unchecking below.
</p>
<iframe style="border: 0; height: 200px; width: 600px;" src="https://stats.teknik.io/index.php?module=CoreAdminHome&action=optOut&language=en"></iframe>
</div>

+ 3
- 0
Teknik/Areas/Transparency/Controllers/TransparencyController.cs View File

@@ -29,6 +29,9 @@ namespace Teknik.Areas.Transparency.Controllers
Profile.Models.User user = db.Users.OrderByDescending(u => u.UserId).FirstOrDefault();
model.UserCount = (user != null) ? user.UserId : 0;

Shortener.Models.ShortenedUrl url = db.ShortenedUrls.OrderByDescending(s => s.ShortenedUrlId).FirstOrDefault();
model.ShortenedUrlCount = (url != null) ? url.ShortenedUrlId : 0;

model.TotalNet = new Dictionary<string, double>();

var billSums = db.Transactions.OfType<Bill>().GroupBy(b => b.Currency).Select(b => new { currency = b.Key, total = b.Sum(c => c.Amount) }).ToList();

+ 2
- 0
Teknik/Areas/Transparency/ViewModels/TransparencyViewModel.cs View File

@@ -18,6 +18,8 @@ namespace Teknik.Areas.Transparency.ViewModels

public int UserCount { get; set; }

public int ShortenedUrlCount { get; set; }

public Dictionary<string, double> TotalBills { get; set; }

public Dictionary<string, double> TotalOneTimes { get; set; }

+ 4
- 0
Teknik/Areas/Transparency/Views/Transparency/Index.cshtml View File

@@ -36,6 +36,10 @@
<h3>Users</h3>
<p>Number of Users: @Model.UserCount</p>
</div>
<div class="col-sm-6">
<h3>Shortened Urls</h3>
<p>Number of Shortened Urls: @Model.ShortenedUrlCount</p>
</div>
</div>
<br />
<h2 class="text-center"><b>Transactions</b></h2>

Loading…
Cancel
Save