diff --git a/ui/app/adapters/application.js b/ui/app/adapters/application.js index 3373fef90..5a4d99804 100644 --- a/ui/app/adapters/application.js +++ b/ui/app/adapters/application.js @@ -28,7 +28,7 @@ export default class Application extends RESTAdapter { }; } - return; + return undefined; } handleResponse(status, headers, payload) { diff --git a/ui/app/components/allocation-row.js b/ui/app/components/allocation-row.js index c5d829b26..0a9fb1c0a 100644 --- a/ui/app/components/allocation-row.js +++ b/ui/app/components/allocation-row.js @@ -30,7 +30,7 @@ export default class AllocationRow extends Component { @computed('allocation', 'allocation.isRunning') get stats() { - if (!this.get('allocation.isRunning')) return; + if (!this.get('allocation.isRunning')) return undefined; return AllocationStatsTracker.create({ fetch: url => this.token.authorizedRequest(url), diff --git a/ui/app/components/allocation-stat.js b/ui/app/components/allocation-stat.js index b740910e0..814d43e52 100644 --- a/ui/app/components/allocation-stat.js +++ b/ui/app/components/allocation-stat.js @@ -29,12 +29,12 @@ export default class AllocationStat extends Component { return this[this.metric]; } - return; + return undefined; } @computed('metric', 'stat.used') get formattedStat() { - if (!this.stat) return; + if (!this.stat) return undefined; if (this.metric === 'memory') return formatBytes([this.stat.used]); return this.stat.used; } @@ -43,6 +43,6 @@ export default class AllocationStat extends Component { get formattedReserved() { if (this.metric === 'memory') return `${this.statsTracker.reservedMemory} MiB`; if (this.metric === 'cpu') return `${this.statsTracker.reservedCPU} MHz`; - return; + return undefined; } } diff --git a/ui/app/components/fs/browser.js b/ui/app/components/fs/browser.js index d18a15777..7dbfd7183 100644 --- a/ui/app/components/fs/browser.js +++ b/ui/app/components/fs/browser.js @@ -24,7 +24,7 @@ export default class Browser extends Component { return this.model; } - return; + return undefined; } @computed('taskState') diff --git a/ui/app/components/fs/file.js b/ui/app/components/fs/file.js index 4b282bb1c..e977c7519 100644 --- a/ui/app/components/fs/file.js +++ b/ui/app/components/fs/file.js @@ -69,7 +69,7 @@ export default class File extends Component { return 'readat'; } - return; + return undefined; } @computed('allocation.{id,node.httpAddr}', 'fetchMode', 'useServer') diff --git a/ui/app/components/image-file.js b/ui/app/components/image-file.js index 2e359a171..16ee6733c 100644 --- a/ui/app/components/image-file.js +++ b/ui/app/components/image-file.js @@ -19,7 +19,7 @@ export default class ImageFile extends Component { @computed('src') get fileName() { - if (!this.src) return; + if (!this.src) return undefined; return this.src.includes('/') ? this.src.match(/^.*\/(.*)$/)[1] : this.src; } diff --git a/ui/app/components/lifecycle-chart-row.js b/ui/app/components/lifecycle-chart-row.js index f63a50eba..44985d747 100644 --- a/ui/app/components/lifecycle-chart-row.js +++ b/ui/app/components/lifecycle-chart-row.js @@ -12,7 +12,7 @@ export default class LifecycleChartRow extends Component { return 'is-active'; } - return; + return undefined; } @computed('taskState.finishedAt') @@ -21,6 +21,6 @@ export default class LifecycleChartRow extends Component { return 'is-finished'; } - return; + return undefined; } } diff --git a/ui/app/components/task-row.js b/ui/app/components/task-row.js index feeb36ef1..28094acd1 100644 --- a/ui/app/components/task-row.js +++ b/ui/app/components/task-row.js @@ -29,14 +29,14 @@ export default class TaskRow extends Component { // Since all tasks for an allocation share the same tracker, use the registry @computed('task', 'task.isRunning') get stats() { - if (!this.get('task.isRunning')) return; + if (!this.get('task.isRunning')) return undefined; return this.statsTrackersRegistry.getTracker(this.get('task.allocation')); } @computed('task.name', 'stats.tasks.[]') get taskStats() { - if (!this.stats) return; + if (!this.stats) return undefined; return this.get('stats.tasks').findBy('task', this.get('task.name')); } diff --git a/ui/app/models/job.js b/ui/app/models/job.js index 9d5b495e6..e179cd4b4 100644 --- a/ui/app/models/job.js +++ b/ui/app/models/job.js @@ -174,7 +174,7 @@ export default class Job extends Model { return failureEvaluations.sortBy('modifyIndex').get('lastObject'); } - return; + return undefined; } @equal('type', 'service') supportsDeployments; @@ -185,7 +185,7 @@ export default class Job extends Model { get runningDeployment() { const latest = this.latestDeployment; if (latest.get('isRunning')) return latest; - return; + return undefined; } fetchRawDefinition() { diff --git a/ui/app/models/node-attributes.js b/ui/app/models/node-attributes.js index 2f24d9bb9..810fab2c6 100644 --- a/ui/app/models/node-attributes.js +++ b/ui/app/models/node-attributes.js @@ -13,7 +13,7 @@ export default class NodeAttributes extends Fragment { const original = this.nodeAttributes; if (!original) { - return; + return undefined; } // `unflatten` doesn't sort keys before unflattening, so manual preprocessing is necessary. diff --git a/ui/app/models/node.js b/ui/app/models/node.js index d56d28ca6..2e69d56aa 100644 --- a/ui/app/models/node.js +++ b/ui/app/models/node.js @@ -74,7 +74,7 @@ export default class Node extends Model { return allocation.modifyTime; } - return; + return undefined; } @fragmentArray('node-driver') drivers; diff --git a/ui/app/services/token.js b/ui/app/services/token.js index d829431d9..78d43feb1 100644 --- a/ui/app/services/token.js +++ b/ui/app/services/token.js @@ -47,7 +47,7 @@ export default class TokenService extends Service { @computed('secret', 'fetchSelfToken.lastSuccessful.value') get selfToken() { if (this.secret) return this.get('fetchSelfToken.lastSuccessful.value'); - return; + return undefined; } @task(function*() {