You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/10/18 09:44:26 UTC

[flink] 02/02: [FLINK-13818][web] Check whether web submission are enabled

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git

commit acd8f2bf01a79c464c8a04262b4f966e1ddfb9f0
Author: Yadong Xie <vt...@users.noreply.github.com>
AuthorDate: Fri Oct 18 17:42:25 2019 +0800

    [FLINK-13818][web] Check whether web submission are enabled
---
 flink-runtime-web/web-dashboard/src/app/app.component.html          | 2 +-
 flink-runtime-web/web-dashboard/src/app/app.component.ts            | 2 ++
 flink-runtime-web/web-dashboard/src/app/interfaces/configuration.ts | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/flink-runtime-web/web-dashboard/src/app/app.component.html b/flink-runtime-web/web-dashboard/src/app/app.component.html
index 80769cd..d73ea50 100644
--- a/flink-runtime-web/web-dashboard/src/app/app.component.html
+++ b/flink-runtime-web/web-dashboard/src/app/app.component.html
@@ -45,7 +45,7 @@
       <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/job-manager']">
         <span><i nz-icon type="build"></i><span>Job Manager</span></span>
       </li>
-      <li nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/submit']">
+      <li *ngIf="webSubmitEnabled" nz-menu-item routerLinkActive="ant-menu-item-selected" [routerLink]="['/submit']">
         <span><i nz-icon type="upload"></i><span>Submit New Job</span></span>
       </li>
     </ul>
diff --git a/flink-runtime-web/web-dashboard/src/app/app.component.ts b/flink-runtime-web/web-dashboard/src/app/app.component.ts
index dd83cfa..5bf70266 100644
--- a/flink-runtime-web/web-dashboard/src/app/app.component.ts
+++ b/flink-runtime-web/web-dashboard/src/app/app.component.ts
@@ -36,6 +36,8 @@ export class AppComponent implements OnInit {
     fromEvent(window, 'online').pipe(map(() => true))
   ).pipe(startWith(true));
 
+  webSubmitEnabled = this.statusService.configuration.features['web-submit'];
+
   showMessage() {
     if (this.statusService.listOfErrorMessage.length) {
       this.visible = true;
diff --git a/flink-runtime-web/web-dashboard/src/app/interfaces/configuration.ts b/flink-runtime-web/web-dashboard/src/app/interfaces/configuration.ts
index 0576c64..a7eb312 100644
--- a/flink-runtime-web/web-dashboard/src/app/interfaces/configuration.ts
+++ b/flink-runtime-web/web-dashboard/src/app/interfaces/configuration.ts
@@ -22,4 +22,7 @@ export interface ConfigurationInterface {
   'timezone-offset': number;
   'flink-version': string;
   'flink-revision': string;
+  features: {
+    'web-submit': boolean;
+  };
 }