From 69cdb76a604c707167b4d59f5d674704be31036f Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 22 Mar 2020 00:47:45 -0400 Subject: [PATCH] Minor formatting changes from prettier 2.0 --- src/App.vue | 10 +++++----- src/Job.vue | 4 ++-- src/index.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index 0caba74..02792c9 100644 --- a/src/App.vue +++ b/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); diff --git a/src/Job.vue b/src/Job.vue index bd33275..da6a291 100644 --- a/src/Job.vue +++ b/src/Job.vue @@ -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 diff --git a/src/index.ts b/src/index.ts index 844b31f..0ee0609 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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');