mirror of https://github.com/doccano/doccano.git
Hironsan
6 years ago
6 changed files with 197 additions and 247 deletions
Split View
Diff Options
-
BINdoccano/app/db.sqlite3
-
42doccano/app/server/static/project_admin.js
-
186doccano/app/server/templates/admin.html
-
193doccano/app/server/templates/project_admin.html
-
3doccano/app/server/urls.py
-
20doccano/app/server/views.py
@ -1,186 +0,0 @@ |
|||
{% extends "base.html" %} {% load static %} {% block header %} {% endblock %} {% block content %} |
|||
<section class="container" id="root"> |
|||
<div class="columns"> |
|||
|
|||
<div class="column is-8"> |
|||
<div class="box content"> |
|||
<article class="post"> |
|||
<h4>Learning Curve</h4> |
|||
<div class="media"> |
|||
<div class="media-content"> |
|||
<div class="content"> |
|||
<canvas id="myChart"></canvas> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</article> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="column is-4"> |
|||
<div class="box content"> |
|||
<article class="post"> |
|||
<h4>Stats</h4> |
|||
<div class="media"> |
|||
<div class="media-content"> |
|||
<div class="content"> |
|||
<canvas id="myPie"></canvas> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</article> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="columns" style="margin-top:-1rem;"> |
|||
<div class="column is-8"> |
|||
<div class="box content"> |
|||
<article class="post"> |
|||
<h4>Label Management</h4> |
|||
<div class="media"> |
|||
<div class="media-content"> |
|||
<div class="content"> |
|||
|
|||
<div class="field is-grouped"> |
|||
<p class="control is-expanded"> |
|||
<input class="input" type="text" placeholder="Label name"> |
|||
</p> |
|||
<p class="control"> |
|||
<input class="input" type="text" placeholder="Shortcut key"> |
|||
</p> |
|||
<p class="control"> |
|||
<a class="button is-primary"> |
|||
Add |
|||
</a> |
|||
</p> |
|||
</div> |
|||
<table class="table"> |
|||
<thead> |
|||
<tr> |
|||
<th> |
|||
Id |
|||
</th> |
|||
<th>Label name</th> |
|||
<th>Shortcut key</th> |
|||
<th>Deletion</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr v-for="label in labels"> |
|||
<th>[[ label.id ]]</th> |
|||
<td>[[ label.text ]]</td> |
|||
<td>[[ label.shortcut ]]</td> |
|||
<td><a class="button is-danger is-small">Delete</a></td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</article> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="column is-4"> |
|||
<div class="box content"> |
|||
<article class="post"> |
|||
<h4>Data Management</h4> |
|||
<div class="media"> |
|||
<div class="media-content"> |
|||
<div class="content"> |
|||
<p>Data upload</p> |
|||
<div class="file has-name is-right is-fullwidth"> |
|||
<label class="file-label"> |
|||
<input class="file-input" type="file" name="resume" ref="file" v-on:change="handleFileUpload()" /> |
|||
<span class="file-cta"> |
|||
<span class="file-icon"> |
|||
<i class="fas fa-upload"></i> |
|||
</span> |
|||
<span class="file-label"> |
|||
Upload |
|||
</span> |
|||
</span> |
|||
<span class="file-name"> |
|||
[[ file_name ]] |
|||
</span> |
|||
</label> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</article> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</section> |
|||
<script type="text/javascript" src="{% static 'project_admin.js' %}"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script> |
|||
<script type="text/javascript"> |
|||
var ctx = document.getElementById('myChart').getContext('2d'); |
|||
var ctx1 = document.getElementById('myPie'); |
|||
|
|||
var pie = new Chart(ctx1, { |
|||
type: 'doughnut', |
|||
data: { |
|||
datasets: [{ |
|||
data: [10, 20], |
|||
backgroundColor: ["#50dc64", "#3399ff"], |
|||
}], |
|||
labels: [ |
|||
'Labeled', |
|||
'Unlabeled' |
|||
] |
|||
} |
|||
}); |
|||
|
|||
var chart = new Chart(ctx, { |
|||
// The type of chart we want to create |
|||
type: 'line', |
|||
|
|||
// The data for our dataset |
|||
data: { |
|||
labels: [50, 100, 150, 200, 250, 300], |
|||
datasets: [{ |
|||
label: "training", |
|||
backgroundColor: 'rgb(80, 220, 100)', |
|||
borderColor: 'rgb(80, 220, 100)', |
|||
//data: [72, 83, 86, 87, 88, 88.5], |
|||
data: [94, 93.5, 93, 93, 93, 92.5], |
|||
fill: false, |
|||
}, |
|||
{ |
|||
label: "validation", |
|||
backgroundColor: 'rgb(51, 153, 255)', |
|||
borderColor: 'rgb(51, 153, 255)', |
|||
data: [72, 80, 83, 85, 86, 86.5], |
|||
fill: false, |
|||
} |
|||
] |
|||
}, |
|||
|
|||
// Configuration options go here |
|||
options: { |
|||
legend: { |
|||
display: true, |
|||
position: 'right' |
|||
}, |
|||
scales: { |
|||
yAxes: [{ |
|||
scaleLabel: { |
|||
display: true, |
|||
labelString: 'Accuracy' |
|||
} |
|||
}], |
|||
xAxes: [{ |
|||
scaleLabel: { |
|||
display: true, |
|||
labelString: 'Number of training samples' |
|||
} |
|||
}], |
|||
} |
|||
} |
|||
}); |
|||
</script> |
|||
{% endblock %} |
Write
Preview
Loading…
Cancel
Save