瀏覽代碼

[frontend] Fix all js and style linting issues

Johan Åhlén 4 年之前
父節點
當前提交
1e9c5f5955
共有 76 個文件被更改,包括 202 次插入191 次删除
  1. 3 2
      .stylelintrc
  2. 1 1
      desktop/core/src/desktop/js/api/utils.ts
  3. 1 3
      desktop/core/src/desktop/js/apps/editor/components/EditorResizer.vue
  4. 1 1
      desktop/core/src/desktop/js/apps/editor/components/EditorResizerKoBridge.vue
  5. 1 1
      desktop/core/src/desktop/js/apps/editor/components/ExecuableActions.scss
  6. 1 0
      desktop/core/src/desktop/js/apps/editor/components/ExecutableActionsKoBridge.vue
  7. 1 0
      desktop/core/src/desktop/js/apps/editor/components/ExecutableProgressBarKoBridge.vue
  8. 0 1
      desktop/core/src/desktop/js/apps/editor/components/QueryEditorWebComponents.d.ts
  9. 7 3
      desktop/core/src/desktop/js/apps/editor/components/QueryHistoryTable.scss
  10. 1 0
      desktop/core/src/desktop/js/apps/editor/components/QueryHistoryTableKoBridge.vue
  11. 2 1
      desktop/core/src/desktop/js/apps/editor/components/aceEditor/AceEditor.vue
  12. 1 0
      desktop/core/src/desktop/js/apps/editor/components/aceEditor/AceEditorKoBridge.vue
  13. 3 3
      desktop/core/src/desktop/js/apps/editor/components/aceEditor/AceLocationHandler.ts
  14. 1 0
      desktop/core/src/desktop/js/apps/editor/components/executionAnalysis/ExecutionAnalysisPanelKoBridge.vue
  15. 2 3
      desktop/core/src/desktop/js/apps/editor/components/presentationMode/PresentationModeKoBridge.vue
  16. 1 1
      desktop/core/src/desktop/js/apps/editor/components/result/ResultTable.scss
  17. 1 0
      desktop/core/src/desktop/js/apps/editor/components/result/ResultTableKoBridge.vue
  18. 2 0
      desktop/core/src/desktop/js/apps/editor/components/sqlScratchpad/SqlScratchpad.scss
  19. 1 0
      desktop/core/src/desktop/js/apps/editor/components/sqlScratchpad/SqlScratchpad.vue
  20. 1 1
      desktop/core/src/desktop/js/apps/editor/components/variableSubstitution/VariableSubstitution.vue
  21. 2 0
      desktop/core/src/desktop/js/apps/editor/execution/api.ts
  22. 2 0
      desktop/core/src/desktop/js/apps/editor/execution/executor.ts
  23. 18 16
      desktop/core/src/desktop/js/apps/editor/execution/sessionManager.test.ts
  24. 28 30
      desktop/core/src/desktop/js/apps/editor/execution/sqlExecutable.test.ts
  25. 7 4
      desktop/core/src/desktop/js/apps/editor/execution/sqlExecutable.ts
  26. 2 1
      desktop/core/src/desktop/js/apps/notebook/snippet.js
  27. 1 0
      desktop/core/src/desktop/js/catalog/DataCatalogEntry.ts
  28. 1 3
      desktop/core/src/desktop/js/components/ColumnSelectorPanel.vue
  29. 1 1
      desktop/core/src/desktop/js/components/ComboBox.vue
  30. 1 1
      desktop/core/src/desktop/js/components/DateRangePicker.vue
  31. 1 1
      desktop/core/src/desktop/js/components/HueButton.scss
  32. 0 4
      desktop/core/src/desktop/js/components/HueLink.vue
  33. 2 1
      desktop/core/src/desktop/js/components/HueTable.scss
  34. 2 2
      desktop/core/src/desktop/js/components/HueTable.vue
  35. 0 1
      desktop/core/src/desktop/js/components/Modal.scss
  36. 0 1
      desktop/core/src/desktop/js/components/SearchInput.scss
  37. 6 1
      desktop/core/src/desktop/js/components/Spinner.scss
  38. 1 2
      desktop/core/src/desktop/js/components/assist/AssistPanel.scss
  39. 1 1
      desktop/core/src/desktop/js/components/assist/SqlAssistPanel.scss
  40. 1 1
      desktop/core/src/desktop/js/components/dropdown/DropdownDrawer.scss
  41. 1 2
      desktop/core/src/desktop/js/components/dropdown/DropdownMenu.scss
  42. 1 1
      desktop/core/src/desktop/js/components/dropdown/DropdownMenuOptions.vue
  43. 1 1
      desktop/core/src/desktop/js/components/dropdown/DropdownPanel.scss
  44. 5 7
      desktop/core/src/desktop/js/components/er-diagram/index.vue
  45. 1 1
      desktop/core/src/desktop/js/components/icons/HueIcons.vue
  46. 1 1
      desktop/core/src/desktop/js/components/sidebar/AccordionItem.vue
  47. 2 2
      desktop/core/src/desktop/js/components/sidebar/HelpDrawerContent.vue
  48. 1 1
      desktop/core/src/desktop/js/components/sidebar/NavigationItem.vue
  49. 5 7
      desktop/core/src/desktop/js/components/sidebar/Sidebar.vue
  50. 2 2
      desktop/core/src/desktop/js/components/sidebar/UserDrawerContent.vue
  51. 2 2
      desktop/core/src/desktop/js/components/utils/SubscriptionTracker.ts
  52. 2 1
      desktop/core/src/desktop/js/ko/bindings/ace/ko.aceEditor.js
  53. 12 11
      desktop/core/src/desktop/js/ko/bindings/charts/ko.leafletMapChart.js
  54. 3 2
      desktop/core/src/desktop/js/ko/bindings/charts/mapchart/datamap.js
  55. 2 1
      desktop/core/src/desktop/js/parse/sql/calcite/sqlParseSupport.js
  56. 2 1
      desktop/core/src/desktop/js/parse/sql/dasksql/sqlParseSupport.js
  57. 2 1
      desktop/core/src/desktop/js/parse/sql/druid/sqlParseSupport.js
  58. 2 1
      desktop/core/src/desktop/js/parse/sql/elasticsearch/sqlParseSupport.js
  59. 2 1
      desktop/core/src/desktop/js/parse/sql/flink/sqlParseSupport.js
  60. 2 1
      desktop/core/src/desktop/js/parse/sql/generic/sqlParseSupport.js
  61. 2 1
      desktop/core/src/desktop/js/parse/sql/hive/sqlParseSupport.js
  62. 2 1
      desktop/core/src/desktop/js/parse/sql/impala/sqlParseSupport.js
  63. 2 1
      desktop/core/src/desktop/js/parse/sql/ksql/sqlParseSupport.js
  64. 2 1
      desktop/core/src/desktop/js/parse/sql/phoenix/sqlParseSupport.js
  65. 2 1
      desktop/core/src/desktop/js/parse/sql/presto/sqlParseSupport.js
  66. 0 2
      desktop/core/src/desktop/js/parse/types.ts
  67. 18 36
      desktop/core/src/desktop/js/sql/reference/impala/setReference.ts
  68. 1 0
      desktop/core/src/desktop/js/utils/html/getFileBrowseButton.ts
  69. 2 1
      desktop/core/src/desktop/js/utils/multiLineEllipsisHandler.js
  70. 2 0
      desktop/core/src/desktop/js/utils/storageUtils.ts
  71. 2 0
      desktop/core/src/desktop/js/utils/timing/waitForObservable.ts
  72. 3 3
      desktop/core/src/desktop/js/vue/wrapper/index.ts
  73. 0 0
      desktop/core/src/desktop/static/desktop/css/hue.css
  74. 0 0
      desktop/core/src/desktop/static/desktop/css/hue3-extra.css
  75. 0 1
      desktop/core/src/desktop/static/desktop/less/login.less
  76. 4 4
      package.json

