mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
add overall requests count (#211316)
This commit is contained in:
parent
64b28fbd1b
commit
dee7ada658
|
@ -421,10 +421,12 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane {
|
|||
data.msgContainer.appendChild($('span', undefined, `${feature.label}: `));
|
||||
data.msgContainer.appendChild($('span', undefined, ...renderLabelWithIcons(`$(${status.severity === Severity.Error ? errorIcon.id : warningIcon.id}) ${status.message}`)));
|
||||
}
|
||||
if (accessData?.current) {
|
||||
const element = $('span', undefined, nls.localize('requests count', "{0} Requests: {1} (Session)", feature.label, accessData.current.count));
|
||||
const title = nls.localize('requests count title', "Last request was {0}. Overall Requests: {1}", fromNow(accessData.current.lastAccessed, true, true), accessData.totalCount);
|
||||
if (accessData?.totalCount > 0) {
|
||||
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) : ''}`);
|
||||
if (accessData.current) {
|
||||
const title = nls.localize('requests count title', "Last request was {0}.", fromNow(accessData.current.lastAccessed, true, true));
|
||||
data.elementDisposables.push(this._hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), element, title));
|
||||
}
|
||||
|
||||
data.msgContainer.appendChild(element);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue