Merge pull request #8281 from hashicorp/b-ui/fix-log-streaming
UI: Revert AbortController polyfill to use native AbortController on logs page
This commit is contained in:
commit
ff015d2997
|
@ -4,10 +4,15 @@ import { action, computed } from '@ember/object';
|
|||
import RSVP from 'rsvp';
|
||||
import { logger } from 'nomad-ui/utils/classes/log';
|
||||
import timeout from 'nomad-ui/utils/timeout';
|
||||
import { AbortController } from 'fetch';
|
||||
import { classNames } from '@ember-decorators/component';
|
||||
import classic from 'ember-classic-decorator';
|
||||
|
||||
class MockAbortController {
|
||||
abort() {
|
||||
/* noop */
|
||||
}
|
||||
}
|
||||
|
||||
@classic
|
||||
@classNames('boxed-section', 'task-log')
|
||||
export default class TaskLog extends Component {
|
||||
|
@ -51,7 +56,7 @@ export default class TaskLog extends Component {
|
|||
// If the log request can't settle in one second, the client
|
||||
// must be unavailable and the server should be used instead
|
||||
|
||||
const aborter = new AbortController();
|
||||
const aborter = window.AbortController ? new AbortController() : new MockAbortController();
|
||||
const timing = this.useServer ? this.serverTimeout : this.clientTimeout;
|
||||
|
||||
// Capture the state of useServer at logger create time to avoid a race
|
||||
|
|
Loading…
Reference in a new issue