Skip to content

Commit 6455700

Browse files
committed
Add terminal names for commands started form k8s Clusters View
This PR fixes #148. Signed-off-by: Denis Golovin [email protected]
1 parent b6b1786 commit 6455700

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/k8s/build.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ export class Build {
8989

9090
@vsCommand('clusters.openshift.build.showLog', true)
9191
static async showLog(context: { impl: any}): Promise<string> {
92-
const build = await Build.selectBuild(context, "Select a build to see the logs");
92+
const build = await Build.selectBuild(context, "Select a Build to see the logs");
9393
if (build) {
94-
Build.odo.executeInTerminal(Build.command.showLog(build, '-build'));
94+
Build.odo.executeInTerminal(Build.command.showLog(build, '-build'), undefined, `OpenShift: Show '${build}' Build Log`);
9595
}
9696
return null;
9797
}
@@ -102,13 +102,13 @@ export class Build {
102102
if (context) {
103103
resourceId = context.impl.name;
104104
} else {
105-
const name = await Build.selectBuild(context, "select to rebuild");
105+
const name = await Build.selectBuild(context, "Select build to rebuild");
106106
if (name) {
107107
resourceId = name;
108108
}
109109
}
110110
if (resourceId) {
111-
Build.odo.executeInTerminal(Build.command.rebuildFrom(resourceId));
111+
Build.odo.executeInTerminal(Build.command.rebuildFrom(resourceId), undefined, `OpenShift: Rebuild '${resourceId}' Build`);
112112
}
113113
return null;
114114
}
@@ -117,7 +117,7 @@ export class Build {
117117
static async followLog(context: { impl: any}): Promise<string> {
118118
const build = await Build.selectBuild(context, "Select a build to follow the logs");
119119
if (build) {
120-
Build.odo.executeInTerminal(Build.command.followLog(build, '-build'));
120+
Build.odo.executeInTerminal(Build.command.followLog(build, '-build'), undefined, `OpenShift: Follow '${build}' Build Log`);
121121
}
122122
return null;
123123
}

src/k8s/deployment.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class DeploymentConfig {
8383
static async rcShowLog(context: { impl: any }): Promise<string> {
8484
const replica = await DeploymentConfig.selectReplica(context, "Select a Replica to see the logs");
8585
if (replica) {
86-
DeploymentConfig.odo.executeInTerminal(DeploymentConfig.command.showLog(replica));
86+
DeploymentConfig.odo.executeInTerminal(DeploymentConfig.command.showLog(replica), undefined, `OpenShift: Show '${replica}' Replica Log`);
8787
}
8888
return replica;
8989
}
@@ -93,7 +93,7 @@ export class DeploymentConfig {
9393
let deployName: string = context ? context.name : null;
9494
if (!deployName) deployName = await common.selectResourceByName(DeploymentConfig.getDeploymentConfigNames("You have no DeploymentConfigs available to see logs"), "Select a DeploymentConfig to see logs");
9595
if (deployName) {
96-
DeploymentConfig.odo.executeInTerminal(DeploymentConfig.command.showDeploymentConfigLog(deployName));
96+
DeploymentConfig.odo.executeInTerminal(DeploymentConfig.command.showDeploymentConfigLog(deployName), undefined, `OpenShift: Show '${deployName}' DeploymentConfig Log`);
9797
}
9898
return deployName;
9999
}

0 commit comments

Comments
 (0)