|
|
@ -193,6 +193,7 @@ |
|
|
|
class="nc-json-import-input" |
|
|
|
class="nc-json-import-input" |
|
|
|
type="file" |
|
|
|
type="file" |
|
|
|
style="display: none" |
|
|
|
style="display: none" |
|
|
|
|
|
|
|
accept=".json" |
|
|
|
@change="_change($event)" |
|
|
|
@change="_change($event)" |
|
|
|
> |
|
|
|
> |
|
|
|
<v-btn |
|
|
|
<v-btn |
|
|
@ -285,7 +286,8 @@ export default { |
|
|
|
filename: '', |
|
|
|
filename: '', |
|
|
|
jsonString: '', |
|
|
|
jsonString: '', |
|
|
|
errorMessages: { |
|
|
|
errorMessages: { |
|
|
|
ipBlockList: 'IP Not allowed!' |
|
|
|
ipBlockList: 'IP Not allowed!', |
|
|
|
|
|
|
|
importJSON: 'Target file is not an accepted file type. The accepted file type is .json!' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -406,6 +408,10 @@ export default { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!/.*\.json/.test(file.name)) { |
|
|
|
|
|
|
|
return this.$toast.error(this.errorMessages.importJSON).goAway(3000) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this._file(file) |
|
|
|
this._file(file) |
|
|
|
}, |
|
|
|
}, |
|
|
|
dragOverHandler(ev) { |
|
|
|
dragOverHandler(ev) { |
|
|
|