|
1 | 1 | // ==UserScript== |
2 | 2 |
|
3 | 3 | // @name More Awesome Azure DevOps (userscript) |
4 | | -// @version 3.7.1 |
| 4 | +// @version 3.7.2 |
5 | 5 | // @author Alejandro Barreto (NI) |
6 | 6 | // @description Makes general improvements to the Azure DevOps experience, particularly around pull requests. Also contains workflow improvements for NI engineers. |
7 | 7 | // @license MIT |
|
474 | 474 | poolAgentsInfoWithCapabilities.value.forEach(agentInfo => { |
475 | 475 | filteredAgentInfo[agentInfo.name] = { |
476 | 476 | id: agentInfo.id, |
477 | | - userCapabilities: agentInfo.userCapabilities, |
478 | | - participatesInRelease: agentInfo.systemCapabilities.PARTICIPATES_IN_RELEASE, |
| 477 | + userCapabilities: agentInfo.userCapabilities || {}, |
479 | 478 | properties: agentInfo.properties, |
480 | 479 | }; |
481 | 480 | }); |
|
492 | 491 | agentRows.forEach(agentRow => { |
493 | 492 | const agentCells = agentRow.querySelectorAll('div'); |
494 | 493 | const agentName = agentCells[1].innerText; |
495 | | - const disableReason = (poolAgentsInfo[agentName].userCapabilities || {}).DISABLE_REASON || null; |
| 494 | + const disableReason = poolAgentsInfo[agentName].userCapabilities.DISABLE_REASON || null; |
496 | 495 |
|
497 | 496 | const rowValue = agentRow.textContent.replace(/[\r\n]/g, '').trim() + disableReason; |
498 | 497 | if (!regexFilter.test(rowValue)) { |
|
558 | 557 | const capabilitiesHolder = document.createElement('div'); |
559 | 558 | capabilitiesHolder.className = 'capabilities-holder'; |
560 | 559 |
|
561 | | - const participatesInRelease = agentInfo.participatesInRelease || null; |
562 | | - if (participatesInRelease === '1') { |
563 | | - const participatesInReleaseElement = document.createElement('span'); |
564 | | - participatesInReleaseElement.className = 'capability-icon release-machine fabric-icon ms-Icon--Rocket'; |
565 | | - participatesInReleaseElement.title = 'PARTICIPATES_IN_RELEASE'; |
566 | | - capabilitiesHolder.append(participatesInReleaseElement); |
| 560 | + const participateInRelease = agentInfo.userCapabilities.PARTICIPATE_IN_RELEASE || null; |
| 561 | + if (participateInRelease === '1') { |
| 562 | + const participateInReleaseElement = document.createElement('span'); |
| 563 | + participateInReleaseElement.className = 'capability-icon release-machine fabric-icon ms-Icon--Rocket'; |
| 564 | + participateInReleaseElement.title = 'PARTICIPATE_IN_RELEASE=1'; |
| 565 | + capabilitiesHolder.append(participateInReleaseElement); |
567 | 566 | } |
568 | 567 |
|
569 | 568 | if (!document.body.classList.contains('agent-arbitration-status-off')) { |
|
0 commit comments