Skip to content

Commit 51d4846

Browse files
committed
show any sync error in web-ui
1 parent 8123782 commit 51d4846

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/views/Sync.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<button class="btn btn-success" @click="addSyncPair()">{{ translate("SYNC.ADDPAIR") }}</button>
1313
</div>
1414
<div style="padding:1em">Status: {{ status }}</div>
15+
<div v-if="hasError" style="padding:1em">Previous error: {{ error }}</div>
1516
</center>
1617
<div style="display:flex; flex-direction:column">
1718
<div v-for="pair in syncPairs" style="display:flex; flex-direction:row; flex-wrap:wrap; padding:1em; margin:.5em; border:solid #16a98a;">
@@ -109,6 +110,7 @@ module.exports = {
109110
select_options: [],
110111
status: "",
111112
updateStatusIntervalID: "",
113+
error: null,
112114
}
113115
},
114116
props: [],
@@ -121,6 +123,9 @@ module.exports = {
121123
...Vuex.mapGetters([
122124
'getPath'
123125
]),
126+
hasError(){
127+
return this.error != null;
128+
},
124129
},
125130
created() {
126131
this.getSyncState();
@@ -185,6 +190,7 @@ module.exports = {
185190
let that = this;
186191
this.localPost("/peergos/v0/sync/status").then(function(result, err) {
187192
that.status = result.msg;
193+
that.error = result.error;
188194
})
189195
},
190196

0 commit comments

Comments
 (0)