|
105 | 105 | </div> |
106 | 106 | <div class="modal-footer"> |
107 | 107 | <button |
108 | | - class="btn btn-success" |
109 | | - @click="cleanupLogs()" |
110 | | - >{{ labels.cleanup.btn }}</button> |
| 108 | + class="btn btn-success" |
| 109 | + @click="cleanupLogs()" |
| 110 | + > |
| 111 | + {{ labels.cleanup.btn }} |
| 112 | + </button> |
111 | 113 | </div> |
112 | 114 | </div> |
113 | 115 | </div> |
|
127 | 129 | is_loading: false, |
128 | 130 | labels: this.$store.state.labels.logs, |
129 | 131 | upsell_link: ropApiSettings.upsell_link, |
130 | | - cleanupModal: false, |
| 132 | + cleanupModal: false, |
131 | 133 | } |
132 | 134 | }, |
133 | 135 | computed: { |
|
137 | 139 | logs_no: function () { |
138 | 140 | return this.$store.state.cron_status.logs_number; |
139 | 141 | }, |
140 | | - cleanupModalClass: function() { |
141 | | - return { |
142 | | - 'active': true === this.cleanupModal |
143 | | - } |
144 | | - } |
| 142 | + cleanupModalClass: function() { |
| 143 | + return { |
| 144 | + 'active': true === this.cleanupModal |
| 145 | + } |
| 146 | + } |
145 | 147 | }, |
146 | 148 | watch: { |
147 | 149 | logs_no: function () { |
|
201 | 203 | element.click(); |
202 | 204 | document.body.removeChild(element); |
203 | 205 | }, |
204 | | - openCleanupModal() { |
205 | | - this.cleanupModal = true; |
206 | | - }, |
207 | | - closeCleanupModal() { |
208 | | - this.cleanupModal = false; |
209 | | - }, |
210 | | - cleanupLogs: function() { |
211 | | - if (this.is_loading) { |
212 | | - this.$log.warn('Request in progress...Bail'); |
213 | | - return; |
214 | | - } |
215 | | - this.is_loading = true; |
216 | | - this.$store.dispatch('fetchAJAXPromise', { |
217 | | - req: 'cleanup_logs', |
218 | | - data: {} |
219 | | - }).then(response => { |
220 | | - this.is_loading = false; |
221 | | - this.cleanupModal = false; |
222 | | - if (this.$parent.start_status === true) { |
223 | | - // Stop sharing process if enabled. |
224 | | - this.$parent.togglePosting(); |
225 | | - } |
226 | | - }, error => { |
227 | | - this.is_loading = false; |
228 | | - Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error) |
229 | | - }) |
230 | | - }, |
| 206 | + openCleanupModal() { |
| 207 | + this.cleanupModal = true; |
| 208 | + }, |
| 209 | + closeCleanupModal() { |
| 210 | + this.cleanupModal = false; |
| 211 | + }, |
| 212 | + cleanupLogs: function() { |
| 213 | + if (this.is_loading) { |
| 214 | + this.$log.warn('Request in progress...Bail'); |
| 215 | + return; |
| 216 | + } |
| 217 | + this.is_loading = true; |
| 218 | + this.$store.dispatch('fetchAJAXPromise', { |
| 219 | + req: 'cleanup_logs', |
| 220 | + data: {} |
| 221 | + }).then(response => { |
| 222 | + this.is_loading = false; |
| 223 | + this.cleanupModal = false; |
| 224 | + if (this.$parent.start_status === true) { |
| 225 | + // Stop sharing process if enabled. |
| 226 | + this.$parent.togglePosting(); |
| 227 | + } |
| 228 | + }, error => { |
| 229 | + this.is_loading = false; |
| 230 | + Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error) |
| 231 | + }) |
| 232 | + }, |
231 | 233 | }, |
232 | 234 | } |
233 | 235 | </script> |
|
281 | 283 | background-color: #FBE8E8; |
282 | 284 | } |
283 | 285 | } |
284 | | - #rop_core .rop-cleanup-modal .modal-container{ |
285 | | - max-width: 500px; |
286 | | - padding: 25px; |
287 | | - .modal-title, .modal-footer{ |
288 | | - text-align: center; |
289 | | - } |
290 | | - .btn-success{ |
291 | | - border:none; |
292 | | - background-color:#00a32a; |
293 | | - color: #fff; |
294 | | - padding: 0.5rem 1rem; |
295 | | - height: auto; |
296 | | - display: inline; |
297 | | - } |
298 | | - .btn-success:hover{ |
299 | | - background-color:#009528; |
300 | | - } |
301 | | - .modal-body{ |
302 | | - font-size: 0.7rem; |
303 | | - margin: 10px 30px; |
304 | | - padding: 0px; |
305 | | - } |
306 | | - } |
| 286 | + #rop_core .rop-cleanup-modal .modal-container{ |
| 287 | + max-width: 500px; |
| 288 | + padding: 25px; |
| 289 | + .modal-title, .modal-footer{ |
| 290 | + text-align: center; |
| 291 | + } |
| 292 | + .btn-success{ |
| 293 | + border:none; |
| 294 | + background-color:#00a32a; |
| 295 | + color: #fff; |
| 296 | + padding: 0.5rem 1rem; |
| 297 | + height: auto; |
| 298 | + display: inline; |
| 299 | + } |
| 300 | + .btn-success:hover{ |
| 301 | + background-color:#009528; |
| 302 | + } |
| 303 | + .modal-body{ |
| 304 | + font-size: 0.7rem; |
| 305 | + margin: 10px 30px; |
| 306 | + padding: 0px; |
| 307 | + } |
| 308 | + } |
307 | 309 | </style> |
0 commit comments