RocMarshal commented on code in PR #27826:
URL: https://github.com/apache/flink/pull/27826#discussion_r2987480075


##########
flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts:
##########
@@ -126,16 +128,31 @@ export class JobStatusComponent implements OnInit, 
OnDestroy {
     return this.listOfNavigation.findIndex(item => item.path === 
'checkpoints');
   }
 
+  rescalesIndexOfNav(): number {
+    return this.listOfNavigation.findIndex(item => item.path === 'rescales');
+  }
+
   private handleJobDetailChanged(data: JobDetailCorrect): void {
     this.jobDetail = data;
-    const index = this.checkpointIndexOfNav();
-    if (data.plan.type == 'STREAMING' && index == -1) {
+    const checkpointIndex = this.checkpointIndexOfNav();
+    if (data.plan.type == 'STREAMING' && checkpointIndex == -1) {
       this.listOfNavigation.splice(this.checkpointIndexOfNavigation, 0, {
         path: 'checkpoints',
         title: 'Checkpoints'
       });
-    } else if (data.plan.type == 'BATCH' && index > -1) {
-      this.listOfNavigation.splice(index, 1);
+    } else if (data.plan.type == 'BATCH' && checkpointIndex > -1) {
+      this.listOfNavigation.splice(checkpointIndex, 1);
+    }

Review Comment:
   The change could be committed as a alone commit.



##########
flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts:
##########
@@ -126,16 +128,31 @@ export class JobStatusComponent implements OnInit, 
OnDestroy {
     return this.listOfNavigation.findIndex(item => item.path === 
'checkpoints');
   }
 
+  rescalesIndexOfNav(): number {
+    return this.listOfNavigation.findIndex(item => item.path === 'rescales');
+  }
+
   private handleJobDetailChanged(data: JobDetailCorrect): void {
     this.jobDetail = data;
-    const index = this.checkpointIndexOfNav();
-    if (data.plan.type == 'STREAMING' && index == -1) {
+    const checkpointIndex = this.checkpointIndexOfNav();
+    if (data.plan.type == 'STREAMING' && checkpointIndex == -1) {
       this.listOfNavigation.splice(this.checkpointIndexOfNavigation, 0, {
         path: 'checkpoints',
         title: 'Checkpoints'
       });
-    } else if (data.plan.type == 'BATCH' && index > -1) {
-      this.listOfNavigation.splice(index, 1);
+    } else if (data.plan.type == 'BATCH' && checkpointIndex > -1) {
+      this.listOfNavigation.splice(checkpointIndex, 1);
+    }
+
+    const rescalesIndex = this.rescalesIndexOfNav();

Review Comment:
   rescalesIndex-> rescalesNavIndex



##########
flink-runtime-web/web-dashboard/src/app/pages/job/job-detail/status/job-status.component.ts:
##########
@@ -126,16 +128,31 @@ export class JobStatusComponent implements OnInit, 
OnDestroy {
     return this.listOfNavigation.findIndex(item => item.path === 
'checkpoints');
   }
 
+  rescalesIndexOfNav(): number {
+    return this.listOfNavigation.findIndex(item => item.path === 'rescales');
+  }
+
   private handleJobDetailChanged(data: JobDetailCorrect): void {
     this.jobDetail = data;
-    const index = this.checkpointIndexOfNav();
-    if (data.plan.type == 'STREAMING' && index == -1) {
+    const checkpointIndex = this.checkpointIndexOfNav();

Review Comment:
   checkpointIndex -> checkpointNavIndex



##########
flink-runtime-web/web-dashboard/src/app/pages/job/rescales/job-rescales.component.ts:
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 { NgIf } from '@angular/common';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, 
OnInit } from '@angular/core';
+import { forkJoin, of, Subject } from 'rxjs';
+import { catchError, distinctUntilChanged, switchMap, takeUntil } from 
'rxjs/operators';
+
+import { HumanizeDurationPipe } from 
'@flink-runtime-web/components/humanize-duration.pipe';
+import { RescalesConfig, JobDetailCorrect } from 
'@flink-runtime-web/interfaces';
+import { JobService } from '@flink-runtime-web/services';
+import { NzButtonModule } from 'ng-zorro-antd/button';
+import { NzCollapseModule } from 'ng-zorro-antd/collapse';
+import { NzDividerModule } from 'ng-zorro-antd/divider';
+import { NzEmptyModule } from 'ng-zorro-antd/empty';
+import { NzIconModule } from 'ng-zorro-antd/icon';
+import { NzTableModule } from 'ng-zorro-antd/table';
+import { NzTabsModule } from 'ng-zorro-antd/tabs';
+import { NzTooltipModule } from 'ng-zorro-antd/tooltip';
+
+import { JobLocalService } from '../job-local.service';
+
+@Component({
+  selector: 'flink-job-rescales',
+  templateUrl: './job-rescales.component.html',
+  styleUrls: ['./job-rescales.component.less'],
+  changeDetection: ChangeDetectionStrategy.OnPush,
+  imports: [
+    NgIf,
+    NzTabsModule,
+    NzDividerModule,
+    HumanizeDurationPipe,
+    NzTableModule,
+    NzIconModule,
+    NzButtonModule,
+    NzEmptyModule,
+    NzCollapseModule,
+    NzTooltipModule
+  ]
+})
+export class JobRescalesComponent implements OnInit, OnDestroy {
+  disabledInterval = 0x7fffffffffffffff;
+
+  public rescalesConfig?: RescalesConfig;
+  public jobDetail: JobDetailCorrect;

Review Comment:
   Could the `JobDetailCorrect`  be `JobDetail`?
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to