Skip to content

Commit 893f712

Browse files
committed
Add job information to tooltip
Signed-off-by: Julia Yan <julia.yan@ibm.com>
1 parent a97e8e1 commit 893f712

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/api/IBMi.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,10 @@ export default class IBMi {
11951195
return this.sqlJob !== undefined;
11961196
}
11971197

1198+
public getSqlJobId() {
1199+
return this.sqlJob?.id;
1200+
}
1201+
11981202
/**
11991203
* Generates path to a temp file on the IBM i
12001204
* @param {string} key Key to the temp file to be re-used

src/instantiate.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ async function updateConnectedBar() {
115115
const actionsMenuItem = systemReadOnly ? `` : `[$(file-binary) Actions](command:code-for-ibmi.environment.actions.focus)`;
116116
const debugRunning = await isDebugEngineRunning();
117117
const connectedBarItemTooltips: String[] = systemReadOnly ? [`[System-wide read only](https://codefori.github.io/docs/settings/system/)`] : [];
118+
const sqlJobId = connection.getSqlJobId();
119+
const sqlJobInfo = sqlJobId ? `$(database) Job: ${sqlJobId}` : `$(database) Job: Not available`;
120+
118121
connectedBarItemTooltips.push(
119122
`[$(settings-gear) Settings](command:code-for-ibmi.showAdditionalSettings)`,
120123
terminalMenuItem,
@@ -123,7 +126,8 @@ async function updateConnectedBar() {
123126
debugPTFInstalled(connection) ?
124127
`[$(${debugRunning ? "bug" : "debug"}) Debugger ${((await getDebugServiceDetails(connection)).version)} (${debugRunning ? "on" : "off"})](command:ibmiDebugBrowser.focus)`
125128
:
126-
`[$(debug) No debug PTF](https://codefori.github.io/docs/developing/debug/#required-ptfs)`
129+
`[$(debug) No debug PTF](https://codefori.github.io/docs/developing/debug/#required-ptfs)`,
130+
sqlJobInfo
127131
);
128132
connectedBarItem.tooltip = new vscode.MarkdownString(connectedBarItemTooltips.join(`\n\n---\n\n`), true);
129133
connectedBarItem.tooltip.isTrusted = true;

0 commit comments

Comments
 (0)