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


##########
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:
   Thanks @och5351 for the clarification.
   
   I have a try on `JobDetailCorrect -> JobDetail`, It worked.
   
   If the code logic does not rely on the extensions made to the plan property 
in JobDetailCorrect(i.e., it does not use plan.streamNodes, plan.streamLinks, 
or plan.nodesas NodesItemCorrect[]), then this usage is type-safe and 
appropriate.
   
   Pls correct me if wrong.



##########
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 checkpointNavIndex = this.checkpointIndexOfNav();
+    if (data.plan.type == 'STREAMING' && checkpointNavIndex == -1) {

Review Comment:
   Sorry for the lack of clarity in my previous message.
   What I meant is that the current changes are primarily aimed at adding the 
rescale navigation button and the rescales/configuration subpage.
   However, it is now apparent that this also includes renaming 
checkpoint-related variables.
   I prefer that each patch has changes that are as single-purpose or have a 
single responsibility as possible.
   If you also prefer this approach, we should split the renaming of 
checkpoint-related variables into a separate hotfix. The other changes can 
remain in the commit for FLINK-38901.



-- 
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