Minor formatting changes from prettier 2.0
This commit is contained in:
parent
ee3772f8c3
commit
69cdb76a60
10
src/App.vue
10
src/App.vue
@ -50,8 +50,8 @@ export default class App extends Vue {
|
||||
mode: 'cors',
|
||||
body: JSON.stringify(credentials),
|
||||
})
|
||||
.then(r => r.json())
|
||||
.then(r => this.connectEventSource(r.return[0].token));
|
||||
.then((r) => r.json())
|
||||
.then((r) => this.connectEventSource(r.return[0].token));
|
||||
}
|
||||
|
||||
connectEventSource(token: string): void {
|
||||
@ -62,12 +62,12 @@ export default class App extends Vue {
|
||||
console.info('Connecting to eventSource.');
|
||||
this.evtSource = new EventSource(BASE_URL + 'events?token=' + token);
|
||||
|
||||
this.evtSource.onopen = e => {
|
||||
this.evtSource.onopen = (e) => {
|
||||
console.info('Connected to eventSource.');
|
||||
this.$forceUpdate(); // evtSource.readyState won't be detected otherwise
|
||||
};
|
||||
|
||||
this.evtSource.onmessage = e => {
|
||||
this.evtSource.onmessage = (e) => {
|
||||
const event = JSON.parse(e.data);
|
||||
event.splitTag = event.tag.split('/');
|
||||
this.events.push(event);
|
||||
@ -79,7 +79,7 @@ export default class App extends Vue {
|
||||
}
|
||||
};
|
||||
|
||||
this.evtSource.onerror = e => {
|
||||
this.evtSource.onerror = (e) => {
|
||||
if (!this.evtSourceTimeout) {
|
||||
console.info('Lost eventSource, reconnecting');
|
||||
console.info(e);
|
||||
|
@ -69,7 +69,7 @@ export default class Job extends Vue {
|
||||
get minionEvents(): { [key: string]: MinionJobEvent[] } {
|
||||
return this.events
|
||||
.filter(
|
||||
event =>
|
||||
(event) =>
|
||||
this.isJobEventType(event, 'prog') ||
|
||||
this.isJobEventType(event, 'ret')
|
||||
)
|
||||
@ -84,7 +84,7 @@ export default class Job extends Vue {
|
||||
return (
|
||||
this.hideFindJob &&
|
||||
this.events.find(
|
||||
event =>
|
||||
(event) =>
|
||||
!this.isJobEventType(event, 'prog') &&
|
||||
event.data.fun === 'saltutil.find_job'
|
||||
) !== undefined
|
||||
|
@ -3,5 +3,5 @@ import Vue from 'vue';
|
||||
import App from './App';
|
||||
|
||||
let app = new Vue({
|
||||
render: h => h(App),
|
||||
render: (h) => h(App),
|
||||
}).$mount('#app');
|
||||
|
Loading…
Reference in New Issue
Block a user