- Welcome to Zeppelin! -
+Welcome to Zeppelin!
Zeppelin is web-based notebook that enables interactive data analytics.You can make beautiful data-driven, interactive, collaborative document with SQL, code and even more! @@ -34,7 +32,7 @@
Help
Get started with
diff --git a/zeppelin-web-angular/src/app/pages/workspace/interpreter/create-repository-modal/create-repository-modal.component.html b/zeppelin-web-angular/src/app/pages/workspace/interpreter/create-repository-modal/create-repository-modal.component.html
index fb0b72e69b9..072be772b21 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/interpreter/create-repository-modal/create-repository-modal.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/interpreter/create-repository-modal/create-repository-modal.component.html
@@ -11,21 +11,17 @@
-->
nzType="error"
nzCloseable
nzShowIcon
- [nzMessage]="interpreter?.errorReason"
+ [nzMessage]="interpreter?.errorReason || null"
>
@@ -270,7 +270,7 @@ Option
nzMode="tags"
class="owners-input"
[nzTokenSeparators]="[',']"
- style="width: 100%;"
+ style="width: 100%"
formControlName="owners"
nzPlaceHolder=""
nzAllowClear
@@ -448,11 +448,7 @@ Dependencies
diff --git a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
index ad52ba6a045..4bd5c533bfe 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts
@@ -85,13 +85,13 @@ export class InterpreterItemComponent extends DestroyHookComponent implements On
this.addProperties();
this.addDependence();
const formData = this.formGroup.getRawValue();
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const properties: Record = {};
formData.properties
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
.sort((e: any) => e.key)
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
.forEach((e: any) => {
const { key, value, type } = e;
properties[key] = {
@@ -101,7 +101,7 @@ export class InterpreterItemComponent extends DestroyHookComponent implements On
};
});
formData.properties = properties;
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
formData.dependencies.forEach((e: any) => {
e.exclusions = e.exclusions.split(',').filter((s: string) => s !== '');
});
@@ -335,7 +335,7 @@ export class InterpreterItemComponent extends DestroyHookComponent implements On
Object.entries(this.interpreter.properties).forEach(([key, item]) => {
this.propertiesFormArray!.push(
this.formBuilder.group({
- key: key,
+ key,
value: item.value,
description: null,
type: item.type
diff --git a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.html b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.html
index 0419cb13c07..c4cdb694aa7 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.html
@@ -70,8 +70,8 @@
*ngFor="let item of filteredJobs"
[note]="item"
[highlight]="filterString"
- (start)="onStart($event)"
- (stop)="onStop($event)"
+ (startJob)="onStartJob($event)"
+ (stopJob)="onStopJob($event)"
>
diff --git a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.ts b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.ts
index feb1991166a..78a3fdbdbff 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job-manager.component.ts
@@ -95,7 +95,7 @@ export class JobManagerComponent extends MessageListenersManager implements OnDe
this.cdr.markForCheck();
}
- onStart(noteId: string): void {
+ onStartJob(noteId: string): void {
this.nzModalService.confirm({
nzTitle: 'Job Dialog',
nzContent: 'Run all paragraphs?',
@@ -105,7 +105,7 @@ export class JobManagerComponent extends MessageListenersManager implements OnDe
});
}
- onStop(noteId: string): void {
+ onStopJob(noteId: string): void {
this.nzModalService.confirm({
nzTitle: 'Job Dialog',
nzContent: 'Stop all paragraphs?',
diff --git a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.html b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.html
index 284b2cc7256..5a6ce7022ef 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.html
@@ -15,7 +15,7 @@
-
@@ -41,7 +41,7 @@
*ngFor="let item of note.paragraphs"
[nz-tooltip]="item.name + ' is ' + item.status"
nzTooltipPlacement="topLeft"
- [nzOverlayStyle]="{ 'margin-left': '-14px' }"
+ [nzTooltipOverlayStyle]="{ 'margin-left': '-14px' }"
[routerLink]="['/', 'notebook', note.noteId]"
[queryParams]="{ paragraph: item.id }"
>
diff --git a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.ts b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.ts
index 62ffeb13c84..908976805c6 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/job-manager/job/job.component.ts
@@ -21,7 +21,7 @@ import {
SimpleChanges
} from '@angular/core';
-import formatDistance from 'date-fns/formatDistance';
+import { formatDistance } from 'date-fns';
import { JobsItem, JobStatus } from '@zeppelin/sdk';
@@ -34,8 +34,8 @@ import { JobsItem, JobStatus } from '@zeppelin/sdk';
export class JobManagerJobComponent implements OnInit, OnChanges {
@Input() note!: JobsItem;
@Input() highlight = '';
- @Output() readonly start = new EventEmitter();
- @Output() readonly stop = new EventEmitter();
+ @Output() readonly startJob = new EventEmitter();
+ @Output() readonly stopJob = new EventEmitter();
icon = 'file';
relativeTime = '';
@@ -64,11 +64,11 @@ export class JobManagerJobComponent implements OnInit, OnChanges {
}
onStartClick(): void {
- this.start.emit(this.note.noteId);
+ this.startJob.emit(this.note.noteId);
}
onStopClick(): void {
- this.stop.emit(this.note.noteId);
+ this.stopJob.emit(this.note.noteId);
}
constructor() {}
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.ts
index 227dea92d8c..5dc628190d8 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.ts
@@ -35,7 +35,10 @@ export class NotebookRepoItemComponent implements OnChanges {
settingFormArray: FormArray;
editMode = false;
- constructor(private cdr: ChangeDetectorRef, private fb: FormBuilder) {
+ constructor(
+ private cdr: ChangeDetectorRef,
+ private fb: FormBuilder
+ ) {
// Initialize an empty form array to avoid undefined type error in the template
this.settingFormArray = this.fb.array([]);
}
@@ -67,9 +70,7 @@ export class NotebookRepoItemComponent implements OnChanges {
}
buildForm() {
- const controls = this.repo.settings.map(setting => {
- return this.fb.control(setting.selected, [Validators.required]);
- });
+ const controls = this.repo.settings.map(setting => this.fb.control(setting.selected, [Validators.required]));
this.settingFormArray = this.fb.array(controls);
}
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/notebook-repos.component.html b/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/notebook-repos.component.html
index 1a5dfe75137..833b68433b7 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/notebook-repos.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/notebook-repos.component.html
@@ -10,9 +10,7 @@
~ limitations under the License.
-->
-
- Manage your Notebook Repositories' settings.
-
+Manage your Notebook Repositories' settings.
{{ getCronOptionNameFromValue }}
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.ts
index 3322fe0a5ac..839aa2d3ee9 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.ts
@@ -135,15 +135,13 @@ export class NotebookActionBarComponent extends MessageListenersManager implemen
runAllParagraphs() {
this.messageService.runAllParagraphs(
this.note.id,
- this.note.paragraphs.map(p => {
- return {
- id: p.id,
- title: p.title,
- paragraph: p.text,
- config: p.config,
- params: p.settings.params
- };
- })
+ this.note.paragraphs.map(p => ({
+ id: p.id,
+ title: p.title,
+ paragraph: p.text,
+ config: p.config,
+ params: p.settings.params
+ }))
);
}
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts
index a905d266177..791c2e0c0ad 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.component.ts
@@ -105,7 +105,7 @@ export class NotebookComponent extends MessageListenersManager implements OnInit
}
});
}
- this.titleService.setTitle(this.note?.name + ' - Zeppelin');
+ this.titleService.setTitle(`${this.note?.name} - Zeppelin`);
this.themeService.updateMonacoTheme();
this.cdr.markForCheck();
}
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.module.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.module.ts
index a50e07ff2da..78581aef7ee 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.module.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/notebook.module.ts
@@ -17,6 +17,7 @@ import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NzButtonModule } from 'ng-zorro-antd/button';
+import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
import { NzCodeEditorModule } from 'ng-zorro-antd/code-editor';
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
import { NzDividerModule } from 'ng-zorro-antd/divider';
@@ -36,6 +37,7 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
import { ShareModule } from '@zeppelin/share';
+import { WorkspaceShareModule } from '../share/share.module';
import { NotebookAddParagraphComponent } from './add-paragraph/add-paragraph.component';
import { NotebookInterpreterBindingComponent } from './interpreter-binding/interpreter-binding.component';
import { NotebookParagraphCodeEditorComponent } from './paragraph/code-editor/code-editor.component';
@@ -46,8 +48,6 @@ import { NotebookParagraphProgressComponent } from './paragraph/progress/progres
import { NotebookPermissionsComponent } from './permissions/permissions.component';
import { NotebookRevisionsComparatorComponent } from './revisions-comparator/revisions-comparator.component';
-import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
-import { WorkspaceShareModule } from '../share/share.module';
import { NotebookActionBarComponent } from './action-bar/action-bar.component';
import { NoteFormBlockComponent } from './note-form-block/note-form-block.component';
import { NotebookRoutingModule } from './notebook-routing.module';
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts
index 7562e72d907..27d39a13470 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/code-editor/code-editor.component.ts
@@ -43,7 +43,8 @@ type DecorationIdentifier = ReturnType
{{ pid }}
-
+
Run on selection change
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/footer/footer.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/footer/footer.component.ts
index b5a7cc3bee7..c6298004b9c 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/footer/footer.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/footer/footer.component.ts
@@ -12,9 +12,7 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
-import format from 'date-fns/format';
-import formatDistanceStrict from 'date-fns/formatDistanceStrict';
-import formatDistanceToNow from 'date-fns/formatDistanceToNow';
+import { format, formatDistanceStrict, formatDistanceToNow } from 'date-fns';
@Component({
selector: 'zeppelin-notebook-paragraph-footer',
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.html b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.html
index 91015e8a17e..31249c94c4c 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/paragraph/paragraph.component.html
@@ -92,7 +92,7 @@
>
;
+ @ViewChildren(NotebookParagraphResultComponent)
+ notebookParagraphResultComponents!: QueryList;
@Input() paragraph!: ParagraphItem;
@Input() note!: Exclude;
@Input() looknfeel!: string;
@@ -155,6 +155,7 @@ export class NotebookParagraphComponent extends ParagraphBase
this.saveNoteTimer.emit();
}
+ @HostListener('focusin')
onFocus() {
this.selected.emit(this.paragraph.id);
}
@@ -231,15 +232,13 @@ export class NotebookParagraphComponent extends ParagraphBase
const index = this.note.paragraphs.findIndex(p => p.id === this.paragraph.id);
const toRunParagraphs = this.note.paragraphs.filter((p, i) => i < index);
- const paragraphs = toRunParagraphs.map(p => {
- return {
- id: p.id,
- title: p.title,
- paragraph: p.text,
- config: p.config,
- params: p.settings.params
- };
- });
+ const paragraphs = toRunParagraphs.map(p => ({
+ id: p.id,
+ title: p.title,
+ paragraph: p.text,
+ config: p.config,
+ params: p.settings.params
+ }));
this.nzModalService
.confirm({
nzTitle: 'Run all above?',
@@ -272,15 +271,13 @@ export class NotebookParagraphComponent extends ParagraphBase
const index = this.note.paragraphs.findIndex(p => p.id === this.paragraph.id);
const toRunParagraphs = this.note.paragraphs.filter((p, i) => i >= index);
- const paragraphs = toRunParagraphs.map(p => {
- return {
- id: p.id,
- title: p.title,
- paragraph: p.text,
- config: p.config,
- params: p.settings.params
- };
- });
+ const paragraphs = toRunParagraphs.map(p => ({
+ id: p.id,
+ title: p.title,
+ paragraph: p.text,
+ config: p.config,
+ params: p.settings.params
+ }));
this.nzModalService
.confirm({
nzTitle: 'Run current and all below?',
@@ -582,7 +579,7 @@ export class NotebookParagraphComponent extends ParagraphBase
this.originalText = this.paragraph.text;
this.isEntireNoteRunning = this.noteStatusService.isEntireNoteRunning(this.note);
this.isParagraphRunning = this.noteStatusService.isParagraphRunning(this.paragraph);
- this.noteVarShareService.set(this.paragraph.id + '_paragraphScope', this);
+ this.noteVarShareService.set(`${this.paragraph.id}_paragraphScope`, this);
this.initializeDefault(this.paragraph.config, this.paragraph.settings);
this.angularContextManager
.runParagraphAction()
diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/permissions/permissions.component.ts b/zeppelin-web-angular/src/app/pages/workspace/notebook/permissions/permissions.component.ts
index 1ffc49d15a4..3160b749ab1 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/notebook/permissions/permissions.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/permissions/permissions.component.ts
@@ -52,7 +52,9 @@ export class NotebookPermissionsComponent implements OnInit, OnChanges {
if (this.isOwnerEmpty()) {
this.nzModalService.create({
nzTitle: 'Setting Owners Permissions',
- nzContent: `Please fill the [Owners] field. If not, it will set as current user. Current user : [ ${this.ticketService.ticket.principal.trim()} ]`,
+ nzContent:
+ 'Please fill the [Owners] field. If not, it will set as current user. ' +
+ `Current user : [ ${this.ticketService.ticket.principal.trim()} ]`,
nzOnOk: () => {
this.permissions.owners = [this.ticketService.ticket.principal];
this.setPermissions();
diff --git a/zeppelin-web-angular/src/app/pages/workspace/published/paragraph/paragraph.component.html b/zeppelin-web-angular/src/app/pages/workspace/published/paragraph/paragraph.component.html
index 03f88549ced..7e126e70280 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/published/paragraph/paragraph.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/published/paragraph/paragraph.component.html
@@ -11,7 +11,7 @@
-->
;
- @ViewChildren(NotebookParagraphResultComponent) notebookParagraphResultComponents!: QueryList<
- NotebookParagraphResultComponent
- >;
+ @ViewChildren(NotebookParagraphResultComponent)
+ notebookParagraphResultComponents!: QueryList;
constructor(
public messageService: MessageService,
diff --git a/zeppelin-web-angular/src/app/pages/workspace/share/dynamic-forms/dynamic-forms.component.html b/zeppelin-web-angular/src/app/pages/workspace/share/dynamic-forms/dynamic-forms.component.html
index 679f2f2eb61..35677090bf1 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/share/dynamic-forms/dynamic-forms.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/share/dynamic-forms/dynamic-forms.component.html
@@ -21,7 +21,7 @@
nzMd="12"
nzSm="24"
>
-
+
diff --git a/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.html b/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.html
index 1bf9dc85a86..59238327337 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.html
+++ b/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.html
@@ -86,8 +86,8 @@
diff --git a/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts b/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
index 4d182dde4b0..71f9d6ea668 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/share/result/result.component.ts
@@ -26,7 +26,7 @@ import {
ViewContainerRef
} from '@angular/core';
import { DomSanitizer, SafeHtml, SafeUrl } from '@angular/platform-browser';
-import { default as AnsiUp } from 'ansi_up';
+import { AnsiUp } from 'ansi_up';
import * as hljs from 'highlight.js';
import { cloneDeep, isEqual } from 'lodash';
import { NzResizeEvent } from 'ng-zorro-antd/resizable';
@@ -261,8 +261,7 @@ export class NotebookParagraphResultComponent implements OnInit, AfterViewInit,
exportFile(type: 'csv' | 'tsv'): void {
if (this.tableData && this.tableData.rows) {
const wb = utils.book_new();
- let ws: WorkSheet;
- ws = utils.json_to_sheet(this.tableData.rows);
+ const ws = utils.json_to_sheet(this.tableData.rows);
utils.book_append_sheet(wb, ws, 'Sheet1');
writeFile(wb, `export.${type}`, {
bookType: 'csv',
@@ -561,7 +560,7 @@ export class NotebookParagraphResultComponent implements OnInit, AfterViewInit,
this.destroy$.complete();
}
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
private commitClassicVizConfigChange(configForMode: GraphConfig, mode: string) {
if (this.isPending) {
return;
@@ -571,7 +570,7 @@ export class NotebookParagraphResultComponent implements OnInit, AfterViewInit,
throw new Error('config is not defined');
}
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const newConfigGraph: any = cloneDeep(this.config.graph) || {};
// copy setting for mode
diff --git a/zeppelin-web-angular/src/app/pages/workspace/workspace.component.ts b/zeppelin-web-angular/src/app/pages/workspace/workspace.component.ts
index afb3eff76c9..9598427a009 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/workspace.component.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/workspace.component.ts
@@ -39,7 +39,7 @@ export class WorkspaceComponent implements OnInit, OnDestroy {
) {}
onActivate(component: unknown) {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
this.publishMode = !!(isRecord(component) && publishedSymbol in component && component[publishedSymbol as any]);
this.cdr.markForCheck();
}
diff --git a/zeppelin-web-angular/src/app/pages/workspace/workspace.guard.ts b/zeppelin-web-angular/src/app/pages/workspace/workspace.guard.ts
index a0bc7b49ffa..72e6cb5b6af 100644
--- a/zeppelin-web-angular/src/app/pages/workspace/workspace.guard.ts
+++ b/zeppelin-web-angular/src/app/pages/workspace/workspace.guard.ts
@@ -21,7 +21,11 @@ import { MessageService, TicketService } from '@zeppelin/services';
providedIn: 'root'
})
export class WorkspaceGuard implements CanActivate {
- constructor(private ticketService: TicketService, private router: Router, private messageService: MessageService) {}
+ constructor(
+ private ticketService: TicketService,
+ private router: Router,
+ private messageService: MessageService
+ ) {}
canActivate(
next: ActivatedRouteSnapshot,
diff --git a/zeppelin-web-angular/src/app/services/angular-drag-drop.service.ts b/zeppelin-web-angular/src/app/services/angular-drag-drop.service.ts
index a99cb5887c3..e67d9f626d4 100644
--- a/zeppelin-web-angular/src/app/services/angular-drag-drop.service.ts
+++ b/zeppelin-web-angular/src/app/services/angular-drag-drop.service.ts
@@ -44,7 +44,7 @@ export class AngularDragDropService {
// Drag and drop service to maintain state across directives
module.factory('customDragDropService', [
'$parse',
- function($parse: angular.IParseService): CustomDragDropService {
+ function ($parse: angular.IParseService): CustomDragDropService {
return {
draggableScope: null,
dragData: null,
@@ -53,7 +53,7 @@ export class AngularDragDropService {
dragSettings: null,
draggableElement: null,
- callEventCallback: function(scope, callbackStr, event, ui) {
+ callEventCallback(scope, callbackStr, event, ui) {
if (!callbackStr) {
return;
}
@@ -96,7 +96,7 @@ export class AngularDragDropService {
}
},
- updateModel: function(scope, modelPath, newValue, index) {
+ updateModel(scope, modelPath, newValue, index) {
const getter = $parse(modelPath);
const setter = getter.assign;
const modelValue = getter(scope);
@@ -116,7 +116,7 @@ export class AngularDragDropService {
scope.$apply();
},
- removeFromModel: function(scope, modelPath, index) {
+ removeFromModel(scope, modelPath, index) {
const getter = $parse(modelPath);
const modelValue = getter(scope);
@@ -132,30 +132,30 @@ export class AngularDragDropService {
// jqyoui-draggable directive
module.directive('jqyouiDraggable', [
'customDragDropService',
- function(dragDropService: CustomDragDropService) {
+ function (dragDropService: CustomDragDropService) {
return {
restrict: 'A',
- link: function(scope, element, attrs) {
+ link(scope, element, attrs) {
const el = element[0];
// Check if dragging is enabled
- const isDragEnabled = function() {
+ const isDragEnabled = function () {
return attrs.drag === 'true' || scope.$eval(attrs.drag) === true;
};
// Make element draggable when enabled
- const updateDraggable = function() {
+ const updateDraggable = function () {
el.draggable = isDragEnabled();
};
updateDraggable();
// Watch for changes in drag attribute
- scope.$watch(function() {
+ scope.$watch(function () {
return scope.$eval(attrs.drag);
}, updateDraggable);
- el.addEventListener('dragstart', function(event) {
+ el.addEventListener('dragstart', function (event) {
if (!isDragEnabled()) {
event.preventDefault();
return;
@@ -207,7 +207,7 @@ export class AngularDragDropService {
}
});
- el.addEventListener('dragend', function(event) {
+ el.addEventListener('dragend', function (event) {
// Remove visual feedback
el.style.opacity = '';
@@ -232,18 +232,18 @@ export class AngularDragDropService {
// jqyoui-droppable directive
module.directive('jqyouiDroppable', [
'customDragDropService',
- function(dragDropService: CustomDragDropService) {
+ function (dragDropService: CustomDragDropService) {
return {
restrict: 'A',
- link: function(scope, element, attrs) {
+ link(scope, element, attrs) {
const el = element[0];
// Check if dropping is enabled
- const isDropEnabled = function() {
+ const isDropEnabled = function () {
return attrs.drop === 'true' || scope.$eval(attrs.drop) === true;
};
- el.addEventListener('dragover', function(event) {
+ el.addEventListener('dragover', function (event) {
if (!isDropEnabled()) {
return;
}
@@ -257,12 +257,12 @@ export class AngularDragDropService {
el.style.backgroundColor = '#f0f0f0';
});
- el.addEventListener('dragleave', function() {
+ el.addEventListener('dragleave', function () {
// Remove visual feedback
el.style.backgroundColor = '';
});
- el.addEventListener('drop', function(event) {
+ el.addEventListener('drop', function (event) {
if (!isDropEnabled()) {
return;
}
diff --git a/zeppelin-web-angular/src/app/services/array-ordering.service.ts b/zeppelin-web-angular/src/app/services/array-ordering.service.ts
index dc7fb62c44e..cf7314e2314 100644
--- a/zeppelin-web-angular/src/app/services/array-ordering.service.ts
+++ b/zeppelin-web-angular/src/app/services/array-ordering.service.ts
@@ -26,7 +26,7 @@ export class ArrayOrderingService {
getNoteName(note: NodeItem) {
if (note.title.trim() === '') {
- return 'Note ' + note.id;
+ return `Note ${note.id}`;
} else {
return note.title;
}
diff --git a/zeppelin-web-angular/src/app/services/base-url.service.ts b/zeppelin-web-angular/src/app/services/base-url.service.ts
index 47d1477ecb3..09a9bf653a6 100644
--- a/zeppelin-web-angular/src/app/services/base-url.service.ts
+++ b/zeppelin-web-angular/src/app/services/base-url.service.ts
@@ -37,7 +37,7 @@ export class BaseUrlService {
}
getRestApiBase() {
- return this.skipTrailingSlash(this.getBase()) + '/api';
+ return `${this.skipTrailingSlash(this.getBase())}/api`;
}
skipTrailingSlash(path: string) {
diff --git a/zeppelin-web-angular/src/app/services/classic-visualization.service.ts b/zeppelin-web-angular/src/app/services/classic-visualization.service.ts
index 653b5ff0840..b71d59fe253 100644
--- a/zeppelin-web-angular/src/app/services/classic-visualization.service.ts
+++ b/zeppelin-web-angular/src/app/services/classic-visualization.service.ts
@@ -160,7 +160,7 @@ export class ClassicVisualizationService {
targetElementId: string,
config: GraphConfig,
tableData: TableData,
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
emitter: (config: any) => void
): Promise {
// Inject Bootstrap compatibility styles before creating visualization
@@ -251,9 +251,10 @@ export class ClassicVisualizationService {
return vizInstance;
}
- private getOrCreateInjector(
- targetElement: HTMLElement
- ): { injector: angular.auto.IInjectorService; appName: string } {
+ private getOrCreateInjector(targetElement: HTMLElement): {
+ injector: angular.auto.IInjectorService;
+ appName: string;
+ } {
// Check if element is already bootstrapped
const existingInjector = angular.element(targetElement).injector();
@@ -408,7 +409,7 @@ export class ClassicVisualizationService {
private getClassicVizConfig(graph: GraphConfig) {
const mode = graph.mode;
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const configForMode: any = graph?.setting?.[mode as keyof ParagraphConfigResult['graph']['setting']]
? cloneDeep(graph.setting[mode as keyof ParagraphConfigResult['graph']['setting']])
: {};
diff --git a/zeppelin-web-angular/src/app/services/completion.service.ts b/zeppelin-web-angular/src/app/services/completion.service.ts
index ee3a81fac1e..7af1ec8be1f 100644
--- a/zeppelin-web-angular/src/app/services/completion.service.ts
+++ b/zeppelin-web-angular/src/app/services/completion.service.ts
@@ -57,7 +57,7 @@ export class CompletionService extends MessageListenersManager {
}
private bindMonacoCompletion(): void {
- // tslint:disable-next-line:no-this-assignment
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
const that = this;
this.completionLanguages.forEach(l => {
@@ -76,23 +76,21 @@ export class CompletionService extends MessageListenersManager {
.pipe(
filter(d => d.id === id),
take(1),
- map(d => {
- return {
- suggestions: d.completions.map(
- (i): languages.CompletionItem => ({
- kind: languages.CompletionItemKind.Keyword,
- label: i.name,
- insertText: i.name,
- range: {
- startLineNumber: position.lineNumber,
- endLineNumber: position.lineNumber,
- startColumn: word.startColumn,
- endColumn: word.endColumn
- }
- })
- )
- };
- })
+ map(d => ({
+ suggestions: d.completions.map(
+ (i): languages.CompletionItem => ({
+ kind: languages.CompletionItemKind.Keyword,
+ label: i.name,
+ insertText: i.name,
+ range: {
+ startLineNumber: position.lineNumber,
+ endLineNumber: position.lineNumber,
+ startColumn: word.startColumn,
+ endColumn: word.endColumn
+ }
+ })
+ )
+ }))
)
.toPromise();
}
diff --git a/zeppelin-web-angular/src/app/services/configuration.service.ts b/zeppelin-web-angular/src/app/services/configuration.service.ts
index d409083c068..fdc81043744 100644
--- a/zeppelin-web-angular/src/app/services/configuration.service.ts
+++ b/zeppelin-web-angular/src/app/services/configuration.service.ts
@@ -20,7 +20,10 @@ import { BaseUrlService } from './base-url.service';
providedIn: 'root'
})
export class ConfigurationService extends BaseRest {
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/credential.service.ts b/zeppelin-web-angular/src/app/services/credential.service.ts
index c08a3833389..667986702b6 100644
--- a/zeppelin-web-angular/src/app/services/credential.service.ts
+++ b/zeppelin-web-angular/src/app/services/credential.service.ts
@@ -21,7 +21,10 @@ import { BaseUrlService } from './base-url.service';
providedIn: 'root'
})
export class CredentialService extends BaseRest {
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/helium.service.ts b/zeppelin-web-angular/src/app/services/helium.service.ts
index 3b0f10aeab3..7e9612e4a8e 100644
--- a/zeppelin-web-angular/src/app/services/helium.service.ts
+++ b/zeppelin-web-angular/src/app/services/helium.service.ts
@@ -24,7 +24,10 @@ import { catchError, map, switchMap } from 'rxjs/operators';
export class HeliumService extends BaseRest {
private visualizationBundles$ = new BehaviorSubject([]);
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
@@ -70,30 +73,30 @@ export class HeliumService extends BaseRest {
return forkJoin(bundleRequests);
}),
- map(bundles => {
- return bundles.reduce((acc, bundle) => {
+ map(bundles =>
+ bundles.reduce((acc, bundle) => {
if (bundle === '') {
return acc;
}
acc.push(bundle);
return acc;
- }, [] as string[]);
- })
+ }, [] as string[])
+ )
);
}
initPackages() {
const bundles$ = this.getBundlesParallel();
bundles$.subscribe(availableBundles => {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any)._heliumBundles = [] as HeliumBundle[];
availableBundles.forEach(bundle => {
- // tslint:disable-next-line:no-eval
+ // eslint-disable-next-line no-eval
eval(bundle);
});
const visualizationBundles = [] as HeliumVisualizationBundle[];
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
((window as any)._heliumBundles as HeliumBundle[]).forEach(bundle => {
switch (bundle.type) {
case 'VISUALIZATION':
@@ -103,7 +106,7 @@ export class HeliumService extends BaseRest {
this.visualizationBundles$.next(visualizationBundles);
try {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (window as any)._heliumBundles;
} catch (e) {
console.error('Failed to delete window.heliumBundles', e);
diff --git a/zeppelin-web-angular/src/app/services/interpreter.service.ts b/zeppelin-web-angular/src/app/services/interpreter.service.ts
index 34379a0f5d7..e0f60bf8361 100644
--- a/zeppelin-web-angular/src/app/services/interpreter.service.ts
+++ b/zeppelin-web-angular/src/app/services/interpreter.service.ts
@@ -29,7 +29,10 @@ import { BaseUrlService } from './base-url.service';
providedIn: 'root'
})
export class InterpreterService extends BaseRest {
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/job-manager.service.ts b/zeppelin-web-angular/src/app/services/job-manager.service.ts
index a47a6e60ea0..2ff9d1ed8fc 100644
--- a/zeppelin-web-angular/src/app/services/job-manager.service.ts
+++ b/zeppelin-web-angular/src/app/services/job-manager.service.ts
@@ -20,7 +20,10 @@ import { BaseUrlService } from './base-url.service';
providedIn: 'root'
})
export class JobManagerService extends BaseRest {
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/message.service.ts b/zeppelin-web-angular/src/app/services/message.service.ts
index f62697b8b66..8949e5e1c79 100644
--- a/zeppelin-web-angular/src/app/services/message.service.ts
+++ b/zeppelin-web-angular/src/app/services/message.service.ts
@@ -46,9 +46,7 @@ export class MessageService extends Message implements OnDestroy {
super();
}
- interceptReceived(
- data: WebSocketMessage
- ): WebSocketMessage {
+ interceptReceived(data: WebSocketMessage): WebSocketMessage {
return this.messageInterceptor ? this.messageInterceptor.received(data) : super.interceptReceived(data);
}
@@ -64,20 +62,20 @@ export class MessageService extends Message implements OnDestroy {
return super.closed();
}
- sent(): Observable> {
+ sent(): Observable> {
return super.sent();
}
- received(): Observable> {
+ received(): Observable> {
return super.received();
}
send(...args: SendArgumentsType): void {
- super.send(...args);
+ super.send(...args);
}
receive(op: K): Observable[K]> {
- return super.receive(op);
+ return super.receive(op);
}
opened(): Observable {
@@ -192,7 +190,7 @@ export class MessageService extends Message implements OnDestroy {
super.angularObjectUpdate(noteId, paragraphId, name, value, interpreterGroupId);
}
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
angularObjectClientBind(noteId: string, name: string, value: any, paragraphId: string): void {
super.angularObjectClientBind(noteId, name, value, paragraphId);
}
diff --git a/zeppelin-web-angular/src/app/services/ng-z.service.ts b/zeppelin-web-angular/src/app/services/ng-z.service.ts
index 1c61eb0cc69..f7979c9a09c 100644
--- a/zeppelin-web-angular/src/app/services/ng-z.service.ts
+++ b/zeppelin-web-angular/src/app/services/ng-z.service.ts
@@ -20,7 +20,7 @@ import { Subject } from 'rxjs';
providedIn: 'root'
})
export class NgZService implements OnDestroy {
- private paragraphMap: Map = new Map();
+ private paragraphMap: Map = new Map>();
private contextChange$ = new Subject();
private runParagraph$ = new Subject();
@@ -42,7 +42,7 @@ export class NgZService implements OnDestroy {
this.runParagraph$.next(paragraphId);
}
- bindParagraph(paragraphId: string, context: {}) {
+ bindParagraph(paragraphId: string, context: Record) {
this.paragraphMap.set(paragraphId, context);
}
diff --git a/zeppelin-web-angular/src/app/services/notebook-repos.service.ts b/zeppelin-web-angular/src/app/services/notebook-repos.service.ts
index 42b1a900725..6e39c344d67 100644
--- a/zeppelin-web-angular/src/app/services/notebook-repos.service.ts
+++ b/zeppelin-web-angular/src/app/services/notebook-repos.service.ts
@@ -22,7 +22,10 @@ import { BaseUrlService } from './base-url.service';
providedIn: 'root'
})
export class NotebookRepoService extends BaseRest {
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/notebook.service.ts b/zeppelin-web-angular/src/app/services/notebook.service.ts
index 41e64994b11..ee96e4c7041 100644
--- a/zeppelin-web-angular/src/app/services/notebook.service.ts
+++ b/zeppelin-web-angular/src/app/services/notebook.service.ts
@@ -24,7 +24,10 @@ import { BaseUrlService } from './base-url.service';
export class NotebookService extends BaseRest {
private queryStr$ = new BehaviorSubject(null);
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/runtime-compiler.service.ts b/zeppelin-web-angular/src/app/services/runtime-compiler.service.ts
index fee3ed0fb62..83e30aeda92 100644
--- a/zeppelin-web-angular/src/app/services/runtime-compiler.service.ts
+++ b/zeppelin-web-angular/src/app/services/runtime-compiler.service.ts
@@ -18,9 +18,9 @@ import { NgZService } from './ng-z.service';
export class DynamicTemplate {
constructor(
public readonly template: string,
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
public readonly component: Type,
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
public readonly moduleFactory: NgModuleFactory
) {}
}
@@ -35,7 +35,7 @@ export class DynamicTemplateError {
export class RuntimeCompilerService {
public async createAndCompileTemplate(paragraphId: string, template: string): Promise {
const ngZService = this.ngZService;
- const dynamicComponent = Component({ template: template, selector: `dynamic-${paragraphId}` })(
+ const dynamicComponent = Component({ template, selector: `dynamic-${paragraphId}` })(
class DynamicTemplateComponent {
z = {
set: (key: string, value: unknown, id: string) => ngZService.setContextValue(key, value, id),
@@ -44,7 +44,7 @@ export class RuntimeCompilerService {
};
constructor() {
- ngZService.bindParagraph(paragraphId, this);
+ ngZService.bindParagraph(paragraphId, this as Record);
Object.freeze(this.z);
}
}
@@ -52,7 +52,6 @@ export class RuntimeCompilerService {
const dynamicModule = NgModule({
declarations: [dynamicComponent],
exports: [dynamicComponent],
- entryComponents: [dynamicComponent],
imports: [RuntimeDynamicModuleModule]
})(class DynamicModule {});
@@ -65,5 +64,8 @@ export class RuntimeCompilerService {
}
}
- constructor(private compiler: Compiler, private ngZService: NgZService) {}
+ constructor(
+ private compiler: Compiler,
+ private ngZService: NgZService
+ ) {}
}
diff --git a/zeppelin-web-angular/src/app/services/security.service.ts b/zeppelin-web-angular/src/app/services/security.service.ts
index 46c77ec3c1e..16889f933f0 100644
--- a/zeppelin-web-angular/src/app/services/security.service.ts
+++ b/zeppelin-web-angular/src/app/services/security.service.ts
@@ -22,7 +22,10 @@ import { BaseUrlService } from './base-url.service';
providedIn: 'root'
})
export class SecurityService extends BaseRest {
- constructor(private http: HttpClient, baseUrlService: BaseUrlService) {
+ constructor(
+ private http: HttpClient,
+ baseUrlService: BaseUrlService
+ ) {
super(baseUrlService);
}
diff --git a/zeppelin-web-angular/src/app/services/shortcut.service.ts b/zeppelin-web-angular/src/app/services/shortcut.service.ts
index 82cdf34998a..286225ffa53 100644
--- a/zeppelin-web-angular/src/app/services/shortcut.service.ts
+++ b/zeppelin-web-angular/src/app/services/shortcut.service.ts
@@ -31,8 +31,11 @@ export interface ShortcutOption {
export class ShortcutService {
private element: HTMLElement;
- // tslint:disable-next-line:no-any
- constructor(private eventManager: EventManager, @Inject(DOCUMENT) _document: any) {
+ constructor(
+ private eventManager: EventManager,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ @Inject(DOCUMENT) _document: any
+ ) {
this.element = _document;
}
@@ -43,7 +46,7 @@ export class ShortcutService {
bindShortcut(option: ShortcutOption): Observable {
const host = option.scope || this.element;
const eventName = `keydown.${option.keybindings}`;
- // tslint:disable-next-line:ban-types
+ // eslint-disable-next-line @typescript-eslint/ban-types
let dispose: Function;
return new Observable(observer => {
const handler = (event: KeyboardEvent) => {
diff --git a/zeppelin-web-angular/src/app/share/code-editor/code-editor.component.ts b/zeppelin-web-angular/src/app/share/code-editor/code-editor.component.ts
index a9d2bbd14d8..b6133b1c9b4 100644
--- a/zeppelin-web-angular/src/app/share/code-editor/code-editor.component.ts
+++ b/zeppelin-web-angular/src/app/share/code-editor/code-editor.component.ts
@@ -17,6 +17,7 @@ import {
Component,
ElementRef,
EventEmitter,
+ HostBinding,
Input,
NgZone,
OnDestroy,
@@ -30,12 +31,12 @@ import { debounceTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs
import { warn } from 'ng-zorro-antd/core/logger';
import { InputBoolean } from 'ng-zorro-antd/core/util';
+import { editor } from 'monaco-editor';
import { CodeEditorService } from './code-editor.service';
import { DiffEditorOptions, EditorOptions, JoinedEditorOptions, NzEditorMode } from './nz-code-editor.definitions';
// Import types from monaco editor.
-import { editor } from 'monaco-editor';
import IEditor = editor.IEditor;
import IDiffEditor = editor.IDiffEditor;
import ITextModel = editor.ITextModel;
@@ -46,9 +47,6 @@ import ITextModel = editor.ITextModel;
selector: 'zeppelin-code-editor',
exportAs: 'CodeEditor',
templateUrl: './code-editor.component.html',
- host: {
- '[class.ant-code-editor]': 'true'
- },
providers: [
{
provide: NG_VALUE_ACCESSOR,
@@ -58,6 +56,7 @@ import ITextModel = editor.ITextModel;
]
})
export class CodeEditorComponent implements OnDestroy, AfterViewInit {
+ @HostBinding('class.ant-code-editor') antCodeEditor = true;
@Input() nzEditorMode: NzEditorMode = 'normal';
@Input() nzOriginalText = '';
@Input() @InputBoolean() nzLoading = false;
@@ -80,7 +79,11 @@ export class CodeEditorComponent implements OnDestroy, AfterViewInit {
private value = '';
private modelSet = false;
- constructor(private nzCodeEditorService: CodeEditorService, private ngZone: NgZone, elementRef: ElementRef) {
+ constructor(
+ private nzCodeEditorService: CodeEditorService,
+ private ngZone: NgZone,
+ elementRef: ElementRef
+ ) {
this.el = elementRef.nativeElement;
}
@@ -105,12 +108,12 @@ export class CodeEditorComponent implements OnDestroy, AfterViewInit {
this.setValue();
}
- // tslint:disable-next-line no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
registerOnChange(fn: (value: string) => void): any {
this.onChange = fn;
}
- // tslint:disable-next-line no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
registerOnTouched(fn: any): void {
this.onTouch = fn;
}
@@ -220,9 +223,11 @@ export class CodeEditorComponent implements OnDestroy, AfterViewInit {
}
private setValueEmitter(): void {
- const model = (this.nzEditorMode === 'normal'
- ? (this.editorInstance as IEditor).getModel()
- : (this.editorInstance as IDiffEditor).getModel()!.modified) as ITextModel;
+ const model = (
+ this.nzEditorMode === 'normal'
+ ? (this.editorInstance as IEditor).getModel()
+ : (this.editorInstance as IDiffEditor).getModel()!.modified
+ ) as ITextModel;
model.onDidChangeContent(() => {
this.emitValue(model.getValue());
diff --git a/zeppelin-web-angular/src/app/share/code-editor/code-editor.service.ts b/zeppelin-web-angular/src/app/share/code-editor/code-editor.service.ts
index 77343da12b2..a656dc4249d 100644
--- a/zeppelin-web-angular/src/app/share/code-editor/code-editor.service.ts
+++ b/zeppelin-web-angular/src/app/share/code-editor/code-editor.service.ts
@@ -14,6 +14,7 @@ import { DOCUMENT } from '@angular/common';
import { Inject, Injectable } from '@angular/core';
import { of as observableOf, BehaviorSubject, Observable, Subject } from 'rxjs';
import { map, tap } from 'rxjs/operators';
+import { editor } from 'monaco-editor';
import {
JoinedEditorOptions,
@@ -22,17 +23,15 @@ import {
NZ_CODE_EDITOR_CONFIG
} from './nz-code-editor.definitions';
-import { editor } from 'monaco-editor';
-
-// tslint:disable no-any
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
function tryTriggerFunc(fn?: (...args: any[]) => any): (...args: any) => void {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
return (...args: any[]) => {
if (fn) {
fn(...args);
}
};
}
-// tslint:enable no-any
@Injectable({
providedIn: 'root'
@@ -44,14 +43,15 @@ export class CodeEditorService {
private loadingStatus = NzCodeEditorLoadingStatus.UNLOAD;
private option: JoinedEditorOptions;
- option$ = new BehaviorSubject(this.option);
+ option$: BehaviorSubject;
constructor(
@Inject(NZ_CODE_EDITOR_CONFIG) private config: NzCodeEditorConfig,
- @Inject(DOCUMENT) _document: any // tslint:disable-line no-any
+ @Inject(DOCUMENT) _document: any // eslint-disable-line @typescript-eslint/no-explicit-any
) {
this.document = _document;
this.option = this.config.defaultEditorOption || {};
+ this.option$ = new BehaviorSubject(this.option);
}
// TODO(hsuanxyz): use config service later.
diff --git a/zeppelin-web-angular/src/app/share/external-links/external-link.directive.ts b/zeppelin-web-angular/src/app/share/external-links/external-link.directive.ts
index 2cbcd192821..c1ff0406be1 100644
--- a/zeppelin-web-angular/src/app/share/external-links/external-link.directive.ts
+++ b/zeppelin-web-angular/src/app/share/external-links/external-link.directive.ts
@@ -13,7 +13,7 @@
import { Directive, ElementRef, HostBinding, Input, OnChanges } from '@angular/core';
@Directive({
- // tslint:disable-next-line
+ // eslint-disable-next-line
selector: 'a[href]'
})
export class ExternalLinkDirective implements OnChanges {
diff --git a/zeppelin-web-angular/src/app/share/math-jax/math-jax.directive.ts b/zeppelin-web-angular/src/app/share/math-jax/math-jax.directive.ts
index 7352122a8da..32dd03ca721 100644
--- a/zeppelin-web-angular/src/app/share/math-jax/math-jax.directive.ts
+++ b/zeppelin-web-angular/src/app/share/math-jax/math-jax.directive.ts
@@ -13,7 +13,7 @@
import { AfterViewChecked, Directive, ElementRef } from '@angular/core';
@Directive({
- selector: '[zeppelinMathJax]'
+ selector: '[zeppelin-math-jax]'
})
export class MathJaxDirective implements AfterViewChecked {
constructor(private el: ElementRef) {}
diff --git a/zeppelin-web-angular/src/app/share/node-list/node-list.component.ts b/zeppelin-web-angular/src/app/share/node-list/node-list.component.ts
index b7bb21406c7..2834d828ef7 100644
--- a/zeppelin-web-angular/src/app/share/node-list/node-list.component.ts
+++ b/zeppelin-web-angular/src/app/share/node-list/node-list.component.ts
@@ -29,7 +29,7 @@ import { NoteActionService } from './note-action.service';
})
export class NodeListComponent extends MessageListenersManager implements OnInit {
@Input() headerMode = false;
- searchValue?: string;
+ searchValue = '';
nodes: NzTreeNodeOptions[] = [];
activatedId?: string;
@@ -99,15 +99,13 @@ export class NodeListComponent extends MessageListenersManager implements OnInit
this.noteListService.setNotes(data.notes);
this.nodes = this.noteListService.notes.root.children
.sort((v1, v2) => this.noteComparator(v1, v2))
- .map(item => {
- return { ...item, key: item.id };
- });
+ .map(item => ({ ...item, key: item.id }));
this.cdr.markForCheck();
}
getNoteName(note: NodeItem) {
if (note.title === undefined || note.title.trim() === '') {
- return 'Note ' + note.id;
+ return `Note ${note.id}`;
} else {
return note.title;
}
diff --git a/zeppelin-web-angular/src/app/share/note-create/note-create.component.ts b/zeppelin-web-angular/src/app/share/note-create/note-create.component.ts
index 173db41d1ef..a874ae7a928 100644
--- a/zeppelin-web-angular/src/app/share/note-create/note-create.component.ts
+++ b/zeppelin-web-angular/src/app/share/note-create/note-create.component.ts
@@ -54,14 +54,14 @@ export class NoteCreateComponent extends MessageListenersManager implements OnIn
}
}
});
- return `${path ? path + '/' : ''}Untitled Note ${newCount}`;
+ return `${path ? `${path}/` : ''}Untitled Note ${newCount}`;
}
cloneNoteName(cloneNote: Exclude) {
let copyCount = 1;
let newCloneName = '';
const lastIndex = cloneNote.name.lastIndexOf(' ');
- const endsWithNumber: boolean = !!cloneNote.name.match('^.+?\\s\\d$');
+ const endsWithNumber = !!cloneNote.name.match('^.+?\\s\\d$');
const noteNamePrefix = endsWithNumber ? cloneNote.name.substr(0, lastIndex) : cloneNote.name;
const regexp = new RegExp(`^${noteNamePrefix}.+`);
@@ -83,9 +83,11 @@ export class NoteCreateComponent extends MessageListenersManager implements OnIn
}
createNote() {
- this.cloneNote
- ? this.messageService.cloneNote(this.cloneNote.id, this.noteName)
- : this.messageService.newNote(this.noteName, this.defaultInterpreter);
+ if (this.cloneNote) {
+ this.messageService.cloneNote(this.cloneNote.id, this.noteName);
+ } else {
+ this.messageService.newNote(this.noteName, this.defaultInterpreter);
+ }
}
constructor(
diff --git a/zeppelin-web-angular/src/app/share/note-import/note-import.component.ts b/zeppelin-web-angular/src/app/share/note-import/note-import.component.ts
index 05dc9e38d3e..b92e4d62a16 100644
--- a/zeppelin-web-angular/src/app/share/note-import/note-import.component.ts
+++ b/zeppelin-web-angular/src/app/share/note-import/note-import.component.ts
@@ -63,7 +63,7 @@ export class NoteImportComponent extends MessageListenersManager implements OnIn
this.errorText = 'File size limit Exceeded!';
} else {
const reader = new FileReader();
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
reader.readAsText(file as any);
reader.onloadend = () => {
this.processImportJson(reader.result);
diff --git a/zeppelin-web-angular/src/app/share/note-rename/note-rename.component.ts b/zeppelin-web-angular/src/app/share/note-rename/note-rename.component.ts
index 4743fe45c9f..18c35eed633 100644
--- a/zeppelin-web-angular/src/app/share/note-rename/note-rename.component.ts
+++ b/zeppelin-web-angular/src/app/share/note-rename/note-rename.component.ts
@@ -31,7 +31,10 @@ export class NoteRenameComponent implements OnInit {
this.nzModalRef.destroy();
}
- constructor(private messageService: MessageService, private nzModalRef: NzModalRef) {}
+ constructor(
+ private messageService: MessageService,
+ private nzModalRef: NzModalRef
+ ) {}
ngOnInit() {}
}
diff --git a/zeppelin-web-angular/src/app/share/pipes/humanize-bytes.pipe.ts b/zeppelin-web-angular/src/app/share/pipes/humanize-bytes.pipe.ts
index cd61fec8b6b..44cdea358e1 100644
--- a/zeppelin-web-angular/src/app/share/pipes/humanize-bytes.pipe.ts
+++ b/zeppelin-web-angular/src/app/share/pipes/humanize-bytes.pipe.ts
@@ -39,7 +39,7 @@ export class HumanizeBytesPipe implements PipeTransform {
}
};
if (parsedValue < 1000) {
- return value + ' B';
+ return `${value} B`;
} else {
return converter(parsedValue, 1);
}
diff --git a/zeppelin-web-angular/src/app/share/resize-handle/resize-handle.component.ts b/zeppelin-web-angular/src/app/share/resize-handle/resize-handle.component.ts
index b9d43322d33..b29703821d7 100644
--- a/zeppelin-web-angular/src/app/share/resize-handle/resize-handle.component.ts
+++ b/zeppelin-web-angular/src/app/share/resize-handle/resize-handle.component.ts
@@ -10,17 +10,15 @@
* limitations under the License.
*/
-import { ChangeDetectionStrategy, Component } from '@angular/core';
+import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core';
@Component({
selector: 'zeppelin-resize-handle',
templateUrl: './resize-handle.component.html',
styleUrls: ['./resize-handle.component.less'],
- changeDetection: ChangeDetectionStrategy.OnPush,
- host: {
- role: 'resize-handle'
- }
+ changeDetection: ChangeDetectionStrategy.OnPush
})
export class ResizeHandleComponent {
+ @HostBinding('attr.role') role = 'resize-handle';
constructor() {}
}
diff --git a/zeppelin-web-angular/src/app/share/run-scripts/run-scripts.directive.ts b/zeppelin-web-angular/src/app/share/run-scripts/run-scripts.directive.ts
index 73b0a151928..e95aa7fa8b1 100644
--- a/zeppelin-web-angular/src/app/share/run-scripts/run-scripts.directive.ts
+++ b/zeppelin-web-angular/src/app/share/run-scripts/run-scripts.directive.ts
@@ -17,12 +17,16 @@ import { take } from 'rxjs/operators';
const loadedExternalScripts = new Set();
@Directive({
- selector: '[zeppelinRunScripts]'
+ selector: '[zeppelin-run-scripts]'
})
export class RunScriptsDirective implements OnChanges {
@Input() scriptsContent!: string | SafeHtml;
- constructor(private elementRef: ElementRef, private ngZone: NgZone, private renderer: Renderer2) {}
+ constructor(
+ private elementRef: ElementRef,
+ private ngZone: NgZone,
+ private renderer: Renderer2
+ ) {}
runScripts(): void {
if (!this.scriptsContent.toString()) {
@@ -33,8 +37,7 @@ export class RunScriptsDirective implements OnChanges {
const scripts = this.elementRef.nativeElement.getElementsByTagName('script');
const externalScripts = [];
const localScripts: HTMLScriptElement[] = [];
- for (let i = 0; i < scripts.length; i++) {
- const script = scripts[i];
+ for (const script of Array.from(scripts)) {
if (script.text) {
localScripts.push(script);
} else if (script.src) {
diff --git a/zeppelin-web-angular/src/app/share/share.module.ts b/zeppelin-web-angular/src/app/share/share.module.ts
index d60f60844fa..21fa3d6419f 100644
--- a/zeppelin-web-angular/src/app/share/share.module.ts
+++ b/zeppelin-web-angular/src/app/share/share.module.ts
@@ -77,7 +77,6 @@ const PIPES = [HumanizeBytesPipe];
@NgModule({
declarations: [MODAL_LIST, EXPORT_LIST, PIPES, MathJaxDirective, RunScriptsDirective, ExternalLinkDirective],
- entryComponents: [MODAL_LIST],
exports: [EXPORT_LIST, PIPES, MathJaxDirective, RunScriptsDirective, ExternalLinkDirective, CodeEditorModule],
imports: [
FormsModule,
diff --git a/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html b/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html
index b05ad55c4bf..0bc7b169268 100644
--- a/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html
+++ b/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html
@@ -25,7 +25,7 @@
- Note Keyboard Shortcuts
+ Note Keyboard Shortcuts
@@ -337,7 +337,7 @@
- Editor Keyboard Shortcuts
+ Editor Keyboard Shortcuts
diff --git a/zeppelin-web-angular/src/app/share/theme-toggle/theme-toggle.component.ts b/zeppelin-web-angular/src/app/share/theme-toggle/theme-toggle.component.ts
index 35991d05e29..87068fcf7d8 100644
--- a/zeppelin-web-angular/src/app/share/theme-toggle/theme-toggle.component.ts
+++ b/zeppelin-web-angular/src/app/share/theme-toggle/theme-toggle.component.ts
@@ -27,7 +27,10 @@ export class ThemeToggleComponent implements OnInit, OnDestroy {
currentTheme: ThemeMode = 'light';
isDarkMode = false;
- constructor(private themeService: ThemeService, private cdr: ChangeDetectorRef) {}
+ constructor(
+ private themeService: ThemeService,
+ private cdr: ChangeDetectorRef
+ ) {}
ngOnInit() {
this.currentTheme = this.themeService.getCurrentTheme();
diff --git a/zeppelin-web-angular/src/app/utility/element.ts b/zeppelin-web-angular/src/app/utility/element.ts
index cdae6de0045..9913214e735 100644
--- a/zeppelin-web-angular/src/app/utility/element.ts
+++ b/zeppelin-web-angular/src/app/utility/element.ts
@@ -11,9 +11,9 @@
*/
export function scrollIntoViewIfNeeded(element: HTMLElement, center = true): void {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
if (element && typeof (element as any).scrollIntoViewIfNeeded === 'function') {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
(element as any).scrollIntoViewIfNeeded(center);
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.component.ts b/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.component.ts
index bbf53ea684f..672dfb07545 100644
--- a/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.component.ts
@@ -44,7 +44,10 @@ export class AreaChartVisualizationComponent extends G2VisualizationComponentBas
pivotSettingComponent!: VisualizationPivotSettingComponent;
style: 'stream' | 'expand' | 'stack' = 'stack';
- constructor(@Inject(VISUALIZATION) public visualization: Visualization, private cdr: ChangeDetectorRef) {
+ constructor(
+ @Inject(VISUALIZATION) public visualization: Visualization,
+ private cdr: ChangeDetectorRef
+ ) {
super(visualization);
}
@@ -92,23 +95,13 @@ export class AreaChartVisualizationComponent extends G2VisualizationComponentBas
this.setScale(chart);
if (this.style === 'stack') {
// area:stack
- chart
- .areaStack()
- .position(`${key}*__value__`)
- .color('__key__');
+ chart.areaStack().position(`${key}*__value__`).color('__key__');
} else if (this.style === 'stream') {
// area:stream
- chart
- .area()
- .position(`${key}*__value__`)
- .adjust(['stack', 'symmetric'])
- .color('__key__');
+ chart.area().position(`${key}*__value__`).adjust(['stack', 'symmetric']).color('__key__');
} else {
// area:percent
- chart
- .areaStack()
- .position(`${key}*__percent__`)
- .color('__key__');
+ chart.areaStack().position(`${key}*__percent__`).color('__key__');
}
setChartXAxis(this.visualization, 'stackedAreaChart', chart, key);
diff --git a/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.ts b/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.ts
index 4950a3d9166..fad47913b6c 100644
--- a/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.ts
+++ b/zeppelin-web-angular/src/app/visualizations/area-chart/area-chart-visualization.ts
@@ -26,7 +26,11 @@ export class AreaChartVisualization extends G2VisualizationBase {
this.viewContainerRef
);
- constructor(private portalOutlet: CdkPortalOutlet, private viewContainerRef: ViewContainerRef, config: GraphConfig) {
+ constructor(
+ private portalOutlet: CdkPortalOutlet,
+ private viewContainerRef: ViewContainerRef,
+ config: GraphConfig
+ ) {
super(config);
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.component.ts b/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.component.ts
index 1e4a215fb90..9ba4aa58c20 100644
--- a/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.component.ts
@@ -60,7 +60,10 @@ export class BarChartVisualizationComponent extends G2VisualizationComponentBase
this.visualization.configChange$.next(this.config);
}
- constructor(@Inject(VISUALIZATION) public visualization: Visualization, private cdr: ChangeDetectorRef) {
+ constructor(
+ @Inject(VISUALIZATION) public visualization: Visualization,
+ private cdr: ChangeDetectorRef
+ ) {
super(visualization);
}
@@ -94,11 +97,7 @@ export class BarChartVisualizationComponent extends G2VisualizationComponentBase
shared: false
});
if (get(config.setting, 'multiBarChart.stacked', false)) {
- chart
- .intervalStack()
- .position(`${key}*__value__`)
- .color('__key__')
- .opacity(1);
+ chart.intervalStack().position(`${key}*__value__`).color('__key__').opacity(1);
} else {
chart
.interval()
diff --git a/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.ts b/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.ts
index 5ad93646039..d499cbfe63b 100644
--- a/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.ts
+++ b/zeppelin-web-angular/src/app/visualizations/bar-chart/bar-chart-visualization.ts
@@ -25,7 +25,11 @@ export class BarChartVisualization extends G2VisualizationBase {
this.portalOutlet,
this.viewContainerRef
);
- constructor(private portalOutlet: CdkPortalOutlet, private viewContainerRef: ViewContainerRef, config: GraphConfig) {
+ constructor(
+ private portalOutlet: CdkPortalOutlet,
+ private viewContainerRef: ViewContainerRef,
+ config: GraphConfig
+ ) {
super(config);
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/common/pivot-setting/pivot-setting.component.ts b/zeppelin-web-angular/src/app/visualizations/common/pivot-setting/pivot-setting.component.ts
index 6ec649f398a..5225c8bee93 100644
--- a/zeppelin-web-angular/src/app/visualizations/common/pivot-setting/pivot-setting.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/common/pivot-setting/pivot-setting.component.ts
@@ -29,7 +29,7 @@ export class VisualizationPivotSettingComponent implements OnInit {
columns: Array<{ name: string; index: number; aggr: string }> = [];
aggregates = ['sum', 'count', 'avg', 'min', 'max'];
- // tslint:disable-next-line
+ // eslint-disable-next-line
drop(event: CdkDragDrop) {
if (!this.visualization.configChange$) {
throw new Error('Visualization configChange$ is not defined');
@@ -55,7 +55,7 @@ export class VisualizationPivotSettingComponent implements OnInit {
this.visualization.configChange$.next(this.config);
}
- // tslint:disable-next-line
+ // eslint-disable-next-line
removeFieldAt(data: any[], index: number): void {
if (!this.visualization.configChange$) {
throw new Error('Visualization configChange$ is not defined');
diff --git a/zeppelin-web-angular/src/app/visualizations/common/scatter-setting/scatter-setting.component.ts b/zeppelin-web-angular/src/app/visualizations/common/scatter-setting/scatter-setting.component.ts
index 11da05cc7e2..756317a752e 100644
--- a/zeppelin-web-angular/src/app/visualizations/common/scatter-setting/scatter-setting.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/common/scatter-setting/scatter-setting.component.ts
@@ -42,7 +42,7 @@ export class VisualizationScatterSettingComponent implements OnInit {
size: []
};
- // tslint:disable-next-line
+ // eslint-disable-next-line
drop(event: CdkDragDrop) {
this.clean(event.container.data, false);
event.container.data.push(event.previousContainer.data[event.previousIndex]);
@@ -50,7 +50,7 @@ export class VisualizationScatterSettingComponent implements OnInit {
this.updateConfig();
}
- // tslint:disable-next-line
+ // eslint-disable-next-line
clean(data: any[], update = true): void {
while (data.length > 0) {
data.splice(0, 1);
diff --git a/zeppelin-web-angular/src/app/visualizations/g2.config.ts b/zeppelin-web-angular/src/app/visualizations/g2.config.ts
index 622d25ddb74..d201cd452a3 100644
--- a/zeppelin-web-angular/src/app/visualizations/g2.config.ts
+++ b/zeppelin-web-angular/src/app/visualizations/g2.config.ts
@@ -124,6 +124,6 @@ const zeppelinTheme = {
export function setTheme() {
const theme = G2.Util.deepMix(G2.Global, zeppelinTheme);
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
(G2.Global as any).setTheme(theme);
}
diff --git a/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.component.ts b/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.component.ts
index 88de72d3648..bc0c0ce7971 100644
--- a/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.component.ts
@@ -62,7 +62,10 @@ export class LineChartVisualizationComponent extends G2VisualizationComponentBas
this.visualization.configChange$.next(this.config);
}
- constructor(@Inject(VISUALIZATION) public visualization: Visualization, private cdr: ChangeDetectorRef) {
+ constructor(
+ @Inject(VISUALIZATION) public visualization: Visualization,
+ private cdr: ChangeDetectorRef
+ ) {
super(visualization);
}
@@ -98,15 +101,12 @@ export class LineChartVisualizationComponent extends G2VisualizationComponentBas
}
const setting = config.setting.lineChart;
this.setScale(chart);
- chart
- .line()
- .position(`${key}*__value__`)
- .color('__key__');
+ chart.line().position(`${key}*__value__`).color('__key__');
setChartXAxis(this.visualization, 'lineChart', chart, key);
if (setting.isDateFormat) {
if (this.visualization.transformed && this.visualization.transformed.rows) {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const invalid = this.visualization.transformed.rows.some((r: any) => {
const isInvalidDate = Number.isNaN(new Date(r[key]).valueOf());
if (isInvalidDate) {
@@ -141,10 +141,10 @@ export class LineChartVisualizationComponent extends G2VisualizationComponentBas
}
const setting = config.setting.lineChart;
if (setting.lineWithFocus) {
- // tslint:disable-next-line
+ // eslint-disable-next-line
(this.chart as any).interact('brush');
} else {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this.chart as any).clearInteraction();
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.ts b/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.ts
index dc5289e48b7..ecbc35f71d6 100644
--- a/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.ts
+++ b/zeppelin-web-angular/src/app/visualizations/line-chart/line-chart-visualization.ts
@@ -26,7 +26,11 @@ export class LineChartVisualization extends G2VisualizationBase {
this.viewContainerRef
);
- constructor(private portalOutlet: CdkPortalOutlet, private viewContainerRef: ViewContainerRef, config: GraphConfig) {
+ constructor(
+ private portalOutlet: CdkPortalOutlet,
+ private viewContainerRef: ViewContainerRef,
+ config: GraphConfig
+ ) {
super(config);
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.component.ts b/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.component.ts
index cf9d1e32a12..c059239405a 100644
--- a/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.component.ts
@@ -66,7 +66,7 @@ export class PieChartVisualizationComponent extends G2VisualizationComponentBase
lineWidth: 1,
stroke: '#fff'
})
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
.tooltip('__key__*__value__', (name: any, value: any) => ({ name, value }));
}
diff --git a/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.ts b/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.ts
index 675d03f5527..1942798c009 100644
--- a/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.ts
+++ b/zeppelin-web-angular/src/app/visualizations/pie-chart/pie-chart-visualization.ts
@@ -26,7 +26,11 @@ export class PieChartVisualization extends G2VisualizationBase {
this.viewContainerRef
);
- constructor(private portalOutlet: CdkPortalOutlet, private viewContainerRef: ViewContainerRef, config: GraphConfig) {
+ constructor(
+ private portalOutlet: CdkPortalOutlet,
+ private viewContainerRef: ViewContainerRef,
+ config: GraphConfig
+ ) {
super(config);
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.component.ts b/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.component.ts
index afe2229356a..93ecb39db2e 100644
--- a/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.component.ts
+++ b/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.component.ts
@@ -41,7 +41,10 @@ export class ScatterChartVisualizationComponent extends G2VisualizationComponent
@ViewChild(VisualizationScatterSettingComponent, { static: false })
scatterSettingComponent!: VisualizationScatterSettingComponent;
- constructor(@Inject(VISUALIZATION) public visualization: Visualization, private cdr: ChangeDetectorRef) {
+ constructor(
+ @Inject(VISUALIZATION) public visualization: Visualization,
+ private cdr: ChangeDetectorRef
+ ) {
super(visualization);
}
diff --git a/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.ts b/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.ts
index 90d893d001b..750e568ec5f 100644
--- a/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.ts
+++ b/zeppelin-web-angular/src/app/visualizations/scatter-chart/scatter-chart-visualization.ts
@@ -26,7 +26,11 @@ export class ScatterChartVisualization extends G2VisualizationBase {
this.viewContainerRef
);
- constructor(private portalOutlet: CdkPortalOutlet, private viewContainerRef: ViewContainerRef, config: GraphConfig) {
+ constructor(
+ private portalOutlet: CdkPortalOutlet,
+ private viewContainerRef: ViewContainerRef,
+ config: GraphConfig
+ ) {
super(config);
}
}
diff --git a/zeppelin-web-angular/src/app/visualizations/table/table-visualization.component.html b/zeppelin-web-angular/src/app/visualizations/table/table-visualization.component.html
index 4b84fc3027d..31395762053 100644
--- a/zeppelin-web-angular/src/app/visualizations/table/table-visualization.component.html
+++ b/zeppelin-web-angular/src/app/visualizations/table/table-visualization.component.html
@@ -45,8 +45,7 @@
nzWidth="200px"
nzShowSort
nzCustomFilter
- [nzSortKey]="col"
- (nzSortChange)="onSortChange(col, $event)"
+ (nzSortOrderChange)="onSortChange(col, $event)"
>
{{ col }}
();
types: ColType[] = ['string', 'number', 'date'];
aggregations: AggregationType[] = ['count', 'sum', 'min', 'max', 'avg'];
- @ViewChild(NzTableComponent, { static: false }) nzTable!: NzTableComponent;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ @ViewChild(NzTableComponent, { static: false }) nzTable!: NzTableComponent;
exportFile(type: 'csv' | 'xlsx', all = true) {
const wb = utils.book_new();
@@ -67,7 +68,7 @@ export class TableVisualizationComponent implements OnInit {
if (all) {
ws = utils.json_to_sheet(this.rows);
} else {
- ws = utils.json_to_sheet(this.nzTable.data);
+ ws = utils.json_to_sheet([...this.nzTable.data]);
}
utils.book_append_sheet(wb, ws, 'Sheet1');
writeFile(wb, `export.${type}`);
@@ -119,7 +120,7 @@ export class TableVisualizationComponent implements OnInit {
}
const tableData = this.tableData;
this.colOptions.forEach((opt, key) => {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const numValue = (row: any) => {
const value = typeCoercion(row[key], opt.type);
if (typeof value === 'number') {
@@ -162,19 +163,19 @@ export class TableVisualizationComponent implements OnInit {
if (!this.tableData) {
throw new Error('tableData is not defined');
}
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const sortKeys: any[] = [];
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const sortTypes: any[] = [];
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const terms: any[] = [];
this.colOptions.forEach((value, key) => {
if (value.sort) {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
sortKeys.push((row: any) => typeCoercion(row[key], value.type));
sortTypes.push(value.sort);
}
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
terms.push((row: any) => String(row[key]).search(value.term) !== -1);
});
this.rows = filter(this.tableData.rows, row => terms.every(term => term(row)));
@@ -182,7 +183,10 @@ export class TableVisualizationComponent implements OnInit {
this.cdr.markForCheck();
}
- constructor(@Inject(VISUALIZATION) public visualization: Visualization, private cdr: ChangeDetectorRef) {}
+ constructor(
+ @Inject(VISUALIZATION) public visualization: Visualization,
+ private cdr: ChangeDetectorRef
+ ) {}
ngOnInit() {}
diff --git a/zeppelin-web-angular/src/app/visualizations/table/table-visualization.ts b/zeppelin-web-angular/src/app/visualizations/table/table-visualization.ts
index dce296e4db1..6ed6d596be7 100644
--- a/zeppelin-web-angular/src/app/visualizations/table/table-visualization.ts
+++ b/zeppelin-web-angular/src/app/visualizations/table/table-visualization.ts
@@ -31,7 +31,11 @@ export class TableVisualization extends Visualization
- Charts
-
-
+ Charts
+
+
@@ -33,7 +65,23 @@
type="button"
ng-if="config.panel.columnPanelOpened"
ng-click="toggleColumnPanel()"
- style="display: inline-block; padding: 2px 5px 2px 5px; margin-bottom: 0; font-size: 12px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; color: #333; background-color: #fff; text-decoration: none;"
+ style="
+ display: inline-block;
+ padding: 2px 5px 2px 5px;
+ margin-bottom: 0;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #333;
+ background-color: #fff;
+ text-decoration: none;
+ "
>
@@ -41,34 +89,56 @@
type="button"
ng-if="!config.panel.columnPanelOpened"
ng-click="toggleColumnPanel()"
- style="display: inline-block; padding: 2px 5px 2px 5px; margin-bottom: 0; font-size: 12px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; color: #333; background-color: #fff; text-decoration: none;"
+ style="
+ display: inline-block;
+ padding: 2px 5px 2px 5px;
+ margin-bottom: 0;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #333;
+ background-color: #fff;
+ text-decoration: none;
+ "
>
-
+
-
-
+
+
-
@@ -77,15 +147,41 @@
Available Columns
-
-
- -
+
+
+ -
-
+
-
+
-
+
@@ -124,81 +235,184 @@
ng-if="isSingleDimensionAxis(axisSpec)"
ng-model="config.axis[config.chart.current][axisSpec.name]"
jqyoui-droppable="{onDrop:'axisChanged(axisSpec)'}"
- style="padding-left: 0; list-style: none; height:36px; border-radius: 6px; margin-top: 7px; overflow: visible !important; border: 1px dashed #ccc; background-color: #f9f9f9;"
+ style="
+ padding-left: 0;
+ list-style: none;
+ height: 36px;
+ border-radius: 6px;
+ margin-top: 7px;
+ overflow: visible !important;
+ border: 1px dashed #ccc;
+ background-color: #f9f9f9;
+ "
>
-
{{ getSingleDimensionAxis(axisSpec).name }}
-
+
{{getSingleDimensionAxis(axisSpec).name | limitTo: 30}}{{getSingleDimensionAxis(axisSpec).name > 30 ?
'...' : ''}}
-
-
+
+
{{getSingleDimensionAxis(axisSpec).aggr}}
-
+
- Parameters
-
-
+ Parameters
+
+
@@ -321,7 +669,23 @@
type="button"
ng-click="resetParameterConfig()"
ng-if="config.panel.parameterPanelOpened"
- style="display: inline-block; padding: 2px 5px 2px 5px; margin-bottom: 0; font-size: 12px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; color: #333; background-color: #fff; text-decoration: none;"
+ style="
+ display: inline-block;
+ padding: 2px 5px 2px 5px;
+ margin-bottom: 0;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #333;
+ background-color: #fff;
+ text-decoration: none;
+ "
>
@@ -329,7 +693,23 @@
type="button"
ng-if="config.panel.parameterPanelOpened"
ng-click="toggleParameterPanel()"
- style="display: inline-block; padding: 2px 5px 2px 5px; margin-bottom: 0; font-size: 12px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; color: #333; background-color: #fff; text-decoration: none;"
+ style="
+ display: inline-block;
+ padding: 2px 5px 2px 5px;
+ margin-bottom: 0;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #333;
+ background-color: #fff;
+ text-decoration: none;
+ "
>
@@ -337,39 +717,90 @@
type="button"
ng-if="!config.panel.parameterPanelOpened"
ng-click="toggleParameterPanel()"
- style="display: inline-block; padding: 2px 5px 2px 5px; margin-bottom: 0; font-size: 12px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border: 1px solid #ccc; border-radius: 4px; color: #333; background-color: #fff; text-decoration: none;"
+ style="
+ display: inline-block;
+ padding: 2px 5px 2px 5px;
+ margin-bottom: 0;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ color: #333;
+ background-color: #fff;
+ text-decoration: none;
+ "
>
-
+
-
+
Name
Type
Description
Value
@@ -378,38 +809,88 @@
{{paramSpec.name}}
{{paramSpec.valueType}}
{{paramSpec.description}}
-
-
+
+
Option
nzMode="tags" class="owners-input" [nzTokenSeparators]="[',']" - style="width: 100%;" + style="width: 100%" formControlName="owners" nzPlaceHolder="" nzAllowClear @@ -448,11 +448,7 @@Dependencies
diff --git a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts index ad52ba6a045..4bd5c533bfe 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts +++ b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.ts @@ -85,13 +85,13 @@ export class InterpreterItemComponent extends DestroyHookComponent implements On this.addProperties(); this.addDependence(); const formData = this.formGroup.getRawValue(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const properties: Record| Note Keyboard Shortcuts | +Note Keyboard Shortcuts | |||
|---|---|---|---|---|
| Editor Keyboard Shortcuts | +Editor Keyboard Shortcuts |
| Name | Type | Description | Value | @@ -378,38 +809,88 @@|
|---|---|---|---|---|
| {{paramSpec.name}} | {{paramSpec.valueType}} | {{paramSpec.description}} | -
-
+
+ | |