+ 3 - 2
.stylelintrc

@@ -4,10 +4,11 @@
     "stylelint-scss"
   ],
   "rules": {
+    "at-rule-no-unknown": null,
     "max-empty-lines": 4,
-    "number-leading-zero": null,
     "no-descending-specificity": null,
-    "at-rule-no-unknown": null,
+    "no-invalid-position-at-import-rule": null,
+    "number-leading-zero": null,
     "scss/at-rule-no-unknown": true,
     "selector-pseudo-element-no-unknown": [
       true,

+ 1 - 1
desktop/core/src/desktop/js/api/utils.ts

@@ -178,7 +178,7 @@ const getCancelToken = (): { cancelToken: CancelToken; cancel: () => void } => {
   return { cancelToken: cancelTokenSource.token, cancel: cancelTokenSource.cancel };
 };
 
-export const post = <T, U = unknown, E = string>(
+export const post = <T, U = unknown>(
   url: string,
   data?: U,
   options?: ApiFetchOptions<T>

+ 1 - 3
desktop/core/src/desktop/js/apps/editor/components/EditorResizer.vue

@@ -52,9 +52,7 @@
       };
     },
 
-    data(
-      thisComp
-    ): {
+    data(thisComp): {
       newHeight: number;
       startHeight: number;
       startY: number;

+ 1 - 1
desktop/core/src/desktop/js/apps/editor/components/EditorResizerKoBridge.vue

@@ -22,8 +22,8 @@
 
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
-
   import { Ace } from 'ext/ace';
+  import KnockoutObservable from '@types/knockout';
 
   import { wrap } from 'vue/webComponentWrap';
 

+ 1 - 1
desktop/core/src/desktop/js/apps/editor/components/ExecuableActions.scss

@@ -18,4 +18,4 @@
 
 .snippet-execute-actions {
   display: inline-block;
-}
+}

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/ExecutableActionsKoBridge.vue

@@ -28,6 +28,7 @@
 
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
+  import KnockoutObservable from '@types/knockout';
 
   import ExecutableActions from './ExecutableActions.vue';
   import SqlExecutable from 'apps/editor/execution/sqlExecutable';

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/ExecutableProgressBarKoBridge.vue

@@ -22,6 +22,7 @@
 
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
+  import KnockoutObservable from '@types/knockout';
 
   import ExecutableProgressBar from './ExecutableProgressBar.vue';
   import SqlExecutable from 'apps/editor/execution/sqlExecutable';

+ 0 - 1
desktop/core/src/desktop/js/apps/editor/components/QueryEditorWebComponents.d.ts

@@ -15,7 +15,6 @@
 // limitations under the License.
 
 import { ConnectorNamespaces, GetOptions } from 'catalog/contextCatalog';
-import { findEditorConnector } from 'config/hueConfig';
 import { EditorInterpreter, HueConfig } from 'config/types';
 import Executor, { ExecutorOptions } from 'apps/editor/execution/executor';
 import { DataCatalog } from 'catalog/dataCatalog';

+ 7 - 3
desktop/core/src/desktop/js/apps/editor/components/QueryHistoryTable.scss

@@ -21,6 +21,7 @@
 .query-history-table {
   @include display-flex;
   @include flex-direction(column);
+
   position: relative;
   width: 100%;
   height: 100%;
@@ -31,11 +32,12 @@
     padding: 10px 5px;
 
     .query-history-filter {
-      float:left;
+      float: left;
     }
 
     .query-history-actions {
-      float:right;
+      float: right;
+
       button {
         margin-left: 5px;
       }
@@ -44,6 +46,7 @@
 
   .query-history-table-container {
     @include flex(0 1 100%);
+
     position: relative;
     overflow: hidden;
 
@@ -51,7 +54,6 @@
       position: relative;
       width: 100%;
       height: 100%;
-
       overflow: auto;
     }
 
@@ -65,10 +67,12 @@
       td:nth-child(1) {
         width: 100px;
       }
+
       td:nth-child(2),
       td:nth-child(3) {
         width: 25px;
       }
+
       td:nth-child(4) {
         width: 100%;
       }

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/QueryHistoryTableKoBridge.vue

@@ -25,6 +25,7 @@
 
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
+  import KnockoutObservable from '@types/knockout';
 
   import QueryHistoryTable from './QueryHistoryTable.vue';
   import { wrap } from 'vue/webComponentWrap';

+ 2 - 1
desktop/core/src/desktop/js/apps/editor/components/aceEditor/AceEditor.vue

@@ -61,7 +61,8 @@
   import { getFromLocalStorage, setInLocalStorage } from 'utils/storageUtils';
 
   // Taken from https://www.cs.tut.fi/~jkorpela/chars/spaces.html
-  const UNICODES_TO_REMOVE = /[\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u202F\u205F\u3000\uFEFF]/gi;
+  const UNICODES_TO_REMOVE =
+    /[\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u202F\u205F\u3000\uFEFF]/gi;
 
   const INSERT_AT_CURSOR_EVENT = 'editor.insert.at.cursor';
   const CURSOR_POSITION_CHANGED_EVENT = 'editor.cursor.position.changed';

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/aceEditor/AceEditorKoBridge.vue

@@ -38,6 +38,7 @@
 
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
+  import KnockoutObservable from '@types/knockout';
 
   import { Ace } from 'ext/ace';
 

+ 3 - 3
desktop/core/src/desktop/js/apps/editor/components/aceEditor/AceLocationHandler.ts

@@ -16,6 +16,7 @@
 
 import { Ace } from 'ext/ace';
 import ace from 'ext/aceHelper';
+import KnockoutObservable from '@types/knockout';
 
 import { ActiveStatementChangedEventDetails } from './types';
 import Executor from 'apps/editor/execution/executor';
@@ -693,9 +694,8 @@ export default class AceLocationHandler implements Disposable {
       // Can happen if multiple statements and the cursor is after the last one
       if (!found) {
         precedingStatements.pop();
-        this.activeStatement = this.lastKnownStatements.statements[
-          this.lastKnownStatements.statements.length - 1
-        ];
+        this.activeStatement =
+          this.lastKnownStatements.statements[this.lastKnownStatements.statements.length - 1];
       }
     }
 

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/executionAnalysis/ExecutionAnalysisPanelKoBridge.vue

@@ -23,6 +23,7 @@
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
   import { wrap } from 'vue/webComponentWrap';
+  import KnockoutObservable from '@types/knockout';
 
   import ExecutionAnalysisPanel from './ExecutionAnalysisPanel.vue';
   import SqlExecutable from 'apps/editor/execution/sqlExecutable';

+ 2 - 3
desktop/core/src/desktop/js/apps/editor/components/presentationMode/PresentationModeKoBridge.vue

@@ -30,6 +30,7 @@
 
 <script lang="ts">
   import { defineComponent, PropType, reactive, ref, toRefs } from 'vue';
+  import KnockoutObservable from '@types/knockout';
 
   import { Variable } from 'apps/editor/components/variableSubstitution/types';
   import { IdentifierLocation } from 'parse/types';
@@ -97,9 +98,7 @@
         );
       },
       onClose(): void {
-        this.$el.dispatchEvent(
-          new CustomEvent<void>('close', { bubbles: true })
-        );
+        this.$el.dispatchEvent(new CustomEvent<void>('close', { bubbles: true }));
       },
       onVariablesChanged(variables: Variable[]): void {
         this.$el.dispatchEvent(

+ 1 - 1
desktop/core/src/desktop/js/apps/editor/components/result/ResultTable.scss

@@ -28,4 +28,4 @@
       overflow: hidden !important;
     }
   }
-}
+}

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/result/ResultTableKoBridge.vue

@@ -22,6 +22,7 @@
 
 <script lang="ts">
   import { defineComponent, PropType, ref, toRefs } from 'vue';
+  import KnockoutObservable from '@types/knockout';
 
   import { wrap } from 'vue/webComponentWrap';
 

+ 2 - 0
desktop/core/src/desktop/js/apps/editor/components/sqlScratchpad/SqlScratchpad.scss

@@ -28,6 +28,7 @@
     @include fillAbsolute;
     @include display-flex;
     @include flex-direction(column);
+
     overflow: hidden;
 
     .sql-scratchpad-editor {
@@ -49,6 +50,7 @@
 
     .sql-scratchpad-result {
       @include flex(0 1 50%);
+
       overflow: hidden;
 
       h1 {

+ 1 - 0
desktop/core/src/desktop/js/apps/editor/components/sqlScratchpad/SqlScratchpad.vue

@@ -51,6 +51,7 @@
 <script lang="ts">
   import { defineComponent, onMounted, PropType, ref, toRefs } from 'vue';
   import { Ace } from 'ext/ace';
+  import KnockoutObservable from '@types/knockout';
 
   import genericAutocompleteParser from 'parse/sql/generic/genericAutocompleteParser';
   import genericSyntaxParser from 'parse/sql/generic/genericSyntaxParser';

+ 1 - 1
desktop/core/src/desktop/js/apps/editor/components/variableSubstitution/VariableSubstitution.vue

@@ -126,7 +126,7 @@
       initialVariables: {
         type: Object as PropType<{ [name: string]: Variable }>,
         required: false,
-        default: {}
+        default: () => ({})
       },
       locations: {
         type: Object as PropType<IdentifierLocation[]>,

+ 2 - 0
desktop/core/src/desktop/js/apps/editor/execution/api.ts

@@ -14,6 +14,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+import KnockoutObservable from '@types/knockout';
+
 import {
   EXECUTABLE_RESULT_UPDATED_TOPIC,
   EXECUTABLE_TRANSITIONED_TOPIC,

+ 2 - 0
desktop/core/src/desktop/js/apps/editor/execution/executor.ts

@@ -14,6 +14,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+import KnockoutObservable from '@types/knockout';
+
 import Snippet from 'apps/editor/snippet';
 import Executable, { ExecutableRaw } from 'apps/editor/execution/executable';
 import { syncSqlExecutables } from 'apps/editor/execution/utils';

+ 18 - 16
desktop/core/src/desktop/js/apps/editor/execution/sessionManager.test.ts

@@ -134,22 +134,24 @@ describe('sessionManager.ts', () => {
     //     }
     // Close the session
 
-    const postSpy = jest.spyOn(ApiUtils, 'post').mockImplementation(
-      (
-        url: string,
-        data: unknown,
-        options?: { dataType?: string; silenceErrors?: boolean; ignoreSuccessErrors?: boolean }
-      ): CancellablePromise<unknown> => {
-        expect(JSON.parse((data as { session: string }).session).session_id).toEqual(
-          session.session_id
-        );
-        expect(options && options.silenceErrors).toBeTruthy();
-        expect(url).toContain('/close_session');
-        return new CancellablePromise(resolve => {
-          resolve();
-        });
-      }
-    );
+    const postSpy = jest
+      .spyOn(ApiUtils, 'post')
+      .mockImplementation(
+        (
+          url: string,
+          data: unknown,
+          options?: { dataType?: string; silenceErrors?: boolean; ignoreSuccessErrors?: boolean }
+        ): CancellablePromise<unknown> => {
+          expect(JSON.parse((data as { session: string }).session).session_id).toEqual(
+            session.session_id
+          );
+          expect(options && options.silenceErrors).toBeTruthy();
+          expect(url).toContain('/close_session');
+          return new CancellablePromise(resolve => {
+            resolve();
+          });
+        }
+      );
     await sessionManager.closeSession(session);
 
     expect(sessionManager.hasSession('impala')).toBeFalsy();

+ 28 - 30
desktop/core/src/desktop/js/apps/editor/execution/sqlExecutable.test.ts

@@ -99,38 +99,36 @@ describe('sqlExecutable.js', () => {
       statusResolve = resolve;
     });
 
-    jest.spyOn(ApiUtils, 'post').mockImplementation(
-      (url: string): CancellablePromise<unknown> => {
-        currentApiHit++;
-        if (url.indexOf('/create_session') !== -1) {
-          createSessionApiHit = currentApiHit;
-          return new CancellablePromise<unknown>(resolve => {
-            resolve({ session: { type: 'foo' } });
+    jest.spyOn(ApiUtils, 'post').mockImplementation((url: string): CancellablePromise<unknown> => {
+      currentApiHit++;
+      if (url.indexOf('/create_session') !== -1) {
+        createSessionApiHit = currentApiHit;
+        return new CancellablePromise<unknown>(resolve => {
+          resolve({ session: { type: 'foo' } });
+        });
+      } else if (url.indexOf('/execute') !== -1) {
+        executeApiHit = currentApiHit;
+        expect(url).toContain('/execute/impala');
+        return new CancellablePromise<unknown>(resolve => {
+          resolve({
+            handle: {},
+            history_id: 1,
+            history_uuid: 'some-history_uuid',
+            history_parent_uuid: 'some_history_parent_uuid'
           });
-        } else if (url.indexOf('/execute') !== -1) {
-          executeApiHit = currentApiHit;
-          expect(url).toContain('/execute/impala');
-          return new CancellablePromise<unknown>(resolve => {
-            resolve({
-              handle: {},
-              history_id: 1,
-              history_uuid: 'some-history_uuid',
-              history_parent_uuid: 'some_history_parent_uuid'
-            });
-          });
-        } else if (url.indexOf('/check_status') !== -1) {
-          checkStatusApiHit = currentApiHit;
-          statusResolve({ query_status: { status: ExecutionStatus.available } });
-          return statusPromise;
-        } else if (url.indexOf('/get_logs') !== -1) {
-          getLogsApiHit = currentApiHit;
-          logsResolve({ status: 0, logs: '' });
-          return logsPromise;
-        }
-        fail('fail for URL: ' + url);
-        throw new Error('Did not find URL: ' + url);
+        });
+      } else if (url.indexOf('/check_status') !== -1) {
+        checkStatusApiHit = currentApiHit;
+        statusResolve({ query_status: { status: ExecutionStatus.available } });
+        return statusPromise;
+      } else if (url.indexOf('/get_logs') !== -1) {
+        getLogsApiHit = currentApiHit;
+        logsResolve({ status: 0, logs: '' });
+        return logsPromise;
       }
-    );
+      fail('fail for URL: ' + url);
+      throw new Error('Did not find URL: ' + url);
+    });
 
     expect(subject.status).toEqual(ExecutionStatus.ready);
 

+ 7 - 4
desktop/core/src/desktop/js/apps/editor/execution/sqlExecutable.ts

@@ -22,12 +22,15 @@ import Executor from 'apps/editor/execution/executor';
 import { ParsedSqlStatement } from 'parse/sqlStatementsParser';
 import { VariableIndex } from '../components/variableSubstitution/types';
 
-const BATCHABLE_STATEMENT_TYPES = /ALTER|WITH|REFRESH|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i;
+const BATCHABLE_STATEMENT_TYPES =
+  /ALTER|WITH|REFRESH|CREATE|DELETE|DROP|GRANT|INSERT|INVALIDATE|LOAD|SET|TRUNCATE|UPDATE|UPSERT|USE/i;
 
 const SELECT_END_REGEX = /([^;]*)([;]?[^;]*)/;
 const ERROR_REGEX = /line ([0-9]+)(:([0-9]+))?/i;
-const TABLE_DDL_REGEX = /(?:CREATE|DROP)\s+(?:TABLE|VIEW)\s+(?:IF\s+(?:NOT\s+)?EXISTS\s+)?(?:`([^`]+)`|([^;\s]+))\..*/i;
-const DB_DDL_REGEX = /(?:CREATE|DROP)\s+(?:DATABASE|SCHEMA)\s+(?:IF\s+(?:NOT\s+)?EXISTS\s+)?(?:`([^`]+)`|([^;\s]+))/i;
+const TABLE_DDL_REGEX =
+  /(?:CREATE|DROP)\s+(?:TABLE|VIEW)\s+(?:IF\s+(?:NOT\s+)?EXISTS\s+)?(?:`([^`]+)`|([^;\s]+))\..*/i;
+const DB_DDL_REGEX =
+  /(?:CREATE|DROP)\s+(?:DATABASE|SCHEMA)\s+(?:IF\s+(?:NOT\s+)?EXISTS\s+)?(?:`([^`]+)`|([^;\s]+))/i;
 
 export interface SqlExecutableRaw extends ExecutableRaw {
   database: string;
@@ -169,7 +172,7 @@ export default class SqlExecutable extends Executable {
   }
 
   toJs(): SqlExecutableRaw {
-    const executableJs = (super.toJs() as unknown) as SqlExecutableRaw;
+    const executableJs = super.toJs() as unknown as SqlExecutableRaw;
     executableJs.database = this.database;
     executableJs.parsedStatement = this.parsedStatement;
     executableJs.type = 'sqlExecutable';

+ 2 - 1
desktop/core/src/desktop/js/apps/notebook/snippet.js

@@ -734,7 +734,8 @@ class Snippet {
       } else {
         const re = /(?:^|\W)\${(\w*)\=?([^{}]*)}/g;
         const reComment = /(^\s*--.*)|(\/\*[\s\S]*?\*\/)/gm;
-        const reList = /(?!\s*$)\s*(?:(?:([^,|()\\]*)\(\s*([^,|()\\]*)\)(?:\\[\S\s][^,|()\\]*)?)|([^,|\\]*(?:\\[\S\s][^,|\\]*)*))\s*(?:,|\||$)/g;
+        const reList =
+          /(?!\s*$)\s*(?:(?:([^,|()\\]*)\(\s*([^,|()\\]*)\)(?:\\[\S\s][^,|()\\]*)?)|([^,|\\]*(?:\\[\S\s][^,|\\]*)*))\s*(?:,|\||$)/g;
         const statement = self.statement_raw();
         let matchComment = reComment.exec(statement);
         // if re is n & reComment is m

+ 1 - 0
desktop/core/src/desktop/js/catalog/DataCatalogEntry.ts

@@ -15,6 +15,7 @@
 // limitations under the License.
 
 import * as ko from 'knockout';
+import KnockoutObservable from '@types/knockout';
 
 import { Cancellable, CancellablePromise } from 'api/cancellablePromise';
 import {

+ 1 - 3
desktop/core/src/desktop/js/components/ColumnSelectorPanel.vue

@@ -31,9 +31,7 @@
     </ul>
 
     <div class="column-selector-actions">
-      <hue-button type="button" @click="apply">
-        Apply
-      </hue-button>
+      <hue-button type="button" @click="apply"> Apply </hue-button>
     </div>
   </div>
 </template>

+ 1 - 1
desktop/core/src/desktop/js/components/ComboBox.vue

@@ -55,7 +55,7 @@
       },
       options: {
         type: Array as PropType<Option[]>,
-        default: []
+        default: () => []
       }
     },
     emits: ['update:model-value'],

+ 1 - 1
desktop/core/src/desktop/js/components/DateRangePicker.vue

@@ -26,7 +26,7 @@
       <div class="date-range-picker-panel">
         <div class="date-range-picker-body">
           <div class="date-range-picker-preset">
-            <div style="border-right: 1px solid gray;">
+            <div style="border-right: 1px solid gray">
               <header>Quick Ranges</header>
               <div class="preset-list">
                 <div v-for="(rangeSet, index) in RANGE_SETS" :key="index" class="preset-column">

+ 1 - 1
desktop/core/src/desktop/js/components/HueButton.scss

@@ -126,4 +126,4 @@
     background-color: $fluid-gray-200;
     border: solid 1px $fluid-gray-200;
   }
-}
+}

+ 0 - 4
desktop/core/src/desktop/js/components/HueLink.vue

@@ -25,10 +25,6 @@
 
   import onHueLinkClick from 'utils/html/onHueLinkClick';
 
-  interface hueWindow {
-    HUE_BASE_URL: string;
-  }
-
   export default defineComponent({
     name: 'HueLink',
     props: {

+ 2 - 1
desktop/core/src/desktop/js/components/HueTable.scss

@@ -31,6 +31,7 @@
 
     &.header-less {
       border-collapse: collapse;
+
       tbody > tr:first-child {
         border-top: 1px solid $fluid-gray-300;
       }
@@ -130,4 +131,4 @@
       }
     }
   }
-}
+}

+ 2 - 2
desktop/core/src/desktop/js/components/HueTable.vue

@@ -74,12 +74,12 @@
     name: 'HueTable',
     props: {
       rows: {
-        type: Object as PropType<Row[]>,
+        type: Array as PropType<Row[]>,
         required: false,
         default: () => []
       },
       columns: {
-        type: Object as PropType<Column<unknown>[]>,
+        type: Array as PropType<Column<unknown>[]>,
         required: false,
         default: () => []
       },

+ 0 - 1
desktop/core/src/desktop/js/components/Modal.scss

@@ -117,4 +117,3 @@
 
 
 
-

+ 0 - 1
desktop/core/src/desktop/js/components/SearchInput.scss

@@ -79,7 +79,6 @@
       margin: 0;
       line-height: 15px;
       background-color: transparent;
-
       width: 100%;
       height: 100%;
       box-sizing: border-box;

+ 6 - 1
desktop/core/src/desktop/js/components/Spinner.scss

@@ -16,10 +16,12 @@
  limitations under the License.
 */
 
+@use 'sass:math';
+
 @import './styles/mixins';
 @import './styles/colors';
 
-$spinner-label-ratio: 2 / 3;
+$spinner-label-ratio: math.div(2, 3);
 $spinner-large-size: 25px;
 $spinner-xlarge-size: 50px;
 
@@ -32,6 +34,7 @@ $spinner-xlarge-size: 50px;
 
   &.spinner {
     @include fillAbsolute;
+
     margin: auto 0;
     vertical-align: center;
   }
@@ -39,12 +42,14 @@ $spinner-xlarge-size: 50px;
   &.spinner-overlay {
     @include fillAbsolute;
     @include fade-in;
+
     z-index: 10000;
     background: rgba(255, 255, 255, 0.5);
   }
 
   &.spinner-inline {
     @include fade-in;
+
     display: inline-block;
     position: relative;
   }

+ 1 - 2
desktop/core/src/desktop/js/components/assist/AssistPanel.scss

@@ -24,6 +24,5 @@
 
   padding-top: 5px;
   padding-left: 5px;
-
   background-color: $fluid-gray-050;
-}
+}

+ 1 - 1
desktop/core/src/desktop/js/components/assist/SqlAssistPanel.scss

@@ -81,4 +81,4 @@
   ul:first-child ul li {
     padding-left: 20px;
   }
-}
+}

+ 1 - 1
desktop/core/src/desktop/js/components/dropdown/DropdownDrawer.scss

@@ -79,4 +79,4 @@
       }
     }
   }
-}
+}

+ 1 - 2
desktop/core/src/desktop/js/components/dropdown/DropdownMenu.scss

@@ -24,8 +24,7 @@
     max-width: 250px;
     min-height: 34px;
     max-height: 200px;
-
     overflow-x: hidden;
     overflow-y: auto;
   }
