diff --git a/zeppelin-web-angular/angular.json b/zeppelin-web-angular/angular.json index 37904c102f7..095c3881d31 100644 --- a/zeppelin-web-angular/angular.json +++ b/zeppelin-web-angular/angular.json @@ -72,7 +72,8 @@ "src/styles/theme/light/antd-light.less", "src/styles.less", "./node_modules/highlight.js/styles/github.css", - "./node_modules/monaco-editor/min/vs/editor/editor.main.css" + "./node_modules/monaco-editor/min/vs/editor/editor.main.css", + "./node_modules/github-markdown-css/github-markdown.css" ], "stylePreprocessorOptions": { "includePaths": [ diff --git a/zeppelin-web-angular/package-lock.json b/zeppelin-web-angular/package-lock.json index da898b09ce3..8c82716f71c 100644 --- a/zeppelin-web-angular/package-lock.json +++ b/zeppelin-web-angular/package-lock.json @@ -2844,13 +2844,10 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, - "ansi-to-html": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/ansi-to-html/-/ansi-to-html-0.6.12.tgz", - "integrity": "sha512-qBkIqLW979675mP76yB7yVkzeAWtATegdnDQ0RA3CZzknx0yUlNxMSML4xFdBfTs2GWYFQ1FELfbGbVSPzJ+LA==", - "requires": { - "entities": "^1.1.2" - } + "ansi_up": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-4.0.4.tgz", + "integrity": "sha512-vRxC8q6QY918MbehO869biJW4tiunJdjOhi5fpY6NLOliBQlZhOkKgABJKJqH+JZfb/WfjvjN1chLWI6tODerw==" }, "any-observable": { "version": "0.3.0", @@ -5538,11 +5535,6 @@ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "dev": true }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" - }, "err-code": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", @@ -6396,6 +6388,11 @@ "assert-plus": "^1.0.0" } }, + "github-markdown-css": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/github-markdown-css/-/github-markdown-css-3.0.1.tgz", + "integrity": "sha512-9G5CIPsHoyk5ObDsb/H4KTi23J8KE1oDd4KYU51qwqeM+lKWAiO7abpSgCkyWswgmSKBiuE7/4f8xUz7f2qAiQ==" + }, "glob": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.5.tgz", diff --git a/zeppelin-web-angular/package.json b/zeppelin-web-angular/package.json index 670c73cc2ce..9d8cafef99e 100644 --- a/zeppelin-web-angular/package.json +++ b/zeppelin-web-angular/package.json @@ -28,10 +28,11 @@ "@angular/router": "~8.2.10", "@antv/data-set": "^0.10.2", "@antv/g2": "^3.5.4", - "ansi-to-html": "^0.6.11", + "ansi_up": "^4.0.4", "core-js": "^2.5.4", "date-fns": "^1.30.1", "diff-match-patch": "^1.0.4", + "github-markdown-css": "^3.0.1", "highlight.js": "^9.15.8", "lodash": "^4.17.11", "mathjax": "2.7.5", diff --git a/zeppelin-web-angular/src/app/app.module.ts b/zeppelin-web-angular/src/app/app.module.ts index 06be7f4f6f1..5f651027048 100644 --- a/zeppelin-web-angular/src/app/app.module.ts +++ b/zeppelin-web-angular/src/app/app.module.ts @@ -25,7 +25,7 @@ import { NzModalService } from 'ng-zorro-antd/modal'; import { NzNotificationService } from 'ng-zorro-antd/notification'; import { MESSAGE_INTERCEPTOR, TRASH_FOLDER_ID_TOKEN } from '@zeppelin/interfaces'; -import { loadMonacoLanguage } from '@zeppelin/languages'; +import { loadMonacoBefore } from '@zeppelin/languages'; import { TicketService } from '@zeppelin/services'; import { ShareModule } from '@zeppelin/share'; @@ -37,7 +37,7 @@ import { RUNTIME_COMPILER_PROVIDERS } from './app-runtime-compiler.providers'; import { AppComponent } from './app.component'; export const loadMonaco = () => { - loadMonacoLanguage(); + loadMonacoBefore(); }; registerLocaleData(en); diff --git a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts index d6cb44c8c2f..27d08f94a81 100644 --- a/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts +++ b/zeppelin-web-angular/src/app/core/runtime-dynamic-module/runtime-dynamic-module.module.ts @@ -1,3 +1,14 @@ +/* + * 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 { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; diff --git a/zeppelin-web-angular/src/app/languages/load.ts b/zeppelin-web-angular/src/app/languages/load.ts index 5dad459c888..64c617acd6e 100644 --- a/zeppelin-web-angular/src/app/languages/load.ts +++ b/zeppelin-web-angular/src/app/languages/load.ts @@ -10,10 +10,19 @@ * limitations under the License. */ -import { languages } from 'monaco-editor'; +import { editor, languages } from 'monaco-editor'; import { conf as ScalaConf, language as ScalaLanguage } from './scala'; -export const loadMonacoLanguage = () => { +export const loadMonacoBefore = () => { + editor.defineTheme('zeppelin-theme', { + base: 'vs', + inherit: true, + rules: [], + colors: { + 'editor.lineHighlightBackground': '#0000FF10' + } + }); + editor.setTheme('zeppelin-theme'); languages.register({ id: 'scala' }); languages.setMonarchTokensProvider('scala', ScalaLanguage); languages.setLanguageConfiguration('scala', ScalaConf); diff --git a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.less b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.less index 856506e92f2..746967dc88f 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.less +++ b/zeppelin-web-angular/src/app/pages/workspace/interpreter/item/item.component.less @@ -19,7 +19,7 @@ ::ng-deep .interpreter-item { &.edit { - background: @orange-1; + //background: @orange-1; } .ant-card-body { margin-top: -@card-padding-base; diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.less b/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.less index bc6d2805eb8..7e242390dcf 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.less +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook-repos/item/item.component.less @@ -20,7 +20,7 @@ ::ng-deep .repo-item { &.edit { - background: @orange-1; + //background: @orange-1; } } diff --git a/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.html b/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.html index 0238f171aca..1da21e63a63 100644 --- a/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.html +++ b/zeppelin-web-angular/src/app/pages/workspace/notebook/action-bar/action-bar.component.html @@ -125,11 +125,9 @@ (click)="toggleExtension('revisions')"> - - - +