Skip to content

Commit

Permalink
[ui] Check for yarn config when adding application job ids (#2839)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshg999 committed May 9, 2022
1 parent dc301db commit 6ba92cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions desktop/core/src/desktop/js/apps/notebook/snippet.js
Expand Up @@ -31,7 +31,7 @@ import { getStatementsParser } from 'parse/utils';
import { SHOW_EVENT as SHOW_GIST_MODAL_EVENT } from 'ko/components/ko.shareGistModal';
import { cancelActiveRequest } from 'api/apiUtils';
import { ACTIVE_SNIPPET_CONNECTOR_CHANGED_EVENT } from 'apps/editor/events';
import { findEditorConnector } from 'config/hueConfig';
import { findEditorConnector, getLastKnownConfig } from 'config/hueConfig';
import {
ASSIST_GET_DATABASE_EVENT,
ASSIST_GET_SOURCE_EVENT,
Expand Down Expand Up @@ -2575,7 +2575,10 @@ class Snippet {
} else {
job.percentJob = ko.observable(job.percentJob);
}
self.jobs.push(job);
const config = getLastKnownConfig();
if (config && config['hue_config'] && config['hue_config']['is_yarn_enabled']) {
self.jobs.push(job);
}
} else if (typeof job.percentJob !== 'undefined') {
for (let i = 0; i < _found.length; i++) {
_found[i].percentJob(job.percentJob);
Expand Down

0 comments on commit 6ba92cc

Please sign in to comment.