-}
+}

+ 1 - 1
desktop/core/src/desktop/js/components/dropdown/DropdownMenuOptions.vue

@@ -32,7 +32,7 @@
     props: {
       options: {
         type: Array as PropType<Option[]>,
-        default: []
+        default: () => []
       },
       keydownElement: {
         type: Object as PropType<HTMLElement>,

+ 1 - 1
desktop/core/src/desktop/js/components/dropdown/DropdownPanel.scss

@@ -18,4 +18,4 @@
 
 .hue-dropdown-panel {
   display: inline-block;
-}
+}

+ 5 - 7
desktop/core/src/desktop/js/components/er-diagram/index.vue

@@ -86,12 +86,12 @@
 
     props: {
       entities: {
-        type: Object as PropType<IEntity[]>,
-        default: []
+        type: Array as PropType<IEntity[]>,
+        default: () => []
       },
       relations: {
-        type: Object as PropType<IRelation[]>,
-        default: []
+        type: Array as PropType<IRelation[]>,
+        default: () => []
       }
     },
 
@@ -140,9 +140,7 @@
       },
       plotRelations(): void {
         const erdEl = this.$refs.erd as HTMLElement;
-        const relationPaths: NodeListOf<HTMLElement> = erdEl.querySelectorAll<HTMLElement>(
-          '.relation-path'
-        );
+        const relationPaths = erdEl.querySelectorAll<HTMLElement>('.relation-path');
         const offset: IPos | undefined = this.getSelectorPosition('.erd-relations');
 
         relationPaths.forEach(element => {

+ 1 - 1
desktop/core/src/desktop/js/components/icons/HueIcons.vue

@@ -19,7 +19,7 @@
 <template>
   <teleport v-if="!alreadyPresentInDom" to="body">
     <div id="hueIconSprites">
-      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="display: none;">
+      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="display: none">
         <defs>
           <symbol id="hueChevronLeftSymbol" viewBox="0 0 24 24">
             <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" />

+ 1 - 1
desktop/core/src/desktop/js/components/sidebar/AccordionItem.vue

@@ -51,7 +51,7 @@
 
       <span>{{ item.displayName }}</span>
 
-      <div style="flex-grow: 1;" />
+      <div style="flex-grow: 1" />
     </button>
 
     <div

+ 2 - 2
desktop/core/src/desktop/js/components/sidebar/HelpDrawerContent.vue

@@ -49,9 +49,9 @@
 
     props: {
       children: {
-        type: Object as PropType<SidebarAccordionSubItem[]>,
+        type: Array as PropType<SidebarAccordionSubItem[]>,
         required: false,
-        default: []
+        default: () => []
       }
     },
 

+ 1 - 1
desktop/core/src/desktop/js/components/sidebar/NavigationItem.vue

@@ -27,7 +27,7 @@
       <div v-if="item.iconHtml" class="sidebar-sidebar-item-icon" v-html="item.iconHtml" />
 
       <span>{{ item.displayName }}</span>
-      <div style="flex-grow: 1;" />
+      <div style="flex-grow: 1" />
 
       <BaseNavigationItemTooltip
         v-if="tooltip"

+ 5 - 7
desktop/core/src/desktop/js/components/sidebar/Sidebar.vue

@@ -140,8 +140,8 @@
         default: null
       },
       userDrawerChildren: {
-        type: Object as PropType<SidebarAccordionSubItem[]>,
-        default: []
+        type: Array as PropType<SidebarAccordionSubItem[]>,
+        default: () => []
       },
       useDrawerForHelp: {
         type: Boolean,
@@ -152,8 +152,8 @@
         default: null
       },
       helpDrawerChildren: {
-        type: Object as PropType<SidebarAccordionSubItem[]>,
-        default: []
+        type: Array as PropType<SidebarAccordionSubItem[]>,
+        default: () => []
       },
 
       activeItemName: {
@@ -173,9 +173,7 @@
 
     emits: ['toggle-collapsed', 'header-click'],
 
-    data(
-      props
-    ): {
+    data(props): {
       drawerTopicInternal: string | null;
     } {
       return {

+ 2 - 2
desktop/core/src/desktop/js/components/sidebar/UserDrawerContent.vue

@@ -62,9 +62,9 @@
         required: true
       },
       children: {
-        type: Object as PropType<SidebarAccordionSubItem[]>,
+        type: Array as PropType<SidebarAccordionSubItem[]>,
         required: false,
-        default: []
+        default: () => []
       }
     },
 

+ 2 - 2
desktop/core/src/desktop/js/components/utils/SubscriptionTracker.ts

@@ -14,10 +14,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import { onBeforeUnmount, watch } from 'vue';
+import { onBeforeUnmount, Ref, watch } from 'vue';
+import KnockoutObservable from '@types/knockout';
 
 import huePubSub from 'utils/huePubSub';
-import { Ref } from 'vue';
 
 export interface Disposable {
   dispose(): void;

+ 2 - 1
desktop/core/src/desktop/js/ko/bindings/ace/ko.aceEditor.js

@@ -283,7 +283,8 @@ registerBinding(NAME, {
 
     initAutocompleters();
 
-    const UNICODES_TO_REMOVE = /[\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u202F\u205F\u3000\uFEFF]/gi; //taken from https://www.cs.tut.fi/~jkorpela/chars/spaces.html
+    const UNICODES_TO_REMOVE =
+      /[\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u202F\u205F\u3000\uFEFF]/gi; //taken from https://www.cs.tut.fi/~jkorpela/chars/spaces.html
 
     const removeUnicodes = function (value) {
       return value.replace(UNICODES_TO_REMOVE, ' ');

+ 12 - 11
desktop/core/src/desktop/js/ko/bindings/charts/ko.leafletMapChart.js

@@ -164,19 +164,20 @@ ko.bindingHandlers.leafletMapChart = {
 
               let _onRegionChange = function () {};
 
-              $('#command' + $(element).parents('.card-widget').attr('id')).on('click', function (
-                e
-              ) {
-                $(this).toggleClass('btn-primary');
-                $(this).find('.fa-fw').toggleClass('fa-check-square');
-                if ($(this).hasClass('btn-primary')) {
-                  if (_options.onRegionChange != null) {
-                    _onRegionChange = _options.onRegionChange;
+              $('#command' + $(element).parents('.card-widget').attr('id')).on(
+                'click',
+                function (e) {
+                  $(this).toggleClass('btn-primary');
+                  $(this).find('.fa-fw').toggleClass('fa-check-square');
+                  if ($(this).hasClass('btn-primary')) {
+                    if (_options.onRegionChange != null) {
+                      _onRegionChange = _options.onRegionChange;
+                    }
+                  } else {
+                    _onRegionChange = function () {};
                   }
-                } else {
-                  _onRegionChange = function () {};
                 }
-              });
+              );
 
               ko.utils.domNodeDisposal.addDisposeCallback(element, () => {
                 $('#command' + $(element).parents('.card-widget').attr('id')).off('click');

+ 3 - 2
desktop/core/src/desktop/js/ko/bindings/charts/mapchart/datamap.js

@@ -745,8 +745,9 @@ Datamap.prototype.updatePopup = function (element, d, options) {
         return options.popupTemplate(d, data);
       })
       .style('left', position[0] + 'px');
-    const popupHeight = d3.select(self.svg[0][0].parentNode).select('.datamaps-hoverover')[0][0]
-      .offsetHeight;
+    const popupHeight = d3
+      .select(self.svg[0][0].parentNode)
+      .select('.datamaps-hoverover')[0][0].offsetHeight;
     if (position[1] + 30 + popupHeight > svgHeight) {
       d3.select(self.svg[0][0].parentNode)
         .select('.datamaps-hoverover')

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/calcite/sqlParseSupport.js

@@ -257,7 +257,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/dasksql/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/druid/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/elasticsearch/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/flink/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/generic/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/hive/sqlParseSupport.js

@@ -287,7 +287,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/impala/sqlParseSupport.js

@@ -314,7 +314,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/ksql/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/phoenix/sqlParseSupport.js

@@ -251,7 +251,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 2 - 1
desktop/core/src/desktop/js/parse/sql/presto/sqlParseSupport.js

@@ -258,7 +258,8 @@ const initSqlParser = function (parser) {
   parser.suggestJoinConditions = function (details) {
     parser.yy.result.suggestJoinConditions = details || {};
     if (parser.yy.latestTablePrimaries && !parser.yy.result.suggestJoinConditions.tablePrimaries) {
-      parser.yy.result.suggestJoinConditions.tablePrimaries = parser.yy.latestTablePrimaries.concat();
+      parser.yy.result.suggestJoinConditions.tablePrimaries =
+        parser.yy.latestTablePrimaries.concat();
     }
   };
 

+ 0 - 2
desktop/core/src/desktop/js/parse/types.ts

@@ -204,5 +204,3 @@ export interface SqlParserProvider {
   getAutocompleteParser(dialect: string): Promise<AutocompleteParser>;
   getSyntaxParser(dialect: string): Promise<SyntaxParser>;
 }
-
-declare const sqlStatementsParser: SqlStatementsParser;

+ 18 - 36
desktop/core/src/desktop/js/sql/reference/impala/setReference.ts

@@ -20,15 +20,13 @@ export const SET_OPTIONS: SetOptions = {
   ALLOW_ERASURE_CODED_FILES: {
     description:
       'Use the ALLOW_ERASURE_CODED_FILES query option to enable or disable the support of erasure coded files in Impala. Until Impala is fully tested and certified with erasure coded files, this query option is set to FALSE by default.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   APPX_COUNT_DISTINCT: {
     description:
       'Allows multiple COUNT(DISTINCT) operations within a single query, by internally rewriting each COUNT(DISTINCT) to use the NDV() function. The resulting count is approximate rather than precise.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   BATCH_SIZE: {
@@ -59,8 +57,7 @@ export const SET_OPTIONS: SetOptions = {
   DEFAULT_JOIN_DISTRIBUTION_MODE: {
     description:
       'This option determines the join distribution that Impala uses when any of the tables involved in a join query is missing statistics.\n\nThe setting DEFAULT_JOIN_DISTRIBUTION_MODE=SHUFFLE is recommended when setting up and deploying new clusters, because it is less likely to result in serious consequences such as spilling or out-of-memory errors if the query plan is based on incomplete information.',
-    type:
-      'Integer; The allowed values are BROADCAST (equivalent to 0) or SHUFFLE (equivalent to 1).',
+    type: 'Integer; The allowed values are BROADCAST (equivalent to 0) or SHUFFLE (equivalent to 1).',
     default: '0'
   },
   DEFAULT_SPILLABLE_BUFFER_SIZE: {
@@ -72,29 +69,25 @@ export const SET_OPTIONS: SetOptions = {
   DISABLE_CODEGEN: {
     description:
       'This is a debug option, intended for diagnosing and working around issues that cause crashes. If a query fails with an "illegal instruction" or other hardware-specific message, try setting DISABLE_CODEGEN=true and running the query again. If the query succeeds only when the DISABLE_CODEGEN option is turned on, submit the problem to Cloudera Support and include that detail in the problem report. Do not otherwise run with this setting turned on, because it results in lower overall performance.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   DISABLE_ROW_RUNTIME_FILTERING: {
     description:
       'The DISABLE_ROW_RUNTIME_FILTERING query option reduces the scope of the runtime filtering feature. Queries still dynamically prune partitions, but do not apply the filtering logic to individual rows within partitions.\n\nOnly applies to queries against Parquet tables. For other file formats, Impala only prunes at the level of partitions, not individual rows.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   DISABLE_STREAMING_PREAGGREGATIONS: {
     description:
       'Turns off the "streaming preaggregation" optimization that is available in CDH 5.7 / Impala 2.5 and higher. This optimization reduces unnecessary work performed by queries that perform aggregation operations on columns with few or no duplicate values, for example DISTINCT id_column or GROUP BY unique_column. If the optimization causes regressions in existing queries that use aggregation functions, you can turn it off as needed by setting this query option.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   DISABLE_UNSAFE_SPILLS: {
     description:
       'Enable this option if you prefer to have queries fail when they exceed the Impala memory limit, rather than write temporary data to disk.\n\nQueries that "spill" to disk typically complete successfully, when in earlier Impala releases they would have failed. However, queries with exorbitant memory requirements due to missing statistics or inefficient join clauses could become so slow as a result that you would rather have them cancelled automatically and reduce the memory usage through standard Impala tuning techniques.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   EXEC_SINGLE_NODE_ROWS_THRESHOLD: {
@@ -118,15 +111,13 @@ export const SET_OPTIONS: SetOptions = {
   HBASE_CACHE_BLOCKS: {
     description:
       'Setting this option is equivalent to calling the setCacheBlocks method of the class org.apache.hadoop.hbase.client.Scan, in an HBase Java application. Helps to control the memory pressure on the HBase RegionServer, in conjunction with the HBASE_CACHING query option.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   HBASE_CACHING: {
     description:
       'Setting this option is equivalent to calling the setCaching method of the class org.apache.hadoop.hbase.client.Scan, in an HBase Java application. Helps to control the memory pressure on the HBase RegionServer, in conjunction with the HBASE_CACHE_BLOCKS query option.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   MAX_ERRORS: {
@@ -179,8 +170,7 @@ export const SET_OPTIONS: SetOptions = {
   },
   NUM_NODES: {
     description: 'Limit the number of nodes that process a query, typically during debugging.',
-    type:
-      'Numeric; Only accepts the values 0 (meaning all nodes) or 1 (meaning all work is done on the coordinator node).',
+    type: 'Numeric; Only accepts the values 0 (meaning all nodes) or 1 (meaning all work is done on the coordinator node).',
     default: '0'
   },
   NUM_SCANNER_THREADS: {
@@ -192,15 +182,13 @@ export const SET_OPTIONS: SetOptions = {
   OPTIMIZE_PARTITION_KEY_SCANS: {
     description:
       'Enables a fast code path for queries that apply simple aggregate functions to partition key columns: MIN(key_column), MAX(key_column), or COUNT(DISTINCT key_column).',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   PARQUET_ANNOTATE_STRINGS_UTF8: {
     description:
       'Causes Impala INSERT and CREATE TABLE AS SELECT statements to write Parquet files that use the UTF-8 annotation for STRING columns.\n\nBy default, Impala represents a STRING column in Parquet as an unannotated binary field.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   PARQUET_FALLBACK_SCHEMA_RESOLUTION: {
@@ -239,8 +227,7 @@ export const SET_OPTIONS: SetOptions = {
   REPLICA_PREFERENCE: {
     description:
       'The REPLICA_PREFERENCE query option lets you distribute the work more evenly if hotspots and bottlenecks persist. It causes the access cost of all replicas of a data block to be considered equal to or worse than the configured value. This allows Impala to schedule reads to suboptimal replicas (e.g. local in the presence of cached ones) in order to distribute the work across more executor nodes.',
-    type:
-      'Numeric (0, 2, 4) or corresponding mnemonic strings (CACHE_LOCAL, DISK_LOCAL, REMOTE). The gaps in the numeric sequence are to accomodate other intermediate values that might be added in the future.',
+    type: 'Numeric (0, 2, 4) or corresponding mnemonic strings (CACHE_LOCAL, DISK_LOCAL, REMOTE). The gaps in the numeric sequence are to accomodate other intermediate values that might be added in the future.',
     default: '0 (equivalent to CACHE_LOCAL)'
   },
   RUNTIME_BLOOM_FILTER_SIZE: {
@@ -276,15 +263,13 @@ export const SET_OPTIONS: SetOptions = {
   S3_SKIP_INSERT_STAGING: {
     description:
       'Speeds up INSERT operations on tables or partitions residing on the Amazon S3 filesystem. The tradeoff is the possibility of inconsistent data left behind if an error occurs partway through the operation.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'true (shown as 1 in output of SET statement)'
   },
   SCHEDULE_RANDOM_REPLICA: {
     description:
       'The SCHEDULE_RANDOM_REPLICA query option fine-tunes the algorithm for deciding which host processes each HDFS data block. It only applies to tables and partitions that are not enabled for the HDFS caching feature.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   SCRATCH_LIMIT: {
@@ -296,22 +281,19 @@ export const SET_OPTIONS: SetOptions = {
   SHUFFLE_DISTINCT_EXPRS: {
     description:
       'The SHUFFLE_DISTINCT_EXPRS query option controls the shuffling behavior when a query has both grouping and distinct expressions. Impala can optionally include the distinct expressions in the hash exchange to spread the data among more nodes. However, this plan requires one more hash exchange phase. It is recommended that you turn off this option if the NDVs of the grouping expressions are high.',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   SYNC_DDL: {
     description:
       'When enabled, causes any DDL operation such as CREATE TABLE or ALTER TABLE to return only when the changes have been propagated to all other Impala nodes in the cluster by the Impala catalog service. That way, if you issue a subsequent CONNECT statement in impala-shell to connect to a different node in the cluster, you can be sure that other node will already recognize any added or changed tables. (The catalog service automatically broadcasts the DDL changes to all nodes automatically, but without this option there could be a period of inconsistency if you quickly switched to another node, such as by issuing a subsequent query through a load-balancing proxy.)',
-    type:
-      'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
+    type: 'Boolean; recognized values are 1 and 0, or true and false; any other value interpreted as false',
     default: 'false (shown as 0 in output of SET statement)'
   },
   TIMEZONE: {
     description:
       'The TIMEZONE query option defines the timezone used for conversions between UTC and the local time. If not set, Impala uses the system time zone where the Coordinator Impalad runs. As query options are not sent to the Coordinator immediately, the timezones are validated only when the query runs.',
-    type:
-      'String, can be a canonical code or a time zone name defined in the IANA Time Zone Database. The value is case-sensitive.',
+    type: 'String, can be a canonical code or a time zone name defined in the IANA Time Zone Database. The value is case-sensitive.',
     default: 'Coordinator Impalad system time zone.'
   },
   TOPN_BYTES_LIMIT: {

+ 1 - 0
desktop/core/src/desktop/js/utils/html/getFileBrowseButton.ts

@@ -15,6 +15,7 @@
 // limitations under the License.
 
 import $ from 'jquery';
+import KnockoutObservable from '@types/knockout';
 
 type ComplexValueAccessor = () => {
   value?: KnockoutObservable<string>;

+ 2 - 1
desktop/core/src/desktop/js/utils/multiLineEllipsisHandler.js

@@ -45,7 +45,8 @@ class MultiLineEllipsisHandler {
     this.contents = options.text;
     this.element.innerHTML = deXSS(this.contents);
 
-    const linkRegex = /(?:(?:[a-z]+:\/\/)|www\.)[^\s\/]+(?:[.\/]\S+)*[^\s`!()\[\]{};:'".,<>?«»“”‘’]/gi;
+    const linkRegex =
+      /(?:(?:[a-z]+:\/\/)|www\.)[^\s\/]+(?:[.\/]\S+)*[^\s`!()\[\]{};:'".,<>?«»“”‘’]/gi;
 
     this.renderContents = contents => {
       if (options.linkify) {

+ 2 - 0
desktop/core/src/desktop/js/utils/storageUtils.ts

@@ -14,6 +14,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+import KnockoutObservable from '@types/knockout';
+
 import { hueWindow } from 'types/types';
 
 type LocalStorageGet = {

+ 2 - 0
desktop/core/src/desktop/js/utils/timing/waitForObservable.ts

@@ -14,6 +14,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+import KnockoutObservable from '@types/knockout';
+
 const waitForObservable = (
   observable: KnockoutObservable<unknown>,
   callback: (observable: KnockoutObservable<unknown>) => void

+ 3 - 3
desktop/core/src/desktop/js/vue/wrapper/index.ts

@@ -145,9 +145,9 @@ export default function wrap(
       });
     }
 
-    createEventProxies(
-      eventNames: string[] | undefined
-    ): { [name: string]: (...args: unknown[]) => void } {
+    createEventProxies(eventNames: string[] | undefined): {
+      [name: string]: (...args: unknown[]) => void;
+    } {
       const eventProxies: { [name: string]: (...args: unknown[]) => void } = {};
 
       if (eventNames) {

File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 0 - 1
desktop/core/src/desktop/static/desktop/less/login.less

@@ -38,7 +38,6 @@
   background: @cui-white;
   border: 1px solid @cui-default-border-color;
   border-radius: 4px;
-
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='248' height='196' viewBox='0 0 248 196'%3E%3Cdefs%3E%3Cpath id='6zd0wr4qxa' d='M0 0H248V196H0z'/%3E%3C/defs%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg%3E%3Cg%3E%3Cg transform='translate(-125 -842) translate(125 270) translate(0 572)'%3E%3Cmask id='4w2gcddqub' fill='%23fff'%3E%3Cuse xlink:href='%236zd0wr4qxa'/%3E%3C/mask%3E%3Cuse fill='%23132329' xlink:href='%236zd0wr4qxa'/%3E%3Cg mask='url(%234w2gcddqub)' opacity='.503'%3E%3Cg%3E%3Cpath fill='%2319323C' d='M117.744 164.685L0 282.43 42.867 282.43 160.612 164.685z' transform='translate(53 -87)'/%3E%3Cpath fill='%23224452' d='M282.73 0L117.913 164.685 160.612 164.685 42.868 282.429 349.591 282.459 349.591 0.002z' transform='translate(53 -87)'/%3E%3Cg%3E%3Cpath fill='%23224452' d='M148.278 0L146.067 0 28.322 117.745 30.533 117.745zM141.346 0L23.602 117.745 25.813 117.745 143.558 0zM35.253 117.745L152.998 0 150.786 0 33.041 117.745zM39.973 117.745L157.718 0 155.507 0 37.762 117.745zM136.626 0L18.881 117.745 21.092 117.745 138.838 0zM122.466 0L4.721 117.745 6.933 117.745 124.677 0zM117.746 0L0 117.745 2.212 117.745 119.956 0zM127.187 0L9.441 117.745 11.653 117.745 129.398 0zM131.907 0L14.161 117.745 16.372 117.745 134.118 0z' transform='translate(53 -87) translate(13.957 108.673)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A");
   background-position: right bottom;
   background-repeat: no-repeat;

+ 4 - 4
package.json

@@ -145,10 +145,10 @@
     "webpack-workers": "webpack --config webpack.config.workers.js",
     "webpack-npm": "webpack --config webpack.config.npm.js",
     "publish-gethue": "make sql-all-parsers && npm run webpack-npm && cd npm_dist && npm publish",
-    "dev": "webpack --watch --config webpack.config.js -d",
-    "dev-login": "webpack --config webpack.config.login.js --watch -d",
-    "dev-workers": "webpack --config webpack.config.workers.js --watch -d",
-    "dev-webpack-npm": "webpack --config webpack.config.npm.js --watch -d",
+    "dev": "webpack --watch --config webpack.config.js -d eval",
+    "dev-login": "webpack --config webpack.config.login.js --watch -d eval",
+    "dev-workers": "webpack --config webpack.config.workers.js --watch -d eval",
+    "dev-webpack-npm": "webpack --config webpack.config.npm.js --watch -d eval",
     "less": "./node_modules/.bin/grunt less",
     "less-dev": "./node_modules/.bin/grunt watch",
     "style-lint": "stylelint \"desktop/core/src/desktop/static/desktop/less/**/*.less\" \"desktop/core/src/desktop/js/**/*.scss\"",

Some files were not shown because too many files changed in this diff