forked from doccano/doccano
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request doccano#176 from CatalystCode/enhancement/remove-d…
…jango-template-inheritance-from-admin Enhancement/Remove Django template inheritance in admin pages
- Loading branch information
Showing
59 changed files
with
1,109 additions
and
1,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
div.columns(v-cloak="") | ||
div.column.is-12 | ||
messages(v-bind:messages="messages") | ||
|
||
div.card | ||
|
||
header.card-header | ||
p.card-header-title File Downloader | ||
|
||
div.card-content | ||
h2.subtitle Download labeled data | ||
|
||
div.control(style="margin-bottom: 1em;") | ||
block select-format-area | ||
|
||
block example-format-area | ||
|
||
button.button.is-primary( | ||
style="margin-top: 1em;" | ||
type="submit" | ||
v-on:click="download()" | ||
) Download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Vue from 'vue'; | ||
import DownloadSeq2Seq from './download_seq2seq.vue'; | ||
|
||
new Vue({ | ||
el: '#mail-app', | ||
|
||
components: { DownloadSeq2Seq }, | ||
|
||
template: '<DownloadSeq2Seq />', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template lang="pug"> | ||
extends ./download.pug | ||
|
||
block select-format-area | ||
label.radio | ||
input( | ||
type="radio" | ||
name="format" | ||
value="csv" | ||
v-bind:checked="format == 'csv'" | ||
v-model="format" | ||
) | ||
| CSV | ||
|
||
label.radio | ||
input( | ||
type="radio" | ||
name="format" | ||
value="json" | ||
v-bind:checked="format == 'json'" | ||
v-model="format" | ||
) | ||
| JSONL | ||
|
||
block example-format-area | ||
pre.code-block(v-show="format == 'csv'") | ||
code.csv | ||
include ./examples/download_seq2seq.csv | ||
| ... | ||
|
||
pre.code-block(v-show="format == 'json'") | ||
code.json | ||
include ./examples/download_seq2seq.jsonl | ||
| ... | ||
</template> | ||
|
||
<script> | ||
import { uploadMixin } from './mixin'; | ||
export default uploadMixin; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Vue from 'vue'; | ||
import DownloadSequenceLabeling from './download_sequence_labeling.vue'; | ||
|
||
new Vue({ | ||
el: '#mail-app', | ||
|
||
components: { DownloadSequenceLabeling }, | ||
|
||
template: '<DownloadSequenceLabeling />', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template lang="pug"> | ||
extends ./download.pug | ||
|
||
block select-format-area | ||
label.radio | ||
input( | ||
type="radio" | ||
name="format" | ||
value="json" | ||
v-bind:checked="format == 'json'" | ||
v-model="format" | ||
) | ||
| JSONL | ||
|
||
block example-format-area | ||
pre.code-block(v-show="format == 'json'") | ||
code.json | ||
include ./examples/download_sequence_labeling.jsonl | ||
| ... | ||
</template> | ||
|
||
<script> | ||
import { uploadMixin } from './mixin'; | ||
export default uploadMixin; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Vue from 'vue'; | ||
import DownloadTextClassification from './download_text_classification.vue'; | ||
|
||
new Vue({ | ||
el: '#mail-app', | ||
|
||
components: { DownloadTextClassification }, | ||
|
||
template: '<DownloadTextClassification />', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template lang="pug"> | ||
extends ./download.pug | ||
|
||
block select-format-area | ||
label.radio | ||
input( | ||
type="radio" | ||
name="format" | ||
value="csv" | ||
v-bind:checked="format == 'csv'" | ||
v-model="format" | ||
) | ||
| CSV | ||
|
||
label.radio | ||
input( | ||
type="radio" | ||
name="format" | ||
value="json" | ||
v-bind:checked="format == 'json'" | ||
v-model="format" | ||
) | ||
| JSONL | ||
|
||
block example-format-area | ||
pre.code-block(v-show="format == 'csv'") | ||
code.csv | ||
include ./examples/download_text_classification.csv | ||
| ... | ||
|
||
pre.code-block(v-show="format == 'json'") | ||
code.json | ||
include ./examples/download_text_classification.jsonl | ||
| ... | ||
</template> | ||
|
||
<script> | ||
import { uploadMixin } from './mixin'; | ||
export default uploadMixin; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
id,text,label,user | ||
1,"Hello!","こんにちは!",1 | ||
2,"Good morning.","おはようございます。",1 | ||
3,"See you.","さようなら。",1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"id": 1, "text": "Hello!", "annotations": [{"id": 1, "label": "こんにちは!", "user": 1}]} | ||
{"id": 2, "text": "Good morning.", "annotations": [{"id": 2, "label": "おはようございます。", "user": 1}]} | ||
{"id": 3, "text": "See you.", "annotations": [{"id": 3, "label": "さようなら。", "user": 1}]} |
3 changes: 3 additions & 0 deletions
3
app/server/static/js/examples/download_sequence_labeling.jsonl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"id": 1, "text": "EU rejects ...", "annotations": [{"id": 1, "label": 2, "start_offset": 0, "end_offset": 2, "user": 1}]} | ||
{"id": 2, "text": "Peter Blackburn", "annotations": [{"id": 2, "label": 1, "start_offset": 0, "end_offset": 15, "user": 1}]} | ||
{"id": 3, "text": "President Obama", "annotations": [{"id": 3, "label": 1, "start_offset": 10, "end_offset": 15, "user": 1}]} |
4 changes: 4 additions & 0 deletions
4
app/server/static/js/examples/download_text_classification.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
id,text,label,user | ||
1,"Terrible customer service.",1,1 | ||
2,"Really great transaction.",2,1 | ||
3,"Great price.",2,1 |
3 changes: 3 additions & 0 deletions
3
app/server/static/js/examples/download_text_classification.jsonl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"id": 1, "text": "Terrible customer service.", "annotations": [{"id": 1, "label": 1, "user": 1}]} | ||
{"id": 2, "text": "Really great transaction.", "annotations": [{"id": 2, "label": 2, "user": 1}]} | ||
{"id": 3, "text": "Great price.", "annotations": [{"id": 3, "label": 2, "user": 1}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
text,label | ||
"Hello!","こんにちは!" | ||
"Good morning.","おはようございます。" | ||
"See you.","さようなら。" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"text": "Hello!", "labels": ["こんにちは!"]} | ||
{"text": "Good morning.", "labels": ["おはようございます。"]} | ||
{"text": "See you.", "labels": ["さようなら。"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Hello! | ||
Good morning. | ||
See you. |
12 changes: 12 additions & 0 deletions
12
app/server/static/js/examples/upload_sequence_labeling.conll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
EU B-ORG | ||
rejects O | ||
German B-MISC | ||
call O | ||
to O | ||
boycott O | ||
British B-MISC | ||
lamb O | ||
. O | ||
|
||
Peter B-PER | ||
Blackburn I-PER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"text": "EU rejects German call to boycott British lamb.", "labels": [ [0, 2, "ORG"], [11, 17, "MISC"], ... ]} | ||
{"text": "Peter Blackburn", "labels": [ [0, 15, "PERSON"] ]} | ||
{"text": "President Obama", "labels": [ [10, 15, "PERSON"] ]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
EU rejects German call to boycott British lamb. | ||
Peter Blackburn | ||
President Obama |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
text,label | ||
"Terrible customer service.","negative" | ||
"Really great transaction.","positive" | ||
"Great price.","positive" |
3 changes: 3 additions & 0 deletions
3
app/server/static/js/examples/upload_text_classification.jsonl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"text": "Terrible customer service.", "labels": ["negative"]} | ||
{"text": "Really great transaction.", "labels": ["positive"]} | ||
{"text": "Great price.", "labels": ["positive"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Terrible customer service. | ||
Really great transaction. | ||
Great price. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,13 @@ | ||
import * as marked from 'marked'; | ||
import Vue from 'vue'; | ||
import vueDebounce from 'vue-debounce'; | ||
import HTTP from './http'; | ||
import Guideline from './guideline.vue'; | ||
|
||
Vue.use(vueDebounce); | ||
|
||
const vm = new Vue({ // eslint-disable-line no-unused-vars | ||
new Vue({ | ||
el: '#mail-app', | ||
data: { | ||
input: '', | ||
project: Object, | ||
messages: [], | ||
}, | ||
|
||
computed: { | ||
compiledMarkdown() { | ||
return marked(this.input, { | ||
sanitize: true, | ||
}); | ||
}, | ||
}, | ||
|
||
created() { | ||
HTTP.get().then((response) => { | ||
this.input = response.data.guideline; | ||
this.project = response.data; | ||
}); | ||
}, | ||
|
||
methods: { | ||
update(value) { | ||
this.input = value; | ||
const payload = { | ||
guideline: this.input, | ||
}; | ||
HTTP.patch('', payload).then((response) => { | ||
this.project = response.data; | ||
}); | ||
}, | ||
}, | ||
components: { Guideline }, | ||
|
||
template: '<Guideline />', | ||
}); |
Oops, something went wrong.