diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 997ab7a..a1841c9 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,7 +6,9 @@
-
+
+
+
@@ -196,7 +198,7 @@
-
+
diff --git a/src/base/datax.worker.component.ts b/src/base/datax.worker.component.ts
index 894b92a..5f12e32 100644
--- a/src/base/datax.worker.component.ts
+++ b/src/base/datax.worker.component.ts
@@ -140,7 +140,7 @@ export class DataxWorkerComponent extends AppFormComponent implements AfterViewI
this.multiViewDAG = new MultiViewDAG(configFST, this._componentFactoryResolver, this.containerRef);
let next = (params) => {
- console.log(params);
+ // console.log(params);
DataxWorkerComponent.getJobWorkerMeta(this, params, this.processMeta).then((dataXWorkerStatus) => {
if (dataXWorkerStatus.k8sReplicationControllerCreated) {
this.multiViewDAG.loadComponent(DataxWorkerRunningComponent, dataXWorkerStatus);
diff --git a/src/base/datax.worker.running.component.ts b/src/base/datax.worker.running.component.ts
index cebf5aa..3f1298e 100644
--- a/src/base/datax.worker.running.component.ts
+++ b/src/base/datax.worker.running.component.ts
@@ -56,6 +56,7 @@ import {PluginsComponent} from "../common/plugins.component";
import {languages} from "monaco-editor";
import {NzTabSetComponent} from "ng-zorro-antd/tabs/tabset.component";
import {LaunchK8SClusterWaittingProcessComponent} from "../common/launch.waitting.process.component";
+import {DataxWorkerComponent} from "./datax.worker.component";
export const KEY_APPNAME = "appname";
@@ -137,7 +138,8 @@ export const KEY_APPNAME = "appname";
+ [logType]="logtype"
+ (afterOnePodRelaunch)="logsStatusOnePodLauch()">
@@ -214,7 +216,8 @@ export const KEY_APPNAME = "appname";
- 可直接打开{{this.dto.processMeta.pageHeader}}控制台 控制台
+ 可直接打开{{this.dto.processMeta.pageHeader}}控制台 控制台
@@ -230,12 +233,12 @@ export const KEY_APPNAME = "appname";
-
操作
-
+
`
@@ -293,6 +296,34 @@ export class DataxWorkerRunningComponent extends AppFormComponent implements Aft
super(tisService, route, modalService, notification);
}
+ refreshStatus() {
+ this.reloadStatus().then((status) => {
+ this.successNotify(this.dto.processMeta.pageHeader + "状态已更新");
+ });
+ }
+
+ private reloadStatus(): Promise {
+ return DataxWorkerComponent.getJobWorkerMeta(this, this.route.snapshot.params, this.dto.processMeta)
+ .then((dataXWorkerStatus) => {
+ if (dataXWorkerStatus.k8sReplicationControllerCreated) {
+ // Object.assign(this.dto,dataXWorkerStatus)
+ for (let key in dataXWorkerStatus) {
+ this.dto[key] = dataXWorkerStatus[key];
+ }
+ return dataXWorkerStatus;
+ }
+ });
+ }
+
+ logsStatusOnePodLauch() {
+
+ this.reloadStatus().then(status => {
+ this.router.navigate(["."], {relativeTo: this.route, fragment: "profile"});
+ this.tabSelectIndex = 0;
+ })
+
+ }
+
public gotoPage(page: number): void {
// this.tisService._zone.runOutsideAngular(()=>{
this.httpPost('/coredefine/corenodemanage.ajax'
@@ -317,7 +348,7 @@ export class DataxWorkerRunningComponent extends AppFormComponent implements Aft
let params = this.route.snapshot.params;
this.route.fragment.subscribe((fragment) => {
let targetTab = fragment;//['targetTab'];
- // console.log(targetTab);
+ //console.log(targetTab);
switch (targetTab) {
case 'log':
if (!this.podNameSub) {
@@ -436,7 +467,7 @@ export class DataxWorkerRunningComponent extends AppFormComponent implements Aft
cpt.enableComponent();
if (r.success) {
this.dto.processMeta.afterSuccessDelete(this);
- // this.nextStep.emit(Object.assign(new DataxWorkerDTO(), {processMeta: this.dto.processMeta}));
+ // this.nextStep.emit(Object.assign(new DataxWorkerDTO(), {processMeta: this.dto.processMeta}));
}
});
@@ -654,7 +685,7 @@ export class DataxWorkerRunningComponent extends AppFormComponent implements Aft
`
,
- styles:[
+ styles: [
`.union-pod {
font-size: 9px;
color: #5d5d5d;
diff --git a/src/runtime/incr.pod.logs.status.component.ts b/src/runtime/incr.pod.logs.status.component.ts
index b917099..b320ac7 100644
--- a/src/runtime/incr.pod.logs.status.component.ts
+++ b/src/runtime/incr.pod.logs.status.component.ts
@@ -16,7 +16,16 @@
* limitations under the License.
*/
-import {AfterContentInit, AfterViewInit, Component, Input, OnDestroy, ViewChild} from "@angular/core";
+import {
+ AfterContentInit,
+ AfterViewInit,
+ Component,
+ EventEmitter,
+ Input,
+ OnDestroy,
+ Output,
+ ViewChild
+} from "@angular/core";
import {TISService} from "../common/tis.service";
import {AppFormComponent, CurrentCollection, WSMessage} from "../common/basic.form.component";
import {ActivatedRoute, Router} from "@angular/router";
@@ -42,14 +51,15 @@ import {PodsListComponent} from "../base/datax.worker.running.component";
-
+
{{this._selectedPod?.phase}}
-
-
+
+
@@ -59,7 +69,10 @@ import {PodsListComponent} from "../base/datax.worker.running.component";
-
+
@@ -92,15 +105,19 @@ export class IncrPodLogsStatusComponent extends AppFormComponent implements Afte
logMonitorTimeout = false;
_selectedPod: K8sPodState;
+ @Output()
+ afterOnePodRelaunch = new EventEmitter();
+
@Input()
- rcDeployments: Array =[];
+ rcDeployments: Array = [];
// podStatChange: Subject = new Subject();
targetPodChange(targetPod: any) {
- // console.log(event);
+ // console.log(event);
- PodsListComponent.viewPodLog(this.processMeta, this.route, this.router, {name:targetPod});
+ PodsListComponent.viewPodLog(this.processMeta, this.route, this.router, {name: targetPod});
}
+
@Input()
set selectedPod(podStat: K8sPodState) {
// console.log("set selectedPod");
@@ -199,28 +216,29 @@ export class IncrPodLogsStatusComponent extends AppFormComponent implements Afte
relauchIncrProcess() {
this._transactionProcessing = true;
- // this.processMeta.targetNameGetter()
- console.log(this.logType);
+ // this.processMeta.targetNameGetter()
+ // console.log(this.logType);
switch (this.logType) {
case LogType.DATAX_WORKER_POD_LOG:
this.httpPost('/coredefine/corenodemanage.ajax'
- , "event_submit_do_relaunch_pod_process=y&action=datax_action&podName=" + this.selectedPod.name + "&targetName=" + this.processMeta.targetNameGetter(this.route.snapshot.params)// this.processMeta.targetName
- )
- .then((r) => {
-
- if (r.success) {
- this.successNotify(`已经成功触发重启Powerjob实例${this.selectedPod.name}`);
- setTimeout(() => {
- // console.log("navigate");
- this.router.navigate(["/base/datax-worker", "profile"], {relativeTo: this.route});
- this._transactionProcessing = false;
- }, 3000);
- } else {
+ , "event_submit_do_relaunch_pod_process=y&action=datax_action&podName="
+ + this.selectedPod.name + "&targetName=" + this.processMeta.targetNameGetter(this.route.snapshot.params)
+ ).then((r) => {
+
+ if (r.success) {
+ this.successNotify(`已经成功触发重启实例${this.selectedPod.name}`);
+ setTimeout(() => {
+ // console.log("navigate");
+ this.afterOnePodRelaunch.emit();
+ // this.processMeta.endType
this._transactionProcessing = false;
- }
- }, (reason) => {
+ }, 3000);
+ } else {
this._transactionProcessing = false;
- });
+ }
+ }, (reason) => {
+ this._transactionProcessing = false;
+ });
return;
case LogType.INCR_DEPLOY_STATUS_CHANGE:
this.httpPost('/coredefine/corenodemanage.ajax', "event_submit_do_relaunch_incr_process=y&action=core_action")