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

Function addItem

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

Source from the content-addressed store, hash-verified

1341
1342 const newKeys = new Set();
1343 const addItem = (shareWith, label, type) => {
1344 const key = type + '|' + shareWith;
1345 newKeys.add(key);
1346 if (!existingMap[key]) {
1347 const sharee = OCA.Analytics.Share.buildShareeRow(0, shareWith, label, type, true);
1348 resultElement.appendChild(sharee);
1349 } else {
1350 const elem = existingMap[key].querySelector('#username');
1351 if (elem.innerText !== label && type === OCA.Analytics.SHARE_TYPE_USER) {
1352 elem.innerText = label;
1353 }
1354 }
1355 };
1356
1357 for (let user of jsondata['ocs']['data']['users']) {
1358 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