diff --git a/conf/version b/conf/version index bcac5e4957389db27ec181053ceaee507146fa60..1017530fe059a7d74bc5fe4fe8801b56319747ed 100644 --- a/conf/version +++ b/conf/version @@ -1 +1 @@ -0.99.8.3 +0.99.8.4 diff --git a/src/pages/ControlPanel.vue b/src/pages/ControlPanel.vue index a637a5e595e66621d625f715834e5f2fa15856b5..967397a5d86c853b0a0c2d87c98eb38b394341b3 100644 --- a/src/pages/ControlPanel.vue +++ b/src/pages/ControlPanel.vue @@ -1365,7 +1365,7 @@ export default { this.LoadingModalActive(false); if (state) { let deltaUploadFAR = 1 - let interval = setInterval(()=>{ + this.postFileFareInterval = setInterval(()=>{ GetStatusUploadFAR(params.result.updateId, deltaUploadFAR, (state, json)=>{ if (json) { console.log(json) @@ -1373,7 +1373,7 @@ export default { this.statusBar.percentege = 50 + (json.result.delta + 1) * 2 deltaUploadFAR = json.result.delta if (json.result.isUpdateEnded) { - clearInterval(interval) + clearInterval(this.postFileFareInterval) GetFinishStatusUploadFAR((state, report)=>{ if (report.result.isUpdateSuccessfull) { let version = null @@ -1600,7 +1600,7 @@ export default { if (localStorage.getItem('userName') != 'Guest') { PutAdminActive((state, data) =>{ // console.log(data + " " + moment().format('hh:mm:ss')) - if (state && data === 'Logout') { + if (state && data === 'Logout' && localStorage.getItem('userName') != 'Guest') { PutLogout(()=>{ this.$store.dispatch('AddNotification_action', { text: `Выход с пользователя!`, type: 'Error', time: 5000 }) login('Guest', 'Guest', (e) =>{}) @@ -1625,7 +1625,14 @@ export default { // }) CheckConnectedToCoreOrBooter((state)=>{ state.booter ? console.log(state.booter) : '' - state.core ? this.$store.dispatch('AddNotification_action', { text: `Соединение с ядром активно!`, type: 'Success', time: 5000 }) : '' + if (state.core) { + this.$store.dispatch('AddNotification_action', { text: `Соединение с ядром активно!`, type: 'Success', time: 5000 }) + if (this.statusBar.percentege > 0) { + clearInterval(this.postFileFareInterval) + this.statusBar.percentege = 0 + this.$store.dispatch('AddNotification_action', { text: `Обновление завершено`, type: 'Success', time: 10000 }) + } + } this.coreState = state.isConnectedToCore }) GetBooterProcess((state, data)=>{ @@ -2105,6 +2112,7 @@ export default { }, timezone: 0, ntpMas: [], + postFileFareInterval: null, }; }, computed: {