MCPcopy Create free account
hub / github.com/Rello/analytics / addItem

Function addItem

js/app.js:1772–1784  ·  view source on GitHub ↗
(shareWith, label, type)

Source from the content-addressed store, hash-verified

1770
1771 const newKeys = new Set();
1772 const addItem = (shareWith, label, type) => {
1773 const key = type + '|' + shareWith;
1774 newKeys.add(key);
1775 if (!existingMap[key]) {
1776 const sharee = OCA.Analytics.Share.buildShareeRow(0, shareWith, label, type, true);
1777 resultElement.appendChild(sharee);
1778 } else {
1779 const elem = existingMap[key].querySelector('#username');
1780 if (elem.innerText !== label && type === OCA.Analytics.SHARE_TYPE_USER) {
1781 elem.innerText = label;
1782 }
1783 }
1784 };
1785
1786 for (let user of jsondata['ocs']['data']['users']) {
1787 addItem(user['value']['shareWith'], user['label'], OCA.Analytics.SHARE_TYPE_USER);

Callers 1

app.jsFile · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected