identityscope 0.0.0-stage → 0.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +916 -2
- package/SECURITY.md +56 -0
- package/dist/core/audit-readiness.d.ts +158 -0
- package/dist/core/audit-readiness.js +357 -0
- package/dist/core/audit-readiness.js.map +1 -0
- package/dist/core/certs.d.ts +68 -0
- package/dist/core/certs.js +132 -0
- package/dist/core/certs.js.map +1 -0
- package/dist/core/checks.d.ts +133 -0
- package/dist/core/checks.js +512 -0
- package/dist/core/checks.js.map +1 -0
- package/dist/core/cloud-rules.d.ts +20 -0
- package/dist/core/cloud-rules.js +44 -0
- package/dist/core/cloud-rules.js.map +1 -0
- package/dist/core/compare.d.ts +45 -0
- package/dist/core/compare.js +372 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/conditions.d.ts +10 -0
- package/dist/core/conditions.js +201 -0
- package/dist/core/conditions.js.map +1 -0
- package/dist/core/credentials.d.ts +71 -0
- package/dist/core/credentials.js +211 -0
- package/dist/core/credentials.js.map +1 -0
- package/dist/core/datasets.d.ts +53 -0
- package/dist/core/datasets.js +596 -0
- package/dist/core/datasets.js.map +1 -0
- package/dist/core/definition.d.ts +32 -0
- package/dist/core/definition.js +301 -0
- package/dist/core/definition.js.map +1 -0
- package/dist/core/discover.d.ts +32 -0
- package/dist/core/discover.js +105 -0
- package/dist/core/discover.js.map +1 -0
- package/dist/core/engine.d.ts +18 -0
- package/dist/core/engine.js +290 -0
- package/dist/core/engine.js.map +1 -0
- package/dist/core/fields.d.ts +16 -0
- package/dist/core/fields.js +132 -0
- package/dist/core/fields.js.map +1 -0
- package/dist/core/governance-trail.d.ts +211 -0
- package/dist/core/governance-trail.js +557 -0
- package/dist/core/governance-trail.js.map +1 -0
- package/dist/core/http-transport.d.ts +66 -0
- package/dist/core/http-transport.js +247 -0
- package/dist/core/http-transport.js.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.js +16 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/insights.d.ts +176 -0
- package/dist/core/insights.js +417 -0
- package/dist/core/insights.js.map +1 -0
- package/dist/core/joiner-evidence.d.ts +98 -0
- package/dist/core/joiner-evidence.js +254 -0
- package/dist/core/joiner-evidence.js.map +1 -0
- package/dist/core/lab/credential-map.d.ts +50 -0
- package/dist/core/lab/credential-map.js +163 -0
- package/dist/core/lab/credential-map.js.map +1 -0
- package/dist/core/lab/javadate.d.ts +7 -0
- package/dist/core/lab/javadate.js +307 -0
- package/dist/core/lab/javadate.js.map +1 -0
- package/dist/core/lab/jsonpath.d.ts +11 -0
- package/dist/core/lab/jsonpath.js +273 -0
- package/dist/core/lab/jsonpath.js.map +1 -0
- package/dist/core/lab/policy-preview.d.ts +43 -0
- package/dist/core/lab/policy-preview.js +78 -0
- package/dist/core/lab/policy-preview.js.map +1 -0
- package/dist/core/lab/rfc5646.d.ts +2 -0
- package/dist/core/lab/rfc5646.js +421 -0
- package/dist/core/lab/rfc5646.js.map +1 -0
- package/dist/core/lab/transform-impact.d.ts +63 -0
- package/dist/core/lab/transform-impact.js +138 -0
- package/dist/core/lab/transform-impact.js.map +1 -0
- package/dist/core/lab/transform-people.d.ts +61 -0
- package/dist/core/lab/transform-people.js +132 -0
- package/dist/core/lab/transform-people.js.map +1 -0
- package/dist/core/lab/transforms.d.ts +79 -0
- package/dist/core/lab/transforms.js +738 -0
- package/dist/core/lab/transforms.js.map +1 -0
- package/dist/core/lab/velocity.d.ts +33 -0
- package/dist/core/lab/velocity.js +874 -0
- package/dist/core/lab/velocity.js.map +1 -0
- package/dist/core/lab/workflow-health.d.ts +80 -0
- package/dist/core/lab/workflow-health.js +234 -0
- package/dist/core/lab/workflow-health.js.map +1 -0
- package/dist/core/lab/workflows.d.ts +87 -0
- package/dist/core/lab/workflows.js +568 -0
- package/dist/core/lab/workflows.js.map +1 -0
- package/dist/core/lifecycle-gaps.d.ts +192 -0
- package/dist/core/lifecycle-gaps.js +389 -0
- package/dist/core/lifecycle-gaps.js.map +1 -0
- package/dist/core/logs.d.ts +145 -0
- package/dist/core/logs.js +342 -0
- package/dist/core/logs.js.map +1 -0
- package/dist/core/lookup.d.ts +129 -0
- package/dist/core/lookup.js +289 -0
- package/dist/core/lookup.js.map +1 -0
- package/dist/core/model-insights.d.ts +247 -0
- package/dist/core/model-insights.js +474 -0
- package/dist/core/model-insights.js.map +1 -0
- package/dist/core/narrow.d.ts +23 -0
- package/dist/core/narrow.js +137 -0
- package/dist/core/narrow.js.map +1 -0
- package/dist/core/nerm.d.ts +154 -0
- package/dist/core/nerm.js +397 -0
- package/dist/core/nerm.js.map +1 -0
- package/dist/core/operations-watch.d.ts +232 -0
- package/dist/core/operations-watch.js +491 -0
- package/dist/core/operations-watch.js.map +1 -0
- package/dist/core/output/csv.d.ts +6 -0
- package/dist/core/output/csv.js +22 -0
- package/dist/core/output/csv.js.map +1 -0
- package/dist/core/output/html.d.ts +11 -0
- package/dist/core/output/html.js +66 -0
- package/dist/core/output/html.js.map +1 -0
- package/dist/core/output/xlsx.d.ts +3 -0
- package/dist/core/output/xlsx.js +130 -0
- package/dist/core/output/xlsx.js.map +1 -0
- package/dist/core/output/zip.d.ts +16 -0
- package/dist/core/output/zip.js +106 -0
- package/dist/core/output/zip.js.map +1 -0
- package/dist/core/ownership.d.ts +39 -0
- package/dist/core/ownership.js +100 -0
- package/dist/core/ownership.js.map +1 -0
- package/dist/core/patterns.d.ts +11 -0
- package/dist/core/patterns.js +31 -0
- package/dist/core/patterns.js.map +1 -0
- package/dist/core/preview.d.ts +96 -0
- package/dist/core/preview.js +173 -0
- package/dist/core/preview.js.map +1 -0
- package/dist/core/roles.d.ts +125 -0
- package/dist/core/roles.js +420 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/tenant.d.ts +67 -0
- package/dist/core/tenant.js +194 -0
- package/dist/core/tenant.js.map +1 -0
- package/dist/core/threat-signals.d.ts +112 -0
- package/dist/core/threat-signals.js +250 -0
- package/dist/core/threat-signals.js.map +1 -0
- package/dist/core/threat-watch.d.ts +144 -0
- package/dist/core/threat-watch.js +282 -0
- package/dist/core/threat-watch.js.map +1 -0
- package/dist/core/transport.d.ts +82 -0
- package/dist/core/transport.js +312 -0
- package/dist/core/transport.js.map +1 -0
- package/dist/core/types.d.ts +137 -0
- package/dist/core/types.js +10 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/warnings.d.ts +236 -0
- package/dist/core/warnings.js +504 -0
- package/dist/core/warnings.js.map +1 -0
- package/dist/demo/tenant.d.ts +1572 -0
- package/dist/demo/tenant.js +1023 -0
- package/dist/demo/tenant.js.map +1 -0
- package/dist/node/attribute-history.d.ts +22 -0
- package/dist/node/attribute-history.js +86 -0
- package/dist/node/attribute-history.js.map +1 -0
- package/dist/node/changes.d.ts +20 -0
- package/dist/node/changes.js +78 -0
- package/dist/node/changes.js.map +1 -0
- package/dist/node/cli.d.ts +2 -0
- package/dist/node/cli.js +291 -0
- package/dist/node/cli.js.map +1 -0
- package/dist/node/config.d.ts +72 -0
- package/dist/node/config.js +203 -0
- package/dist/node/config.js.map +1 -0
- package/dist/node/credentials.d.ts +13 -0
- package/dist/node/credentials.js +24 -0
- package/dist/node/credentials.js.map +1 -0
- package/dist/node/delivery.d.ts +10 -0
- package/dist/node/delivery.js +105 -0
- package/dist/node/delivery.js.map +1 -0
- package/dist/node/doctor.d.ts +2 -0
- package/dist/node/doctor.js +151 -0
- package/dist/node/doctor.js.map +1 -0
- package/dist/node/drift.d.ts +31 -0
- package/dist/node/drift.js +56 -0
- package/dist/node/drift.js.map +1 -0
- package/dist/node/evidence.d.ts +42 -0
- package/dist/node/evidence.js +129 -0
- package/dist/node/evidence.js.map +1 -0
- package/dist/node/exceptions.d.ts +30 -0
- package/dist/node/exceptions.js +83 -0
- package/dist/node/exceptions.js.map +1 -0
- package/dist/node/history.d.ts +35 -0
- package/dist/node/history.js +74 -0
- package/dist/node/history.js.map +1 -0
- package/dist/node/index.d.ts +7 -0
- package/dist/node/index.js +8 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/keep.d.ts +9 -0
- package/dist/node/keep.js +39 -0
- package/dist/node/keep.js.map +1 -0
- package/dist/node/loader.d.ts +7 -0
- package/dist/node/loader.js +35 -0
- package/dist/node/loader.js.map +1 -0
- package/dist/node/log-files.d.ts +16 -0
- package/dist/node/log-files.js +93 -0
- package/dist/node/log-files.js.map +1 -0
- package/dist/node/monthly.d.ts +41 -0
- package/dist/node/monthly.js +108 -0
- package/dist/node/monthly.js.map +1 -0
- package/dist/node/oauth-login.d.ts +45 -0
- package/dist/node/oauth-login.js +121 -0
- package/dist/node/oauth-login.js.map +1 -0
- package/dist/node/packs.d.ts +32 -0
- package/dist/node/packs.js +43 -0
- package/dist/node/packs.js.map +1 -0
- package/dist/node/privileged-seen.d.ts +11 -0
- package/dist/node/privileged-seen.js +41 -0
- package/dist/node/privileged-seen.js.map +1 -0
- package/dist/node/recipients.d.ts +17 -0
- package/dist/node/recipients.js +51 -0
- package/dist/node/recipients.js.map +1 -0
- package/dist/node/runner.d.ts +51 -0
- package/dist/node/runner.js +298 -0
- package/dist/node/runner.js.map +1 -0
- package/dist/node/runtime.d.ts +12 -0
- package/dist/node/runtime.js +13 -0
- package/dist/node/runtime.js.map +1 -0
- package/dist/node/schedules.d.ts +87 -0
- package/dist/node/schedules.js +141 -0
- package/dist/node/schedules.js.map +1 -0
- package/dist/node/secrets.d.ts +37 -0
- package/dist/node/secrets.js +219 -0
- package/dist/node/secrets.js.map +1 -0
- package/dist/node/support.d.ts +14 -0
- package/dist/node/support.js +133 -0
- package/dist/node/support.js.map +1 -0
- package/dist/node/tenants.d.ts +93 -0
- package/dist/node/tenants.js +255 -0
- package/dist/node/tenants.js.map +1 -0
- package/dist/node/ui-page.d.ts +1 -0
- package/dist/node/ui-page.js +3 -0
- package/dist/node/ui-page.js.map +1 -0
- package/dist/node/ui-server.d.ts +48 -0
- package/dist/node/ui-server.js +2665 -0
- package/dist/node/ui-server.js.map +1 -0
- package/dist/node/write.d.ts +9 -0
- package/dist/node/write.js +53 -0
- package/dist/node/write.js.map +1 -0
- package/dist/reports/builtin.generated.d.ts +1 -0
- package/dist/reports/builtin.generated.js +49 -0
- package/dist/reports/builtin.generated.js.map +1 -0
- package/dist/reports/library.d.ts +6 -0
- package/dist/reports/library.js +18 -0
- package/dist/reports/library.js.map +1 -0
- package/launcher/IdentityScope.cmd +11 -0
- package/package.json +69 -4
- package/reports/access-profile-members.yaml +29 -0
- package/reports/access-profile-membership-counts.yaml +17 -0
- package/reports/access-profiles-without-owner.yaml +16 -0
- package/reports/access-request-audit-trail.yaml +36 -0
- package/reports/accounts-by-source.yaml +19 -0
- package/reports/active-identities-without-manager.yaml +22 -0
- package/reports/aggregation-failures.yaml +29 -0
- package/reports/aggregation-history.yaml +27 -0
- package/reports/all-sources.yaml +16 -0
- package/reports/application-accounts.yaml +32 -0
- package/reports/application-entitlements.yaml +31 -0
- package/reports/campaign-progress.yaml +23 -0
- package/reports/certification-decisions.yaml +31 -0
- package/reports/direct-reports-per-manager.yaml +20 -0
- package/reports/disabled-accounts-of-active-people.yaml +33 -0
- package/reports/duplicate-emails.yaml +16 -0
- package/reports/entitlement-holders.yaml +35 -0
- package/reports/entitlements-held-by-inactive-identities.yaml +31 -0
- package/reports/entitlements-without-owner.yaml +28 -0
- package/reports/identities-by-lifecycle-state.yaml +15 -0
- package/reports/identities-missing-key-attributes.yaml +27 -0
- package/reports/identities-with-processing-errors.yaml +19 -0
- package/reports/identity-attribute-mappings.yaml +27 -0
- package/reports/machine-accounts.yaml +28 -0
- package/reports/managers-and-direct-reports.yaml +23 -0
- package/reports/most-access.yaml +18 -0
- package/reports/new-identities.yaml +24 -0
- package/reports/old-passwords.yaml +35 -0
- package/reports/pending-reviews-by-reviewer.yaml +20 -0
- package/reports/person-access.yaml +31 -0
- package/reports/privileged-access.yaml +29 -0
- package/reports/provisioning-error-causes.yaml +27 -0
- package/reports/provisioning-errors.yaml +32 -0
- package/reports/provisioning-failures.yaml +28 -0
- package/reports/recent-access-requests.yaml +22 -0
- package/reports/recent-activity.yaml +32 -0
- package/reports/recent-leavers.yaml +34 -0
- package/reports/role-members.yaml +29 -0
- package/reports/role-membership-counts.yaml +18 -0
- package/reports/roles-without-owner.yaml +17 -0
- package/reports/sources-needing-attention.yaml +23 -0
- package/reports/stuck-access-requests.yaml +29 -0
- package/reports/team-access.yaml +30 -0
- package/reports/terminated-users-with-active-accounts.yaml +46 -0
- package/reports/uncorrelated-accounts.yaml +38 -0
- package/ui/js/00-setup.js +6 -0
- package/ui/js/01-small-helpers.js +143 -0
- package/ui/js/02-connection.js +150 -0
- package/ui/js/03-health-check.js +17 -0
- package/ui/js/04-library.js +135 -0
- package/ui/js/05-pickers.js +163 -0
- package/ui/js/06-report-view.js +157 -0
- package/ui/js/07-fields.js +85 -0
- package/ui/js/08-designer.js +360 -0
- package/ui/js/09-yaml.js +22 -0
- package/ui/js/10-instant-check.js +171 -0
- package/ui/js/11-lookup.js +161 -0
- package/ui/js/12-tenant.js +115 -0
- package/ui/js/13-source-configuration-and-diagnostics.js +64 -0
- package/ui/js/14-certifications.js +68 -0
- package/ui/js/15-monthly-report.js +24 -0
- package/ui/js/16-ownership.js +39 -0
- package/ui/js/17-compare-tenants.js +102 -0
- package/ui/js/18-audit.js +181 -0
- package/ui/js/19-insights.js +108 -0
- package/ui/js/20-role-mining.js +35 -0
- package/ui/js/21-share-reports.js +45 -0
- package/ui/js/22-partner-overview-all-customer-tenants.js +228 -0
- package/ui/js/23-in-app-guidance.js +217 -0
- package/ui/js/24-role-tools.js +220 -0
- package/ui/js/25-schedules.js +264 -0
- package/ui/js/26-start.js +7 -0
- package/ui/js/27-warnings.js +224 -0
- package/ui/js/28-audit-readiness.js +99 -0
- package/ui/js/29-lifecycle.js +182 -0
- package/ui/js/30-labs.js +265 -0
- package/ui/js/31-build.js +203 -0
- package/ui/js/32-lab-examples.js +148 -0
- package/ui/js/33-finder.js +89 -0
- package/ui/js/34-governance.js +129 -0
- package/ui/js/35-watch.js +266 -0
- package/ui/js/36-model.js +247 -0
- package/ui/js/37-logs-and-watch.js +224 -0
- package/ui/shell.html +112 -0
- package/ui/style.css +350 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// ---------- lookup ----------
|
|
2
|
+
state.lk = { tab: 'person', q: '', matches: null, person: null, sources: null, source: null, filter: '' };
|
|
3
|
+
function renderLookup() {
|
|
4
|
+
var L = state.lk;
|
|
5
|
+
var outer = $('lookup');
|
|
6
|
+
outer.textContent = '';
|
|
7
|
+
var w = el('div', { className: 'wrap', style: 'max-width:1240px' });
|
|
8
|
+
outer.appendChild(w);
|
|
9
|
+
w.appendChild(el('div', { className: 'rhead', style: 'margin-bottom:4px' }, el('span', { className: 'cat-ico', style: 'color:#2457d6;background:#eaf0fd' }, icon('search')),
|
|
10
|
+
el('div', {}, el('h2', { text: 'Lookup' }), el('p', { className: 'desc', text: 'Everything about one person or one source on one page. Read-only.' }))));
|
|
11
|
+
var tabs = el('div', { className: 'tabs' });
|
|
12
|
+
[['person', 'Person', 'people'], ['source', 'Source', 'db'], ['ownership', 'Ownership', 'layers']].forEach(function (t) {
|
|
13
|
+
tabs.appendChild(el('button', { className: 'tab' + (L.tab === t[0] ? ' active' : ''), onclick: function () { L.tab = t[0]; renderLookup(); } }, icon(t[2]), t[1]));
|
|
14
|
+
});
|
|
15
|
+
w.appendChild(tabs);
|
|
16
|
+
if (L.tab === 'person') renderPerson(w); else if (L.tab === 'ownership') renderOwnership(w); else renderSourceLookup(w);
|
|
17
|
+
}
|
|
18
|
+
var searchTimer;
|
|
19
|
+
function renderPerson(w) {
|
|
20
|
+
var L = state.lk;
|
|
21
|
+
var input = el('input', { className: 'input', value: L.q, placeholder: 'Name, username or email (at least 2 characters)', style: 'font-size:15px;padding:11px 12px 11px 36px' });
|
|
22
|
+
var list = el('div');
|
|
23
|
+
input.addEventListener('input', function () {
|
|
24
|
+
L.q = input.value;
|
|
25
|
+
clearTimeout(searchTimer);
|
|
26
|
+
searchTimer = setTimeout(function () {
|
|
27
|
+
if (L.q.trim().length < 2) { L.matches = null; drawMatches(); return; }
|
|
28
|
+
list.textContent = ''; list.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Searching...'));
|
|
29
|
+
var asked = L.q;
|
|
30
|
+
api('/api/people?q=' + encodeURIComponent(asked)).then(function (r) { if (asked === L.q) { L.matches = r.people; drawMatches(); } }).catch(function (e) { list.textContent = ''; list.appendChild(el('div', { className: 'error', text: errorText(e) })); });
|
|
31
|
+
}, 300);
|
|
32
|
+
});
|
|
33
|
+
function drawMatches() {
|
|
34
|
+
list.textContent = '';
|
|
35
|
+
if (!L.matches) return;
|
|
36
|
+
if (!L.matches.length) { list.appendChild(el('div', { className: 'muted', style: 'padding:10px', text: 'Nobody found.' })); return; }
|
|
37
|
+
list.appendChild(el('div', { className: 'matches' }, L.matches.map(function (m) {
|
|
38
|
+
return el('button', { className: 'match' + (L.person && L.person.id === m.id ? ' sel' : ''), onclick: function () { openPerson(m.id); } },
|
|
39
|
+
el('b', { text: m.name }), el('span', { className: 'muted', text: [m.username, m.email, m.department, m.lifecycleState].filter(Boolean).join(' · ') }));
|
|
40
|
+
})));
|
|
41
|
+
}
|
|
42
|
+
w.appendChild(el('section', { className: 'card' }, el('div', { className: 'searchbox' }, icon('search'), input), list));
|
|
43
|
+
drawMatches();
|
|
44
|
+
setTimeout(function () { input.focus(); input.setSelectionRange(input.value.length, input.value.length); }, 0);
|
|
45
|
+
if (L.loading) w.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Reading accounts, access and recent activity...'));
|
|
46
|
+
else if (L.personError) w.appendChild(el('div', { className: 'error', text: L.personError }));
|
|
47
|
+
else if (L.person) w.appendChild(personView(L.person));
|
|
48
|
+
}
|
|
49
|
+
function openPerson(id) {
|
|
50
|
+
var L = state.lk;
|
|
51
|
+
L.loading = true; L.personError = null; renderLookup();
|
|
52
|
+
api('/api/people/' + id).then(function (p) { L.person = p; L.loading = false; L.matches = null; renderLookup(); }).catch(function (e) { L.loading = false; L.personError = errorText(e); renderLookup(); });
|
|
53
|
+
}
|
|
54
|
+
function section(title, count, body) {
|
|
55
|
+
return el('section', { className: 'card' }, el('div', { className: 'card-h' }, el('h3', {}, title, count !== null && count !== undefined ? el('span', { className: 'pill off', text: String(count) }) : null)), body);
|
|
56
|
+
}
|
|
57
|
+
function simpleTable(headers, rows, label) {
|
|
58
|
+
if (!rows.length) return el('div', { className: 'muted', text: 'None.' });
|
|
59
|
+
// Focusable so a long table can be scrolled with the keyboard.
|
|
60
|
+
return el('div', { className: 'table-wrap', style: 'max-height:46vh', tabindex: '0', role: 'region', 'aria-label': label || 'Table: ' + headers.filter(Boolean).join(', ') }, el('table', {},
|
|
61
|
+
el('thead', {}, el('tr', {}, headers.map(function (h) { return el('th', { text: h, style: 'cursor:default' }); }))),
|
|
62
|
+
el('tbody', {}, rows.map(function (r) { return el('tr', {}, r.map(function (v) {
|
|
63
|
+
if (v && v.nodeType) return el('td', {}, v);
|
|
64
|
+
return el('td', { className: v === null || v === undefined || v === '' ? 'empty-cell' : '', text: v === null || v === undefined || v === '' ? '—' : String(v) });
|
|
65
|
+
})); }))));
|
|
66
|
+
}
|
|
67
|
+
function yesNo(v, badWhenYes) { return el('span', { className: v ? (badWhenYes ? 'chg lose' : 'yes') : 'no', text: v ? 'Yes' : 'No' }); }
|
|
68
|
+
function personView(p) {
|
|
69
|
+
var box = el('div');
|
|
70
|
+
var lcBad = p.inactive || /inactive|terminat|disabled|leaver/i.test(p.lifecycleState || '');
|
|
71
|
+
box.appendChild(el('section', { className: 'card' },
|
|
72
|
+
el('div', { className: 'bar', style: 'align-items:flex-start' }, el('div', { className: 'avatar', text: (p.name || '?').split(/\s+/).map(function (x) { return x.charAt(0); }).slice(0, 2).join('').toUpperCase() }),
|
|
73
|
+
el('div', { style: 'flex:1' }, el('h2', { style: 'margin:0;font-size:20px', text: p.name }),
|
|
74
|
+
el('div', { className: 'kv', style: 'margin-top:4px' }, el('span', { text: p.username || '' }), el('span', { text: p.email || 'no email' }), el('span', { text: 'Manager: ' + (p.manager || 'none') }), el('span', { text: 'Profile: ' + (p.identityProfile || '?') }))),
|
|
75
|
+
el('span', { className: 'pill ' + (lcBad ? 'off' : 'on'), text: p.lifecycleState || 'no lifecycle state' }), openInIsc('/ui/a/admin/identities/' + encodeURIComponent(p.id) + '/details/attributes', true)),
|
|
76
|
+
el('div', { className: 'flags' }, p.flags.map(function (f) { return el('div', { className: 'flag ' + f.level, text: f.text }); }))));
|
|
77
|
+
p.notes.forEach(function (n) { box.appendChild(el('div', { className: 'note', text: n })); });
|
|
78
|
+
var byType = {}, srcs = {}, priv = 0, direct = 0;
|
|
79
|
+
p.access.forEach(function (a) { byType[a.type] = (byType[a.type] || 0) + 1; if (a.source) srcs[a.source] = 1; if (a.privileged) priv++; if (a.type === 'ENTITLEMENT' && a.direct) direct++; });
|
|
80
|
+
box.appendChild(el('div', { className: 'bigstats' },
|
|
81
|
+
el('div', { className: 'bigstat' }, el('b', { text: String(p.accounts.length) }), el('span', { text: 'accounts' })),
|
|
82
|
+
el('div', { className: 'bigstat' }, el('b', { text: String(byType.ROLE || 0) }), el('span', { text: 'roles' })),
|
|
83
|
+
el('div', { className: 'bigstat' }, el('b', { text: String(byType.ACCESS_PROFILE || 0) }), el('span', { text: 'access profiles' })),
|
|
84
|
+
el('div', { className: 'bigstat' }, el('b', { text: String(byType.ENTITLEMENT || 0) }), el('span', { text: 'entitlements (' + direct + ' assigned directly)' })),
|
|
85
|
+
el('div', { className: 'bigstat' + (priv ? ' lose' : '') }, el('b', { text: String(priv) }), el('span', { text: 'privileged access items' })),
|
|
86
|
+
el('div', { className: 'bigstat' }, el('b', { text: String(Object.keys(srcs).length) }), el('span', { text: 'sources with access' }))));
|
|
87
|
+
box.appendChild(section('Accounts', p.accounts.length, simpleTable(['Source', 'Account', 'Disabled', 'Locked', 'Privileged', 'Password set'],
|
|
88
|
+
p.accounts.map(function (a) { return [a.source, a.name, yesNo(a.disabled, true), yesNo(a.locked, true), yesNo(a.privileged), (a.passwordLastSet || '').slice(0, 10)]; }))));
|
|
89
|
+
box.appendChild(section('Recent provisioning (30 days)', p.activities.length, simpleTable(['Time', 'Action', 'Sources', 'Status', 'Errors'],
|
|
90
|
+
p.activities.map(function (a) { return [when(a.created), a.action, a.sources, a.status, a.errors.join('; ')]; }))));
|
|
91
|
+
box.appendChild(section('Access', p.access.length, simpleTable(['Type', 'Access', 'Source', 'Privileged', 'Assigned directly'],
|
|
92
|
+
p.access.map(function (a) { return [a.type, a.name, a.source, yesNo(a.privileged), a.type === 'ENTITLEMENT' ? (a.direct ? 'Yes' : 'Through a role or access profile') : 'Yes']; }))));
|
|
93
|
+
box.appendChild(timelineSection(p));
|
|
94
|
+
box.appendChild(section('Access requests', p.requests.length, simpleTable(['Submitted', 'Access', 'Type', 'State'], p.requests.map(function (r) { return [when(r.created), r.name, r.type, r.state]; }))));
|
|
95
|
+
box.appendChild(section('Audit events about this person (30 days)', p.events.length, simpleTable(['Time', 'Event', 'Status', 'By'], p.events.map(function (e) { return [when(e.created), e.name, e.status, e.actor]; }))));
|
|
96
|
+
box.appendChild(section('Identity attributes', p.attributes.length, simpleTable(['Attribute', 'Value'], p.attributes.map(function (a) { return [a.name, a.value]; }))));
|
|
97
|
+
return box;
|
|
98
|
+
}
|
|
99
|
+
function renderSourceLookup(w) {
|
|
100
|
+
var L = state.lk;
|
|
101
|
+
if (L.source || L.sourceLoading || L.sourceError) {
|
|
102
|
+
w.appendChild(el('button', { className: 'btn ghost', style: 'margin-bottom:10px', onclick: function () { L.source = null; L.sourceError = null; renderLookup(); } }, '← All sources'));
|
|
103
|
+
if (L.sourceLoading) w.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Reading counts, aggregations and errors for this source...'));
|
|
104
|
+
else if (L.sourceError) w.appendChild(el('div', { className: 'error', text: L.sourceError }));
|
|
105
|
+
else w.appendChild(sourceView(L.source));
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (!L.sources) {
|
|
109
|
+
w.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Reading sources and their recent aggregations...'));
|
|
110
|
+
api('/api/sources').then(function (r) { L.sources = r; renderLookup(); }).catch(function (e) { L.sources = { sources: [], notes: [errorText(e)] }; renderLookup(); });
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
var f = el('input', { className: 'input', placeholder: 'Filter sources...', value: L.filter, style: 'max-width:320px' });
|
|
114
|
+
var tableBox = el('div');
|
|
115
|
+
function draw() {
|
|
116
|
+
var q = L.filter.toLowerCase();
|
|
117
|
+
var list = L.sources.sources.filter(function (s) { return !q || (s.name + ' ' + (s.type || '') + ' ' + (s.owner || '')).toLowerCase().indexOf(q) >= 0; });
|
|
118
|
+
tableBox.textContent = '';
|
|
119
|
+
tableBox.appendChild(simpleTable(['Source', 'Connection', 'Last aggregation', 'Last success', 'Owner', 'Type'], list.map(function (s) {
|
|
120
|
+
var agg = s.lastAggregation ? el('span', {}, el('span', { className: 'chg ' + (s.lastAggregation.status === 'PASSED' ? 'gain' : 'lose'), text: s.lastAggregation.status === 'PASSED' ? 'Passed' : 'Failed' }), ' ' + ago(s.lastAggregation.created)) : el('span', { className: 'muted', text: 'none in 7 days' });
|
|
121
|
+
return [el('button', { className: 'btn link', style: 'padding:0', text: s.name, onclick: function () { openSource(s.id); } }), el('span', { className: 'chg ' + (s.healthy ? 'gain' : 'lose'), text: s.healthy ? 'OK' : (s.status || '').replace('SOURCE_STATE_', '').replace(/_/g, ' ').toLowerCase() }), agg, s.lastSuccess ? ago(s.lastSuccess) : null, s.owner || null, s.type || null];
|
|
122
|
+
})));
|
|
123
|
+
}
|
|
124
|
+
f.addEventListener('input', function () { L.filter = f.value; draw(); });
|
|
125
|
+
var bad = L.sources.sources.filter(function (s) { return !s.healthy; }).length;
|
|
126
|
+
w.appendChild(el('section', { className: 'card' }, el('div', { className: 'card-h' }, el('h3', { text: 'Sources' }), el('span', { className: 'muted small', text: L.sources.sources.length + ' sources, ' + bad + ' with a connection problem' }), f), tableBox));
|
|
127
|
+
L.sources.notes.forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
|
|
128
|
+
draw();
|
|
129
|
+
}
|
|
130
|
+
function openSource(id) {
|
|
131
|
+
var L = state.lk;
|
|
132
|
+
L.sourceLoading = true; L.sourceError = null; renderLookup();
|
|
133
|
+
api('/api/sources/' + id).then(function (d) { L.source = d; L.sourceLoading = false; renderLookup(); }).catch(function (e) { L.sourceLoading = false; L.sourceError = errorText(e); renderLookup(); });
|
|
134
|
+
}
|
|
135
|
+
function sourceView(d) {
|
|
136
|
+
var s = d.source, box = el('div');
|
|
137
|
+
box.appendChild(el('section', { className: 'card' },
|
|
138
|
+
el('div', { className: 'bar' }, el('h2', { style: 'margin:0;font-size:20px;flex:1', text: s.name }), el('span', { className: 'pill ' + (s.healthy ? 'on' : 'off'), text: s.healthy ? 'Connection OK' : (s.status || '').replace('SOURCE_STATE_', '').replace(/_/g, ' ').toLowerCase() }), openInIsc('/ui/a/admin/connections/sources/' + encodeURIComponent(s.id) + '/menu/base_configuration')),
|
|
139
|
+
el('div', { className: 'kv', style: 'margin-top:6px' }, el('span', { text: s.type || '' }), el('span', { text: 'Owner: ' + (s.owner || 'none') }), el('span', { text: s.authoritative ? 'Authoritative' : 'Not authoritative' }), s.description ? el('span', { text: s.description }) : null)));
|
|
140
|
+
var cnt = d.counts;
|
|
141
|
+
var stat = function (v, label, cls) { return el('div', { className: 'bigstat' + (cls ? ' ' + cls : '') }, el('b', { text: v === null ? '—' : fmtNum(v) }), el('span', { text: label })); };
|
|
142
|
+
box.appendChild(el('div', { className: 'bigstats' }, stat(cnt.accounts, 'accounts'), stat(cnt.uncorrelated, 'not linked to a person', cnt.uncorrelated ? 'lose' : ''), stat(cnt.entitlements, 'entitlements'), stat(cnt.entitlementsWithoutOwner, 'entitlements without owner', cnt.entitlementsWithoutOwner ? 'lose' : ''),
|
|
143
|
+
el('div', { className: 'bigstat' }, el('b', { text: s.lastSuccess ? ago(s.lastSuccess) : 'none' }), el('span', { text: 'last successful aggregation (30 days)' }))));
|
|
144
|
+
var open = function (id, params) { return el('button', { className: 'btn sm', onclick: function () {
|
|
145
|
+
var rep = state.reports.filter(function (x) { return x.definition.id === id; })[0];
|
|
146
|
+
showPage('reports'); select(rep); Object.keys(params).forEach(function (k) { state.paramValues[k] = params[k]; }); renderMain();
|
|
147
|
+
} }, icon('file'), 'Open report'); };
|
|
148
|
+
box.appendChild(el('div', { className: 'bar', style: 'margin-bottom:16px' }, el('span', { className: 'muted', text: 'Reports for this source:' }),
|
|
149
|
+
el('span', {}, 'Unlinked accounts ', open('uncorrelated-accounts', { sources: [s.id] })), el('span', {}, 'Everyone with an account ', open('application-accounts', { sources: [s.id] })), el('span', {}, 'Entitlements without owner ', open('entitlements-without-owner', { sources: [s.id] }))));
|
|
150
|
+
d.notes.forEach(function (n) { box.appendChild(el('div', { className: 'note', text: n })); });
|
|
151
|
+
if (d.usedBy) box.appendChild(section('Used by', null, el('div', {},
|
|
152
|
+
d.usedBy.identityProfiles.length ? simpleTable(['Identity profile', 'How it uses this source'], d.usedBy.identityProfiles.map(function (x) { return [x.name, x.how]; })) : el('div', { className: 'muted', text: 'No identity profile reads this source.' }),
|
|
153
|
+
el('div', { className: 'kv', style: 'margin-top:10px' }, el('span', {}, el('b', { text: d.usedBy.accessProfiles === null ? '\u2014' : fmtNum(d.usedBy.accessProfiles) }), ' access profiles on this source'), el('span', {}, el('b', { text: fmtNum(d.usedBy.mappedAttributes) }), ' identity attribute mappings read it')))));
|
|
154
|
+
box.appendChild(diagnosticsCard(s));
|
|
155
|
+
box.appendChild(sourceConfigCard(s.id));
|
|
156
|
+
box.appendChild(section('Provisioning errors by cause (7 days)', d.causes.length, simpleTable(['Cause', 'Errors'], d.causes.map(function (c) { return [c.cause, c.count]; }))));
|
|
157
|
+
box.appendChild(section('Aggregations (30 days)', d.aggregations.length, simpleTable(['Time', 'Event', 'Status', 'Errors'], d.aggregations.map(function (a) { return [when(a.created), a.name, el('span', { className: 'chg ' + (a.status === 'PASSED' ? 'gain' : 'lose'), text: a.status || '?' }), a.errors]; }))));
|
|
158
|
+
box.appendChild(section('Latest provisioning errors (7 days)', d.errors.length, simpleTable(['Time', 'Action', 'For', 'Error'], d.errors.map(function (e) { return [when(e.created), e.action, e.person, e.error]; }))));
|
|
159
|
+
return box;
|
|
160
|
+
}
|
|
161
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// ---------- tenant ----------
|
|
2
|
+
state.tn = { tab: 'overview', data: {}, days: 1, filter: '' };
|
|
3
|
+
function renderTenant() {
|
|
4
|
+
var T = state.tn;
|
|
5
|
+
var outer = $('tenant-page');
|
|
6
|
+
outer.textContent = '';
|
|
7
|
+
var w = el('div', { className: 'wrap', style: 'max-width:1240px' });
|
|
8
|
+
outer.appendChild(w);
|
|
9
|
+
w.appendChild(el('div', { className: 'rhead', style: 'margin-bottom:4px' }, el('span', { className: 'cat-ico', style: 'color:#0f766e;background:#e0f4f1' }, icon('db')),
|
|
10
|
+
el('div', {}, el('h2', { text: 'Tenant' }), el('p', { className: 'desc', text: 'The size and health of the setup behind the identities: Virtual Appliances, workflows, transforms and API credentials. Read-only.' }))));
|
|
11
|
+
var tabs = el('div', { className: 'tabs' });
|
|
12
|
+
[['overview', 'Overview', 'grid'], ['clusters', 'Virtual Appliances', 'db'], ['workflows', 'Workflows', 'lifecycle'], ['transforms', 'Transforms', 'code'], ['credentials', 'API credentials', 'shield'], ['cmap', 'Credential map', 'eye'], ['rules', 'Rule usage', 'code'], ['compare', 'Compare tenants', 'cols']].forEach(function (t) {
|
|
13
|
+
tabs.appendChild(el('button', { className: 'tab' + (T.tab === t[0] ? ' active' : ''), onclick: function () { T.tab = t[0]; renderTenant(); } }, icon(t[2]), t[1]));
|
|
14
|
+
});
|
|
15
|
+
w.appendChild(tabs);
|
|
16
|
+
if (T.tab === 'compare') { renderCompare2(w); return; }
|
|
17
|
+
if (T.tab === 'credentials') { renderCredentials(w); return; }
|
|
18
|
+
// One home for each: runs and failures, where transforms are used, where credentials are used.
|
|
19
|
+
if (T.tab === 'workflows') { renderWorkflowHealth(w); return; }
|
|
20
|
+
if (T.tab === 'transforms') { renderImpactMap(w); return; }
|
|
21
|
+
if (T.tab === 'cmap') { renderCredentialMap(w); return; }
|
|
22
|
+
if (T.tab === 'rules') { renderRuleUsage(w); return; }
|
|
23
|
+
var key = T.tab;
|
|
24
|
+
var d = T.data[key];
|
|
25
|
+
var reload = el('button', { className: 'btn sm', onclick: function () { delete T.data[key]; renderTenant(); } }, icon('lifecycle'), 'Reload');
|
|
26
|
+
if (!d) {
|
|
27
|
+
w.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Reading from your tenant...'));
|
|
28
|
+
T.data[key] = { loading: true };
|
|
29
|
+
api('/api/tenant/' + T.tab).then(function (r) { T.data[key] = r; }, function (e) { T.data[key] = { error: errorText(e) }; }).then(function () { if (!$('tenant-page').classList.contains('hidden')) renderTenant(); });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (d.loading) { w.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Reading from your tenant...')); return; }
|
|
33
|
+
if (d.error) { w.appendChild(el('div', { className: 'error', text: d.error })); w.appendChild(reload); return; }
|
|
34
|
+
(d.notes || []).forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
|
|
35
|
+
if (T.tab === 'overview') {
|
|
36
|
+
w.appendChild(el('div', { className: 'bigstats' }, d.counts.map(function (c) { return el('div', { className: 'bigstat' }, el('b', { text: c.count === null ? '—' : fmtNum(c.count) }), el('span', { text: c.label })); })));
|
|
37
|
+
w.appendChild(el('div', { className: 'bar' }, reload, el('span', { className: 'muted small', text: 'A dash means the current sign-in or token cannot read that number.' })));
|
|
38
|
+
var gl = el('div', { style: 'margin-top:18px' });
|
|
39
|
+
w.appendChild(gl);
|
|
40
|
+
glance(gl);
|
|
41
|
+
} else if (T.tab === 'clusters') {
|
|
42
|
+
var bad = d.clusters.filter(function (c) { return !c.healthy; }).length;
|
|
43
|
+
w.appendChild(el('div', { className: 'banner ' + (bad ? 'bad' : 'ok') }, el('b', { text: bad ? bad + ' cluster' + (bad > 1 ? 's' : '') + ' need attention' : 'All clusters normal' }), el('span', { text: d.clusters.length + ' clusters' }), el('span', { style: 'flex:1' }), reload));
|
|
44
|
+
d.clusters.forEach(function (c) {
|
|
45
|
+
w.appendChild(section(c.name, c.clients.length, el('div', {},
|
|
46
|
+
el('div', { className: 'kv', style: 'margin-bottom:10px' }, el('span', {}, el('span', { className: 'chg ' + (c.healthy ? 'gain' : 'lose'), text: c.status || (c.healthy ? 'NORMAL' : '?') })), c.type ? el('span', { text: 'Type: ' + c.type }) : null, c.alert ? el('span', { text: 'Alert: ' + c.alert }) : null, c.operational === false ? el('span', { text: 'Not operational' }) : null),
|
|
47
|
+
simpleTable(['Appliance', 'Status', 'Last seen', 'Version', 'IP address'], c.clients.map(function (v) {
|
|
48
|
+
return [v.name, el('span', { className: 'chg ' + (v.healthy ? 'gain' : 'lose'), text: v.status || '?' }), v.sinceLastSeen ? v.sinceLastSeen + ' ago' : when(v.lastSeen), v.version, v.ip];
|
|
49
|
+
}), 'Appliances in ' + c.name))));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
// ---------- API credentials ----------
|
|
56
|
+
state.cr = { expiringDays: 30, unusedDays: 90, only: 'attention', q: '' };
|
|
57
|
+
function credFlagClass(f) { return /^Expired|^Owner|^Expires (today|in [0-9] )/.test(f) ? 'lose' : /^Expires|^Never expires|^Not used|^Never used|^Can change|^All of/.test(f) ? 'off' : 'keep-other'; }
|
|
58
|
+
function renderCredentials(w) {
|
|
59
|
+
var C = state.cr;
|
|
60
|
+
var exp = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Expiring within' }, [7, 14, 30, 60, 90].map(function (n) { return el('option', { value: String(n), text: 'Expiring within ' + n + ' days' }); }));
|
|
61
|
+
exp.value = String(C.expiringDays);
|
|
62
|
+
exp.addEventListener('change', function () { C.expiringDays = Number(exp.value); });
|
|
63
|
+
var un = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Unused for' }, [30, 60, 90, 180, 365].map(function (n) { return el('option', { value: String(n), text: 'Unused for ' + n + '+ days' }); }));
|
|
64
|
+
un.value = String(C.unusedDays);
|
|
65
|
+
un.addEventListener('change', function () { C.unusedDays = Number(un.value); });
|
|
66
|
+
w.appendChild(el('div', { className: 'bar', style: 'margin-bottom:14px' }, el('span', { className: 'muted', style: 'flex:1', text: 'Personal access tokens and API clients: when they expire, when they were last used, whether their owner is still here, and how much they can do. Secrets are never read.' }), exp, un,
|
|
67
|
+
el('button', { className: 'btn primary', disabled: !!C.busy, onclick: function () { runJobInto(C, '/api/credentials/run', { expiringDays: C.expiringDays, unusedDays: C.unusedDays }, renderTenant); } }, icon('play'), C.data ? 'Read again' : 'Read credentials')));
|
|
68
|
+
if (C.busy) { w.appendChild(busyBox(C.busy)); return; }
|
|
69
|
+
if (C.error) { w.appendChild(el('div', { className: 'error', text: C.error })); return; }
|
|
70
|
+
var d = C.data;
|
|
71
|
+
if (!d) return;
|
|
72
|
+
d.notes.forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
|
|
73
|
+
if (d.thisConnection) {
|
|
74
|
+
var dd = d.thisConnection.daysToExpiry;
|
|
75
|
+
w.appendChild(el('div', { className: 'banner ' + (dd !== null && dd <= 14 ? 'bad' : 'ok') }, el('b', { text: 'The token IdentityScope uses (' + d.thisConnection.name + ')' }),
|
|
76
|
+
el('span', { text: d.thisConnection.expires === null ? 'never expires' : dd < 0 ? 'expired ' + (-dd) + ' days ago' : 'expires ' + d.thisConnection.expires.slice(0, 10) + ' (in ' + dd + ' day' + (dd === 1 ? '' : 's') + ')' })));
|
|
77
|
+
}
|
|
78
|
+
var T = d.totals;
|
|
79
|
+
w.appendChild(el('div', { className: 'bigstats' },
|
|
80
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.tokens) }), el('span', { text: 'personal access tokens' })),
|
|
81
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.clients) }), el('span', { text: 'API clients' })),
|
|
82
|
+
el('div', { className: 'bigstat' + (T.expiringSoon ? ' lose' : '') }, el('b', { text: fmtNum(T.expiringSoon) }), el('span', { text: 'expire within ' + d.expiringDays + ' days' })),
|
|
83
|
+
el('div', { className: 'bigstat' + (T.ownerLeft ? ' lose' : '') }, el('b', { text: fmtNum(T.ownerLeft) }), el('span', { text: 'active, owner has left' })),
|
|
84
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.neverExpire) }), el('span', { text: 'tokens that never expire' })),
|
|
85
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.unused) }), el('span', { text: 'unused ' + d.unusedDays + '+ days' })),
|
|
86
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.expired) }), el('span', { text: 'already expired' }))));
|
|
87
|
+
var only = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Show' }, [['attention', 'Needing attention'], ['all', 'All'], ['tokens', 'Personal access tokens'], ['clients', 'API clients']].map(function (o) { return el('option', { value: o[0], text: o[1] }); }));
|
|
88
|
+
only.value = C.only;
|
|
89
|
+
var f = el('input', { className: 'input', placeholder: 'Filter by name or owner...', value: C.q, style: 'max-width:260px', 'aria-label': 'Filter by name or owner' });
|
|
90
|
+
var box = el('div');
|
|
91
|
+
var draw = function () {
|
|
92
|
+
var q = C.q.toLowerCase();
|
|
93
|
+
var list = d.credentials.filter(function (c) {
|
|
94
|
+
if (C.only === 'attention' && !c.flags.length) return false;
|
|
95
|
+
if (C.only === 'tokens' && c.kind !== 'Personal access token') return false;
|
|
96
|
+
if (C.only === 'clients' && c.kind !== 'API client') return false;
|
|
97
|
+
return !q || (c.name + ' ' + (c.owner || '')).toLowerCase().indexOf(q) >= 0;
|
|
98
|
+
});
|
|
99
|
+
box.textContent = '';
|
|
100
|
+
box.appendChild(list.length ? simpleTable(['Type', 'Name', 'Owner', 'Expires', 'Last used', 'Scopes', 'Needs attention'], list.map(function (c) {
|
|
101
|
+
return [c.kind === 'API client' ? 'API client' : 'Token',
|
|
102
|
+
el('span', {}, c.name, c.thisConnection ? el('span', { className: 'chg gain', style: 'margin-left:6px', text: 'used by IdentityScope' }) : null, c.managed ? el('span', { className: 'chg keep-other', style: 'margin-left:6px', text: 'managed by SailPoint' }) : null),
|
|
103
|
+
c.owner ? c.owner + (c.ownerStatus && c.ownerStatus !== 'active' ? ' (' + c.ownerStatus + ')' : '') : null,
|
|
104
|
+
el('span', { style: 'white-space:nowrap', text: c.kind === 'API client' ? 'does not expire' : c.expires === null ? 'never' : c.expires.slice(0, 10) }),
|
|
105
|
+
el('span', { style: 'white-space:nowrap', text: c.lastUsed ? c.lastUsed.slice(0, 10) : 'never' }),
|
|
106
|
+
el('span', { className: 'small', text: c.scopes.length ? c.scopes.join(' ') : 'all of the owner\u2019s rights' }),
|
|
107
|
+
el('span', {}, c.flags.map(function (x) { return el('span', { className: 'chg ' + credFlagClass(x), style: 'margin:0 4px 2px 0;display:inline-block', text: x }); }))];
|
|
108
|
+
})) : el('p', { className: 'muted', text: C.only === 'attention' ? 'Nothing needs attention.' : 'None.' }));
|
|
109
|
+
};
|
|
110
|
+
only.addEventListener('change', function () { C.only = only.value; draw(); });
|
|
111
|
+
f.addEventListener('input', function () { C.q = f.value; draw(); });
|
|
112
|
+
w.appendChild(section('Credentials', d.credentials.length, el('div', {}, el('div', { className: 'bar', style: 'margin-bottom:10px' }, only, f, el('span', { style: 'flex:1' }), downloads(C.job)), box)));
|
|
113
|
+
draw();
|
|
114
|
+
w.appendChild(el('p', { className: 'muted small', text: 'API clients have no expiry date in ISC; their secret can be rotated. "Last used" is updated by SailPoint about once a day. Tokens managed by SailPoint (for example for workflows) are not flagged for never expiring.' }));
|
|
115
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// ---------- source configuration and diagnostics (used by the source page) ----------
|
|
2
|
+
function openInIsc(path, unverified) {
|
|
3
|
+
if (!state.consoleUrl) return null;
|
|
4
|
+
return el('a', { className: 'btn sm', href: state.consoleUrl + path, target: '_blank', rel: 'noopener', title: unverified ? 'Opens the ISC admin console. If the page is not found, tell us the right address.' : 'Opens the ISC admin console' }, icon('eye'), 'Open in ISC');
|
|
5
|
+
}
|
|
6
|
+
function sourceConfigCard(id) {
|
|
7
|
+
var pre = el('pre', { className: 'json' });
|
|
8
|
+
var det = el('details', { className: 'adv' }, el('summary', { text: 'Configuration (secrets hidden)' }), el('div', { className: 'bar', style: 'margin:10px 0' },
|
|
9
|
+
el('button', { className: 'btn sm', onclick: function () { navigator.clipboard.writeText(pre.textContent).then(function () { toast('Copied'); }); } }, icon('copy'), 'Copy')), pre);
|
|
10
|
+
det.addEventListener('toggle', function () {
|
|
11
|
+
if (!det.open || pre.textContent) return;
|
|
12
|
+
pre.textContent = 'Loading...';
|
|
13
|
+
api('/api/sources/' + id + '/config').then(function (r) { pre.textContent = JSON.stringify(r.config, null, 2); }).catch(function (e) { pre.textContent = errorText(e); });
|
|
14
|
+
});
|
|
15
|
+
return el('section', { className: 'card' }, det);
|
|
16
|
+
}
|
|
17
|
+
function diagnosticsCard(s) {
|
|
18
|
+
var card = el('section', { className: 'card' }, el('div', { className: 'card-h' }, el('h3', {}, icon('pulse'), 'Connector diagnostics'), el('span', { className: 'pill ' + (state.diagnostics ? 'on' : 'off'), text: state.diagnostics ? 'on' : 'off' })));
|
|
19
|
+
if (!state.diagnostics) {
|
|
20
|
+
card.appendChild(el('p', { className: 'muted', style: 'margin-top:0', text: 'Test connection, ping cluster and peek change nothing in ISC or in the application, but they make the Virtual Appliance contact the application, and peek shows live data from it. They are off unless you turn them on. Every use is written to logs/diagnostics.log.' }));
|
|
21
|
+
card.appendChild(el('button', { className: 'btn', onclick: function () {
|
|
22
|
+
if (!confirm('Turn on connector diagnostics on this computer? Each action still asks before it runs.')) return;
|
|
23
|
+
api('/api/settings/diagnostics', 'PUT', { enabled: true }).then(function (r) { state.diagnostics = r.diagnostics; renderLookup(); });
|
|
24
|
+
} }, 'Turn on diagnostics'));
|
|
25
|
+
return card;
|
|
26
|
+
}
|
|
27
|
+
var out = el('div', { style: 'margin-top:12px' });
|
|
28
|
+
var run = function (action, extra) {
|
|
29
|
+
var label = { test: 'Test the connection to', ping: 'Ping the VA cluster of', peek: 'Read live objects from' }[action];
|
|
30
|
+
if (!confirm(label + ' "' + s.name + '"?')) return;
|
|
31
|
+
out.textContent = '';
|
|
32
|
+
out.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Waiting for the Virtual Appliance...'));
|
|
33
|
+
api('/api/sources/' + s.id + '/diagnostics', 'POST', Object.assign({ action: action, confirm: true }, extra || {})).then(function (r) {
|
|
34
|
+
out.textContent = '';
|
|
35
|
+
var res = r.result || {};
|
|
36
|
+
if (action === 'peek') {
|
|
37
|
+
var objs = res.resourceObjects || [];
|
|
38
|
+
out.appendChild(el('div', { className: 'muted small', text: objs.length + ' object(s) in ' + (res.elapsedMillis || '?') + ' ms. Shown here only, not saved.' }));
|
|
39
|
+
objs.forEach(function (o) {
|
|
40
|
+
var attrs = o.attributes || {};
|
|
41
|
+
out.appendChild(el('details', { className: 'adv', style: 'margin-top:8px' }, el('summary', { text: (o.name || o.identity || '?') + (o.identity && o.identity !== o.name ? ' (' + o.identity + ')' : '') }),
|
|
42
|
+
simpleTable(['Attribute', 'Value'], Object.keys(attrs).sort().map(function (k) { var v = attrs[k]; return [k, typeof v === 'object' ? JSON.stringify(v) : String(v)]; }))));
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
var good = /success/i.test(res.status || '');
|
|
46
|
+
out.appendChild(el('div', { className: good ? 'success' : 'error', text: (good ? 'Succeeded' : 'Result: ' + (res.status || 'unknown')) + (res.elapsedMillis ? ' in ' + res.elapsedMillis + ' ms' : '') + '.' }));
|
|
47
|
+
if (res.details && Object.keys(res.details).length) out.appendChild(el('pre', { className: 'json', text: JSON.stringify(res.details, null, 2) }));
|
|
48
|
+
}
|
|
49
|
+
}).catch(function (e) { out.textContent = ''; out.appendChild(el('div', { className: 'error', text: errorText(e) })); });
|
|
50
|
+
};
|
|
51
|
+
var objType = el('select', { className: 'input', style: 'width:auto' }, el('option', { value: 'account', text: 'accounts' }), el('option', { value: 'group', text: 'groups' }));
|
|
52
|
+
var count = el('select', { className: 'input', style: 'width:auto' }, [5, 10, 25].map(function (n) { return el('option', { value: String(n), text: String(n) }); }));
|
|
53
|
+
count.value = '10';
|
|
54
|
+
card.appendChild(el('div', { className: 'bar' },
|
|
55
|
+
el('button', { className: 'btn', onclick: function () { run('test'); } }, 'Test connection'),
|
|
56
|
+
el('button', { className: 'btn', onclick: function () { run('ping'); } }, 'Ping VA cluster'),
|
|
57
|
+
el('span', { className: 'muted', style: 'margin-left:10px', text: 'Peek' }), count, objType,
|
|
58
|
+
el('button', { className: 'btn', onclick: function () { run('peek', { objectType: objType.value, maxCount: Number(count.value) }); } }, 'Peek live objects'),
|
|
59
|
+
el('span', { style: 'flex:1' }),
|
|
60
|
+
el('button', { className: 'btn ghost sm', onclick: function () { api('/api/settings/diagnostics', 'PUT', { enabled: false }).then(function (r) { state.diagnostics = r.diagnostics; renderLookup(); }); } }, 'Turn off')));
|
|
61
|
+
card.appendChild(out);
|
|
62
|
+
return card;
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// ---------- certifications ----------
|
|
2
|
+
state.ct = { days: 90, items: true };
|
|
3
|
+
function runJobInto(holder, path, body, rerender) {
|
|
4
|
+
holder.busy = 'Starting...'; holder.error = null; holder.data = null; rerender();
|
|
5
|
+
api(path, 'POST', body || {}).then(function (r) {
|
|
6
|
+
holder.job = r.job;
|
|
7
|
+
pollJob(r.job, function (m) { holder.busy = m; var p = document.querySelector('[data-progress]'); if (p) p.textContent = m; },
|
|
8
|
+
function (s) {
|
|
9
|
+
holder.busy = null; holder.data = s.extra;
|
|
10
|
+
// Anything ISC cut short is shown as a note on the result.
|
|
11
|
+
if (s.warnings && s.warnings.length && holder.data && typeof holder.data === 'object') holder.data.notes = (holder.data.notes || []).concat(s.warnings);
|
|
12
|
+
rerender();
|
|
13
|
+
},
|
|
14
|
+
function (e) { holder.busy = null; holder.error = e; rerender(); });
|
|
15
|
+
}).catch(function (e) { holder.busy = null; holder.error = errorText(e); rerender(); });
|
|
16
|
+
}
|
|
17
|
+
function stopButton() {
|
|
18
|
+
var b = el('button', { className: 'btn sm ghost', title: 'Stop this job. Nothing is changed in ISC; a partly done check is not saved.', onclick: function () {
|
|
19
|
+
if (!state.activeJob) return;
|
|
20
|
+
b.disabled = true; b.textContent = 'Stopping...';
|
|
21
|
+
api('/api/jobs/' + state.activeJob + '/stop', 'POST', {}).catch(function (e) { toast(errorText(e)); });
|
|
22
|
+
} }, icon('x'), 'Stop');
|
|
23
|
+
return b;
|
|
24
|
+
}
|
|
25
|
+
function busyBox(text) { return el('section', { className: 'card' }, el('div', { className: 'progress', style: 'margin:0', role: 'status', 'aria-live': 'polite' }, el('span', { className: 'spinner' }), el('span', { 'data-progress': '1', text: text, style: 'flex:1' }), stopButton())); }
|
|
26
|
+
function pageHead(w, iconName, color, bg, title, desc, right) {
|
|
27
|
+
w.appendChild(el('div', { className: 'rhead', style: 'margin-bottom:16px;align-items:center' }, el('span', { className: 'cat-ico', style: 'color:' + color + ';background:' + bg }, icon(iconName)),
|
|
28
|
+
el('div', { style: 'flex:1' }, el('h2', { text: title }), el('p', { className: 'desc', text: desc })), right || null));
|
|
29
|
+
}
|
|
30
|
+
function progressBar(pct, warn) {
|
|
31
|
+
return el('div', { style: 'display:flex;align-items:center;gap:8px;min-width:140px' }, el('div', { className: 'meter', style: 'flex:1;margin:0' }, el('span', { style: 'width:' + Math.min(100, pct) + '%;' + (warn ? 'background:linear-gradient(90deg,#f59e0b,#d97706)' : '') })), el('span', { className: 'small', text: pct + '%' }));
|
|
32
|
+
}
|
|
33
|
+
function renderCerts() { renderAudit(); }
|
|
34
|
+
function certsTab(w) {
|
|
35
|
+
var C = state.ct;
|
|
36
|
+
var period = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Period' }, [[90, 'Last 90 days'], [180, 'Last 180 days'], [365, 'Last year']].map(function (o) { return el('option', { value: String(o[0]), text: o[1] }); }));
|
|
37
|
+
period.value = String(C.days);
|
|
38
|
+
period.addEventListener('change', function () { C.days = Number(period.value); });
|
|
39
|
+
var items = el('input', { type: 'checkbox', checked: C.items });
|
|
40
|
+
items.addEventListener('change', function () { C.items = items.checked; });
|
|
41
|
+
w.appendChild(el('div', { className: 'bar', style: 'margin-bottom:14px' }, el('span', { className: 'muted', style: 'flex:1', text: 'Campaign progress, reviewers who are behind, and reviews that look rubber-stamped.' }), period, el('label', { className: 'check', title: 'Reads every review item: slower on big campaigns' }, items, 'Approve/revoke counts'),
|
|
42
|
+
el('button', { className: 'btn primary', disabled: !!C.busy, onclick: function () { runJobInto(C, '/api/certifications/run', { days: C.days, items: C.items }, renderCerts); } }, icon('play'), C.data ? 'Read again' : 'Read certifications')));
|
|
43
|
+
if (C.busy) { w.appendChild(busyBox(C.busy)); return; }
|
|
44
|
+
if (C.error) { w.appendChild(el('div', { className: 'error', text: C.error })); return; }
|
|
45
|
+
var d = C.data;
|
|
46
|
+
if (!d) { w.appendChild(el('div', { className: 'empty' }, el('b', { text: 'Are reviews on track?' }), 'Reads campaigns, every reviewer’s progress and their decisions. A certification admin’s token or sign-in sees all reviewers.')); return; }
|
|
47
|
+
d.notes.forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
|
|
48
|
+
var T = d.totals;
|
|
49
|
+
w.appendChild(el('div', { className: 'bigstats' },
|
|
50
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.active) }), el('span', { text: 'active campaigns' })),
|
|
51
|
+
el('div', { className: 'bigstat' + (T.overdue ? ' lose' : '') }, el('b', { text: fmtNum(T.overdue) }), el('span', { text: 'past the deadline' })),
|
|
52
|
+
el('div', { className: 'bigstat' + (T.atRisk ? ' lose' : '') }, el('b', { text: fmtNum(T.atRisk) }), el('span', { text: 'due within 7 days, under 80%' })),
|
|
53
|
+
el('div', { className: 'bigstat' }, el('b', { text: fmtNum(T.openDecisions) }), el('span', { text: 'decisions still open' })),
|
|
54
|
+
el('div', { className: 'bigstat' }, el('b', { text: T.approvedInPeriod + T.revokedInPeriod ? Math.round(T.revokedInPeriod * 100 / (T.approvedInPeriod + T.revokedInPeriod)) + '%' : '—' }), el('span', { text: 'of decisions were revokes' }))));
|
|
55
|
+
w.appendChild(section('Campaigns', d.campaigns.length, simpleTable(['Campaign', 'Type', 'Status', 'Deadline', 'Progress', ''], d.campaigns.map(function (c) {
|
|
56
|
+
var flag = c.overdue ? el('span', { className: 'chg lose', text: 'Overdue' }) : c.atRisk ? el('span', { className: 'chg lose', text: 'At risk' }) : null;
|
|
57
|
+
return [c.name, c.type, c.status, c.deadline ? c.deadline.slice(0, 10) + (c.status === 'ACTIVE' && c.daysLeft !== null ? ' (' + (c.daysLeft >= 0 ? c.daysLeft + ' days left' : -c.daysLeft + ' days late') + ')' : '') : null, progressBar(c.percent, c.overdue || c.atRisk), flag];
|
|
58
|
+
}))));
|
|
59
|
+
w.appendChild(section('Reviewers', d.reviewers.length, el('div', {}, el('div', { className: 'bar', style: 'justify-content:flex-end;margin-bottom:8px' }, el('button', { className: 'btn sm', onclick: function () { wnState().tab = 'reminders'; showPage('warnings'); } }, icon('clock'), 'Remind reviewers before the deadline'), downloads(C.job)),
|
|
60
|
+
simpleTable(['Reviewer', 'Campaigns', 'Reviews', 'Decisions', 'Approved', 'Revoked', 'Approve %', 'Overdue reviews'], d.reviewers.map(function (r) {
|
|
61
|
+
var pct = r.decisionsTotal ? Math.round(r.decisionsMade * 100 / r.decisionsTotal) : 0;
|
|
62
|
+
return [r.name, r.campaigns.join(', '), r.certifications, r.decisionsTotal ? progressBar(pct, r.overdueOpen > 0) : null, r.approved, r.revoked, r.approveRate === null ? null : r.approveRate + '%', r.overdueOpen ? el('span', { className: 'chg lose', text: String(r.overdueOpen) }) : 0];
|
|
63
|
+
})))));
|
|
64
|
+
w.appendChild(section('Reviews that may be rubber-stamped', d.flags.length, d.flags.length ? el('div', {},
|
|
65
|
+
el('p', { className: 'muted small', style: 'margin-top:0', text: 'Everything approved and signed off very fast, or a large review with not a single revoke. A signal worth a conversation, not proof.' }),
|
|
66
|
+
simpleTable(['Reviewer', 'Campaign', 'Review', 'Decisions', 'Why it stands out'], d.flags.map(function (f) { return [f.reviewer, f.campaign, f.certification, f.decisions, f.reason]; }))) : el('div', { className: 'muted', text: 'None found.' })));
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// ---------- monthly report ----------
|
|
2
|
+
state.mr = { month: '' };
|
|
3
|
+
function renderMonthly() { renderInsights(); }
|
|
4
|
+
function monthlyTab(w) {
|
|
5
|
+
var M = state.mr;
|
|
6
|
+
if (!M.data) {
|
|
7
|
+
w.appendChild(el('div', { className: 'progress' }, el('span', { className: 'spinner' }), 'Building the report...'));
|
|
8
|
+
api('/api/monthly' + (M.month ? '?month=' + M.month : '')).then(function (d) { M.data = d; M.month = d.month; renderMonthly(); }).catch(function (e) { w.appendChild(el('div', { className: 'error', text: errorText(e) })); });
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
var d = M.data;
|
|
12
|
+
var sel = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Month' }, (d.months.length ? d.months : [d.month]).map(function (m) { return el('option', { value: m, text: m }); }));
|
|
13
|
+
sel.value = d.month;
|
|
14
|
+
sel.addEventListener('change', function () { M.month = sel.value; M.data = null; renderMonthly(); });
|
|
15
|
+
w.appendChild(el('div', { className: 'bar', style: 'margin-bottom:14px' }, el('span', { style: 'flex:1' }, el('b', { text: 'Monthly report: ' + d.monthLabel }), el('span', { className: 'muted', text: ' — from the instant checks recorded on this computer. Lower is better for every check.' })), sel, el('a', { className: 'btn primary', href: '/api/monthly/download?month=' + d.month + '&k=' + encodeURIComponent(KEY), download: '' }, icon('download'), 'Download (open and print to PDF)')));
|
|
16
|
+
w.appendChild(section('Highlights', null, el('ul', { style: 'margin:0;padding-left:20px' }, d.highlights.map(function (h) { return el('li', { style: 'margin:4px 0', text: h }); }))));
|
|
17
|
+
w.appendChild(section('Daily checks during the month', null, simpleTable(['Check', 'First day', 'Last day', 'Change', 'Days checked', 'Days red / amber', 'Trend'], d.checks.map(function (c) {
|
|
18
|
+
var ch = c.change === null ? null : el('span', { style: 'font-weight:600;color:' + (c.change < 0 ? 'var(--ok)' : c.change > 0 ? 'var(--danger)' : 'var(--text2)'), text: c.change === 0 ? 'no change' : (c.change > 0 ? '+' : '−') + fmtNum(Math.abs(c.change)) + (c.changePercent !== null ? ' (' + (c.changePercent > 0 ? '+' : '') + c.changePercent + '%)' : '') });
|
|
19
|
+
var sp = el('span', { style: 'color:var(--accent)' }, sparkline(c.days.map(function (x) { return { value: x.value }; }), 140, 30));
|
|
20
|
+
return [c.label, c.start === null ? null : fmtNum(c.start), c.end === null ? null : fmtNum(c.end), ch, c.daysChecked, c.daysRed + ' / ' + c.daysAmber, sp];
|
|
21
|
+
}))));
|
|
22
|
+
if (d.snapshot) w.appendChild(section('The tenant today', null, el('div', { className: 'bigstats', style: 'margin:0' }, d.snapshot.map(function (s) { return el('div', { className: 'bigstat' }, el('b', { text: s.count === null ? '—' : fmtNum(s.count) }), el('span', { text: s.label })); }))));
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// ---------- ownership (a Lookup tab) ----------
|
|
2
|
+
state.ow = { filter: '', owner: null };
|
|
3
|
+
function renderOwnership(w) {
|
|
4
|
+
var O = state.ow;
|
|
5
|
+
w.appendChild(el('div', { className: 'bar', style: 'margin-bottom:14px' }, el('span', { className: 'muted', style: 'flex:1', text: 'Who owns sources, roles, access profiles, entitlements, workflows and identity profiles, and what is owned by people who left. Reads every entitlement, so it takes a while on big tenants.' }),
|
|
6
|
+
el('button', { className: 'btn primary', disabled: !!O.busy, onclick: function () { runJobInto(O, '/api/ownership/run', {}, renderLookup); } }, icon('play'), O.data ? 'Read again' : 'Read ownership')));
|
|
7
|
+
if (O.busy) { w.appendChild(busyBox(O.busy)); return; }
|
|
8
|
+
if (O.error) { w.appendChild(el('div', { className: 'error', text: O.error })); return; }
|
|
9
|
+
var d = O.data;
|
|
10
|
+
if (!d) return;
|
|
11
|
+
d.notes.forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
|
|
12
|
+
var types = ['Source', 'Role', 'Access profile', 'Entitlement', 'Workflow', 'Identity profile'];
|
|
13
|
+
w.appendChild(el('div', { className: 'bigstats' }, types.map(function (ty) {
|
|
14
|
+
var total = d.totals[ty] || 0, un = d.unowned[ty] || 0;
|
|
15
|
+
return el('div', { className: 'bigstat' + (un ? ' lose' : '') }, el('b', { text: fmtNum(un) }), el('span', { text: ty.toLowerCase() + 's without owner (of ' + fmtNum(total) + ')' }));
|
|
16
|
+
})));
|
|
17
|
+
var ownerWord = function (st) { return st === 'not found' ? 'no longer in ISC' : st; };
|
|
18
|
+
var left = d.owners.filter(function (o) { return o.status !== 'active'; });
|
|
19
|
+
w.appendChild(el('div', { className: 'banner ' + (d.orphaned.length ? 'bad' : 'ok') }, el('b', { text: d.orphaned.length ? fmtNum(d.orphaned.length) + ' objects are owned by ' + left.length + ' people who left or no longer exist' : 'Every owner is an active identity' }), el('span', { style: 'flex:1' }), downloads(O.job)));
|
|
20
|
+
if (d.orphaned.length) w.appendChild(section('Owned by people who left (hand these over)', d.orphaned.length, simpleTable(['Type', 'Object', 'Source', 'Owner', 'Owner status'], d.orphaned.slice(0, 1000).map(function (x) { return [x.type, x.name, x.source, x.ownerName, el('span', { className: 'chg lose', text: ownerWord(x.ownerStatus) + (x.lifecycleState ? ' (' + x.lifecycleState + ')' : '') })]; }))));
|
|
21
|
+
var f = el('input', { className: 'input', placeholder: 'Filter owners...', value: O.filter, style: 'max-width:280px' });
|
|
22
|
+
var box = el('div');
|
|
23
|
+
var draw = function () {
|
|
24
|
+
var q = O.filter.toLowerCase();
|
|
25
|
+
box.textContent = '';
|
|
26
|
+
box.appendChild(simpleTable(['Owner', 'Status', 'Sources', 'Roles', 'Access profiles', 'Entitlements', 'Workflows', 'Identity profiles', 'Total'], d.owners.filter(function (o) { return !q || (o.name + ' ' + (o.email || '')).toLowerCase().indexOf(q) >= 0; }).slice(0, 500).map(function (o) {
|
|
27
|
+
return [el('button', { className: 'btn link', style: 'padding:0', text: o.name, onclick: function () { O.owner = o.id; renderLookup(); } }), el('span', { className: 'chg ' + (o.status === 'active' ? 'gain' : 'lose'), text: ownerWord(o.status) }), o.counts['Source'] || 0, o.counts['Role'] || 0, o.counts['Access profile'] || 0, o.counts['Entitlement'] || 0, o.counts['Workflow'] || 0, o.counts['Identity profile'] || 0, o.total];
|
|
28
|
+
})));
|
|
29
|
+
};
|
|
30
|
+
f.addEventListener('input', function () { O.filter = f.value; draw(); });
|
|
31
|
+
w.appendChild(section('Owners', d.owners.length, el('div', {}, el('div', { style: 'margin-bottom:10px' }, f), box)));
|
|
32
|
+
draw();
|
|
33
|
+
if (O.owner) {
|
|
34
|
+
var who = d.owners.filter(function (o) { return o.id === O.owner; })[0];
|
|
35
|
+
var mine = d.objects.filter(function (x) { return x.ownerId === O.owner; });
|
|
36
|
+
w.appendChild(section('Owned by ' + (who ? who.name : '?'), mine.length, simpleTable(['Type', 'Object', 'Source'], mine.slice(0, 2000).map(function (x) { return [x.type, x.name, x.source]; }))));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|