Skip to content

Commit

Permalink
frontend: change log copy command deployments to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
BennieMeng committed Apr 12, 2019
1 parent 071eee0 commit 00c147b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ export class PodLoggingComponent implements OnInit, OnDestroy {
this.messageHandlerService.showInfo('缺少机房信息,请联系管理员');
}
const command = this.selectedPod ?
`kubetool log --source ${this.logSource === undefined ? '' : this.logSource} --${this.resourceType} ` +
`kubetool log --source ${this.logSource === undefined ? '' : this.logSource}` +
` --${this.resourceType === 'deployments' ? 'deployment' : this.resourceType} ` +
`${this.resourceName} --pod=${this.selectedPod.metadata.name} --container=${this.selectedContainer} --layout=log` : '';
this.copyService.copy(command);
this.switchCopyButton();
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/app/shared/list-pod/list-pod.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ export class ListPodComponent implements OnDestroy {
this.messageHandlerService.showInfo('缺少机房信息,请联系管理员');
}
const kubeToolCmd = `kubetool log --source ${this.logSource === undefined ? '' : this.logSource} ` +
` --${this.resourceType} ${this.resourceName} --pod=${pod.metadata.name} --layout=log`;
` --${this.resourceType === 'deployments' ? 'deployment' : this.resourceType} ${this.resourceName}` +
` --pod=${pod.metadata.name} --layout=log`;
this.copyService.copy(kubeToolCmd);
this.switchCopyButton();
}
Expand Down

0 comments on commit 00c147b

Please sign in to comment.