Skip to content

Commit dee7ada

Browse files
authored
add overall requests count (microsoft#211316)
1 parent 64b28fb commit dee7ada

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,12 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane {
421421
data.msgContainer.appendChild($('span', undefined, `${feature.label}: `));
422422
data.msgContainer.appendChild($('span', undefined, ...renderLabelWithIcons(`$(${status.severity === Severity.Error ? errorIcon.id : warningIcon.id}) ${status.message}`)));
423423
}
424-
if (accessData?.current) {
425-
const element = $('span', undefined, nls.localize('requests count', "{0} Requests: {1} (Session)", feature.label, accessData.current.count));
426-
const title = nls.localize('requests count title', "Last request was {0}. Overall Requests: {1}", fromNow(accessData.current.lastAccessed, true, true), accessData.totalCount);
427-
data.elementDisposables.push(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), element, title));
424+
if (accessData?.totalCount > 0) {
425+
const element = $('span', undefined, `${nls.localize('requests count', "{0} Requests: {1} (Overall)", feature.label, accessData.totalCount)}${accessData.current ? nls.localize('session requests count', ", {0} (Session)", accessData.current.count) : ''}`);
426+
if (accessData.current) {
427+
const title = nls.localize('requests count title', "Last request was {0}.", fromNow(accessData.current.lastAccessed, true, true));
428+
data.elementDisposables.push(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), element, title));
429+
}
428430

429431
data.msgContainer.appendChild(element);
430432
}

0 commit comments

Comments
 (0)