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 878648c0c88..fe2f92ec331 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 @@ -31,6 +31,7 @@ import { MessageService, NoteStatusService, SaveAsService, TicketService } from import { NotebookService } from '@zeppelin/services/notebook.service'; import { NoteCreateComponent } from '@zeppelin/share/note-create/note-create.component'; +import { ShortcutComponent } from '@zeppelin/share/shortcut/shortcut.component'; @Component({ selector: 'zeppelin-notebook-action-bar', @@ -246,7 +247,11 @@ export class NotebookActionBarComponent extends MessageListenersManager implemen } showShortCut() { - // TODO(hsuanxyz) + this.nzModalService.info({ + nzTitle: `Shortcut Info`, + nzWidth: '600px', + nzContent: ShortcutComponent + }); } togglePermissions() { diff --git a/zeppelin-web-angular/src/app/share/share.module.ts b/zeppelin-web-angular/src/app/share/share.module.ts index e864e9a6965..25cf7fc2f8c 100644 --- a/zeppelin-web-angular/src/app/share/share.module.ts +++ b/zeppelin-web-angular/src/app/share/share.module.ts @@ -51,6 +51,7 @@ import { NoteTocComponent } from '@zeppelin/share/note-toc/note-toc.component'; import { PageHeaderComponent } from '@zeppelin/share/page-header/page-header.component'; import { HumanizeBytesPipe } from '@zeppelin/share/pipes'; import { RunScriptsDirective } from '@zeppelin/share/run-scripts/run-scripts.directive'; +import { ShortcutComponent } from '@zeppelin/share/shortcut/shortcut.component'; import { SpinComponent } from '@zeppelin/share/spin/spin.component'; import { ResizeHandleComponent } from './resize-handle'; @@ -58,6 +59,7 @@ const MODAL_LIST = [ AboutZeppelinComponent, NoteImportComponent, NoteCreateComponent, + ShortcutComponent, NoteRenameComponent, FolderRenameComponent ]; diff --git a/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html b/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html new file mode 100644 index 00000000000..62b0437f0e8 --- /dev/null +++ b/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.html @@ -0,0 +1,328 @@ + + + diff --git a/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.ts b/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.ts new file mode 100644 index 00000000000..623f2dd890d --- /dev/null +++ b/zeppelin-web-angular/src/app/share/shortcut/shortcut.component.ts @@ -0,0 +1,22 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'zeppelin-shortcut', + templateUrl: './shortcut.component.html' +}) +export class ShortcutComponent implements OnInit { + isMac = navigator.appVersion.indexOf('Mac') !== -1; + ngOnInit() {} +}