summaryrefslogtreecommitdiff
path: root/Project-Unite
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-20 16:48:03 -0400
committerMichael <[email protected]>2017-04-20 16:48:03 -0400
commitb13a8205a44140221cfd9b4d0eb9c6838645087c (patch)
tree3ccf482354b774b02cc478fbb50e5bc1bfaccbe7 /Project-Unite
parenta21bed488a70b03bf5cdc8a4ca648ee4fe80ba7c (diff)
downloadproject-unite-b13a8205a44140221cfd9b4d0eb9c6838645087c.tar.gz
project-unite-b13a8205a44140221cfd9b4d0eb9c6838645087c.tar.bz2
project-unite-b13a8205a44140221cfd9b4d0eb9c6838645087c.zip
Add a chart to the dev CP
Diffstat (limited to 'Project-Unite')
-rw-r--r--Project-Unite/Views/Developer/index.cshtml44
1 files changed, 43 insertions, 1 deletions
diff --git a/Project-Unite/Views/Developer/index.cshtml b/Project-Unite/Views/Developer/index.cshtml
index 447df64..f0f3329 100644
--- a/Project-Unite/Views/Developer/index.cshtml
+++ b/Project-Unite/Views/Developer/index.cshtml
@@ -1,8 +1,50 @@

@{
ViewBag.Title = "Dev Control Panel";
+ var db = new Project_Unite.Models.ApplicationDbContext();
+ int fixedbugs = db.Bugs.Where(x => x.Open == false).Count();
+ int notfixedbugs = db.Bugs.Where(x => x.Open == true).Count();
+
}
<h2>Welcome!</h2>
-<p>Hey devs! In the future, this page will give you fancy details on how ShiftOS and the website are progressing. But, that data is not yet available to me - so for now, here's some placeholder text telling you that the dev CP is work-in-progress.</p> \ No newline at end of file
+<p>Here, have a bunch of charts that tell you what you already know!</p>
+
+<div class="row">
+ <div class="col-lg-6">
+ <h3>Bugs</h3>
+ <p>Here's a pie chart that tells you how many bugs have been fixed.</p>
+ <div id="c_bugs"></div>
+ </div>
+</div>
+
+<!-- Resources -->
+<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
+<script src="https://www.amcharts.com/lib/3/pie.js"></script>
+<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
+<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
+<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
+
+<!-- Chart code -->
+<script>
+var chart = AmCharts.makeChart( "c_bugs", {
+ "type": "pie",
+ "theme": "dark",
+ "dataProvider": [{
+ "status": "Fixed",
+ "amount": @fixedbugs
+ }, {
+ "status": "Needs attention",
+ "amount": @notfixedbugs
+ }],
+ "valueField": "status",
+ "titleField": "amount",
+ "balloon":{
+ "fixedPosition":true
+ },
+ "export": {
+ "enabled": true
+ }
+} );
+</script> \ No newline at end of file