Skip to content

Commit 5ab9caa

Browse files
new allignment score page
1 parent f4a6da5 commit 5ab9caa

File tree

3 files changed

+110
-22
lines changed

3 files changed

+110
-22
lines changed

src/components/ExecutiveReportButton.js

Lines changed: 72 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,13 @@ const ExecutiveReportDocument = ({
904904
</Text>
905905
<Text style={[styles.cellDesc, { width: 80, marginLeft: 8, fontSize: 6 }]}>
906906
{(() => {
907-
if (typeof control.tags === 'object') {
908-
console.log('DEBUG: control.tags is an object:', control.tags, 'for control:', control.name);
907+
if (typeof control.tags === "object") {
908+
console.log(
909+
"DEBUG: control.tags is an object:",
910+
control.tags,
911+
"for control:",
912+
control.name
913+
);
909914
}
910915
return control.tags;
911916
})()}
@@ -1274,8 +1279,13 @@ const ExecutiveReportDocument = ({
12741279
<Text style={[styles.cellName, { width: 200, fontSize: 7, marginLeft: 0 }]}>
12751280
{(() => {
12761281
const licenseValue = license.License || license.license || "N/A";
1277-
if (typeof licenseValue === 'object') {
1278-
console.log('DEBUG: license name is an object:', licenseValue, 'full license:', license);
1282+
if (typeof licenseValue === "object") {
1283+
console.log(
1284+
"DEBUG: license name is an object:",
1285+
licenseValue,
1286+
"full license:",
1287+
license
1288+
);
12791289
}
12801290
return licenseValue;
12811291
})()}
@@ -1288,8 +1298,13 @@ const ExecutiveReportDocument = ({
12881298
>
12891299
{(() => {
12901300
const countUsed = license.CountUsed || license.countUsed || "0";
1291-
if (typeof countUsed === 'object') {
1292-
console.log('DEBUG: license.CountUsed is an object:', countUsed, 'full license:', license);
1301+
if (typeof countUsed === "object") {
1302+
console.log(
1303+
"DEBUG: license.CountUsed is an object:",
1304+
countUsed,
1305+
"full license:",
1306+
license
1307+
);
12931308
}
12941309
return countUsed;
12951310
})()}
@@ -1298,9 +1313,15 @@ const ExecutiveReportDocument = ({
12981313
style={[styles.cellName, { width: 60, textAlign: "center", fontSize: 8 }]}
12991314
>
13001315
{(() => {
1301-
const countAvailable = license.CountAvailable || license.countAvailable || "0";
1302-
if (typeof countAvailable === 'object') {
1303-
console.log('DEBUG: license.CountAvailable is an object:', countAvailable, 'full license:', license);
1316+
const countAvailable =
1317+
license.CountAvailable || license.countAvailable || "0";
1318+
if (typeof countAvailable === "object") {
1319+
console.log(
1320+
"DEBUG: license.CountAvailable is an object:",
1321+
countAvailable,
1322+
"full license:",
1323+
license
1324+
);
13041325
}
13051326
return countAvailable;
13061327
})()}
@@ -1313,8 +1334,13 @@ const ExecutiveReportDocument = ({
13131334
>
13141335
{(() => {
13151336
const totalLicenses = license.TotalLicenses || license.totalLicenses || "0";
1316-
if (typeof totalLicenses === 'object') {
1317-
console.log('DEBUG: license.TotalLicenses is an object:', totalLicenses, 'full license:', license);
1337+
if (typeof totalLicenses === "object") {
1338+
console.log(
1339+
"DEBUG: license.TotalLicenses is an object:",
1340+
totalLicenses,
1341+
"full license:",
1342+
license
1343+
);
13181344
}
13191345
return totalLicenses;
13201346
})()}
@@ -1480,17 +1506,27 @@ const ExecutiveReportDocument = ({
14801506
<Text style={[styles.cellName, { width: 120, fontSize: 7, marginLeft: 0 }]}>
14811507
{(() => {
14821508
const deviceName = device.deviceName || "N/A";
1483-
if (typeof deviceName === 'object') {
1484-
console.log('DEBUG: device.deviceName is an object:', deviceName, 'full device:', device);
1509+
if (typeof deviceName === "object") {
1510+
console.log(
1511+
"DEBUG: device.deviceName is an object:",
1512+
deviceName,
1513+
"full device:",
1514+
device
1515+
);
14851516
}
14861517
return deviceName;
14871518
})()}
14881519
</Text>
14891520
<Text style={[styles.cellName, { width: 70, fontSize: 7 }]}>
14901521
{(() => {
14911522
const operatingSystem = device.operatingSystem || "N/A";
1492-
if (typeof operatingSystem === 'object') {
1493-
console.log('DEBUG: device.operatingSystem is an object:', operatingSystem, 'full device:', device);
1523+
if (typeof operatingSystem === "object") {
1524+
console.log(
1525+
"DEBUG: device.operatingSystem is an object:",
1526+
operatingSystem,
1527+
"full device:",
1528+
device
1529+
);
14941530
}
14951531
return operatingSystem;
14961532
})()}
@@ -1506,8 +1542,13 @@ const ExecutiveReportDocument = ({
15061542
>
15071543
{(() => {
15081544
const complianceState = device.complianceState || "Unknown";
1509-
if (typeof complianceState === 'object') {
1510-
console.log('DEBUG: device.complianceState is an object:', complianceState, 'full device:', device);
1545+
if (typeof complianceState === "object") {
1546+
console.log(
1547+
"DEBUG: device.complianceState is an object:",
1548+
complianceState,
1549+
"full device:",
1550+
device
1551+
);
15111552
}
15121553
return complianceState;
15131554
})()}
@@ -1680,8 +1721,13 @@ const ExecutiveReportDocument = ({
16801721
<Text style={[styles.cellName, { width: 140, fontSize: 7, marginLeft: 0 }]}>
16811722
{(() => {
16821723
const displayName = policy.displayName || "N/A";
1683-
if (typeof displayName === 'object') {
1684-
console.log('DEBUG: policy.displayName is an object:', displayName, 'full policy:', policy);
1724+
if (typeof displayName === "object") {
1725+
console.log(
1726+
"DEBUG: policy.displayName is an object:",
1727+
displayName,
1728+
"full policy:",
1729+
policy
1730+
);
16851731
}
16861732
return displayName;
16871733
})()}
@@ -1694,8 +1740,13 @@ const ExecutiveReportDocument = ({
16941740
<Text style={[styles.cellName, { width: 80, fontSize: 7 }]}>
16951741
{(() => {
16961742
const includeApplications = policy.includeApplications || "All";
1697-
if (typeof includeApplications === 'object') {
1698-
console.log('DEBUG: policy.includeApplications is an object:', includeApplications, 'full policy:', policy);
1743+
if (typeof includeApplications === "object") {
1744+
console.log(
1745+
"DEBUG: policy.includeApplications is an object:",
1746+
includeApplications,
1747+
"full policy:",
1748+
policy
1749+
);
16991750
}
17001751
return includeApplications;
17011752
})()}

src/layouts/config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,15 @@ export const nativeMenuItems = [
205205
],
206206
items: [
207207
{
208-
title: "Standards",
208+
title: "Standard Templates",
209209
path: "/tenant/standards/list-standards",
210210
permissions: ["Tenant.Standards.*"],
211211
},
212+
{
213+
title: "Tenant Alignment",
214+
path: "/tenant/standards/tenant-alignment",
215+
permissions: ["Tenant.Standards.*"],
216+
},
212217
{
213218
title: "Best Practice Analyser",
214219
path: "/tenant/standards/bpa-report",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
2+
import { Layout as DashboardLayout } from "/src/layouts/index.js";
3+
import { EyeIcon } from "@heroicons/react/24/outline";
4+
5+
const Page = () => {
6+
const pageTitle = "Tenant Alignment";
7+
8+
const actions = [
9+
{
10+
label: "View Tenant Report",
11+
link: "/tenant/standards/compare?tenantFilter=[tenantFilter]&templateId=[standardId]",
12+
icon: <EyeIcon />,
13+
color: "info",
14+
target: "_self",
15+
},
16+
];
17+
18+
return (
19+
<CippTablePage
20+
title={pageTitle}
21+
apiUrl="/api/ListTenantAlignment"
22+
tenantInTitle={false}
23+
actions={actions}
24+
simpleColumns={["tenantFilter", "standardName", "alignmentScore", "latestDataCollection"]}
25+
queryKey="listTenantAlignment"
26+
/>
27+
);
28+
};
29+
30+
Page.getLayout = (page) => <DashboardLayout>{page}</DashboardLayout>;
31+
32+
export default Page;

0 commit comments

Comments
 (0)