Skip to content

Commit

Permalink
[FLINK-13818][web] Check whether web submission are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
vthinkxie authored and zentol committed Oct 18, 2019
1 parent a612aac commit 7ea62f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flink-runtime-web/web-dashboard/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1>Apache Flink Dashboard</h1></a>
<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>
Expand Down
2 changes: 2 additions & 0 deletions flink-runtime-web/web-dashboard/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ export interface ConfigurationInterface {
'timezone-offset': number;
'flink-version': string;
'flink-revision': string;
features: {
'web-submit': boolean;
};
}

0 comments on commit 7ea62f7

Please sign in to comment.