1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

add tests for DbUploader #27

This commit is contained in:
lana-k
2021-04-22 14:04:52 +02:00
parent 803622f18f
commit 628e9cee62
4 changed files with 590 additions and 39 deletions

View File

@@ -44,7 +44,7 @@
<modal name="parse" classes="dialog" height="auto" width="60%" :clickToClose="false">
<div class="dialog-header">
Import CSV
<close-icon @click="cancelCsvImport"/>
<close-icon @click="cancelCsvImport" :disabled="disableDialog"/>
</div>
<div class="dialog-body">
<div class="chars">
@@ -99,6 +99,7 @@
class="secondary"
:disabled="disableDialog"
@click="cancelCsvImport"
id="csv-cancel"
>
Cancel
</button>
@@ -107,6 +108,7 @@
class="primary"
:disabled="disableDialog"
@click="loadFromCsv(file)"
id="csv-import"
>
Import
</button>
@@ -115,6 +117,7 @@
class="primary"
:disabled="disableDialog"
@click="finish"
id="csv-finish"
>
Finish
</button>
@@ -324,9 +327,6 @@ export default {
start = new Date()
this.schema = await this.newDb.createDb(file.name, parseResult.data, progressCounterId)
end = new Date()
if (this.schema.error) {
throw this.schema.error
}
// Inform about import success
period = time.getPeriod(start, end)

View File

@@ -18,7 +18,7 @@
<script>
export default {
name: 'loadingIndicator',
name: 'LoadingIndicator',
props: ['progress'],
computed: {
circleProgress () {

View File

@@ -1,7 +1,7 @@
<template>
<svg
@click.stop="$emit('click')"
class="icon"
:class="['icon', {'disabled': disabled }]"
:width="size"
:height="size"
viewBox="0 0 14 14"
@@ -23,6 +23,11 @@ export default {
type: Number,
required: false,
default: 14
},
disabled: {
type: Boolean,
required: false,
default: false
}
}
}
@@ -32,6 +37,9 @@ export default {
.icon {
cursor: pointer;
}
.disabled {
pointer-events: none;
}
.icon:hover path {
fill: var(--color-text-base);
}