Skip to content

Commit

Permalink
feat: show session idle checker in session detail panel
Browse files Browse the repository at this point in the history
  • Loading branch information
ironAiken2 committed Jan 21, 2025
1 parent 5e36c40 commit 627caeb
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/components/backend-ai-session-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3061,6 +3061,22 @@ export default class BackendAISessionList extends BackendAIPage {
}
}

/**
* @param {Object} rowData - the object with the properties related with the rendered item
*/
triggerOpenSessionDetailDrawer(rowData) {
const queryParams = new URLSearchParams(window.location.search);
queryParams.set('sessionDetail', rowData.item.id);
document.dispatchEvent(
new CustomEvent('react-navigate', {
detail: {
pathname: '/job',
search: queryParams.toString(),
},
}),
);
}

/**
* Render session information - category, color, description, etc.
*
Expand Down Expand Up @@ -3101,6 +3117,7 @@ export default class BackendAISessionList extends BackendAIPage {
white-space: pre-wrap;
white-space-collapse: collapse;
word-break: break-all;
cursor: pointer;
}
#session-rename-field {
display: none;
Expand All @@ -3124,8 +3141,13 @@ export default class BackendAISessionList extends BackendAIPage {
</style>
<div class="layout vertical start">
<div class="horizontal center center-justified layout">
<pre id="session-name-field">
${rowData.item[this.sessionNameField]}</pre
<pre
id="session-name-field"
@click="${() => this.triggerOpenSessionDetailDrawer(rowData)}"
@keyup="${() => {}}"
>
${rowData.item[this.sessionNameField]}
</pre
>
${this._isRunning &&
!this._isPreparing(rowData.item.status) &&
Expand Down

0 comments on commit 627caeb

Please sign in to comment.