MCPcopy Create free account
hub / github.com/error311/FileRise / renderCapabilityBadges

Function renderCapabilityBadges

public/js/adminPanel.js:1947–1956  ·  view source on GitHub ↗
(testState)

Source from the content-addressed store, hash-verified

1945 };
1946
1947 const renderCapabilityBadges = (testState) => {
1948 if (!testState || testState.state === 'idle' || testState.state === 'testing') {
1949 return '';
1950 }
1951 return capabilityOrder.map((key) => {
1952 const label = capabilityLabelMap[key] || key;
1953 const capState = getCapabilityState(key, testState);
1954 return `<span class="sources-capability cap-${capState}" title="${esc(getCapabilityTitle(key, testState, capState))}">${esc(label)}</span>`;
1955 }).join('');
1956 };
1957
1958 const getTestStatus = (id) => {
1959 const entry = (state.testStatus && state.testStatus[id]) ? state.testStatus[id] : {};

Callers 1

renderListFunction · 0.85

Calls 3

getCapabilityStateFunction · 0.85
getCapabilityTitleFunction · 0.85
escFunction · 0.70

Tested by

no test coverage detected