diff --git a/pages/applications/[app_id].jsx b/pages/applications/[app_id].jsx
index 95f81530..6a3dafa6 100644
--- a/pages/applications/[app_id].jsx
+++ b/pages/applications/[app_id].jsx
@@ -17,15 +17,25 @@ import dynamic from 'next/dynamic'
import { applicationsData } from "../../components/airview-compliance-ui/stories/compliance-table/applications-data";
import { groups, controls, resources } from "../../components/airview-compliance-ui/stories/control-overview/data";
///
+import { MiniStatisticsCard } from "../../components/dashboard";
+import { Stack } from '@mui/material'
+import { Chip } from '@mui/material'
+import Accordion from '@mui/material/Accordion';
+import AccordionSummary from '@mui/material/AccordionSummary';
+import AccordionDetails from '@mui/material/AccordionDetails';
+import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
export default dynamic(() => Promise.resolve(Page), {
- ssr: false,
- });
+ ssr: false,
+});
-function Page({app}) {
- const topBarHeight = 64;
+function Page({ app }) {
+ const topBarHeight = 64;
+ console.log('Page:app: ', app)
+ let data_classification = '';
+ let tier = '';
- const noDataMessage={
+ const noDataMessage = {
title: "No issues",
message: "There are no issues to display for this application",
};
@@ -34,130 +44,207 @@ function Page({app}) {
message: "You do not have the required permissions to view the data for this application",
};
- return (
-
-
-
-
- {app && app.name && {app.name}}
- {app && app.description && {app.description}}
- {/* */}
-
-
-
-
-
- ;
-
- {/* */}
-
-
-
- )
+ return (
+
+
+
+
+
+
+ {app && app.name && {app.name}}
+ {app.app_id && Application ID: {app.app_id}}
+
+
+ {app.data_classification === 'Public' && }
+ {app.data_classification === 'Restricted' && }
+ {app.data_classification === 'Highly Restricted' && }
+ {app.tier && }
+
+
+
+
+ {app && app.description && {app.description}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ aria-controls="panel1a-content"
+ id="panel1a-header"
+ >
+ Issues and Exemptions
+
+
+ ;
+
+
+
+ }
+ aria-controls="panel1a-content"
+ id="panel1a-header"
+ >
+ Controls
+
+
+
+
+
+
+
+
+ {/* */}
+
+
+
+ )
}
export async function getStaticPaths() {
- let pages = [];
- let location = 'services';
- try {
- const apps = await getApplications()
- const pages = apps.map((file) => {
- return '/applications/' + file.app_id
- })
- return {
- fallback: true,
- paths: pages
- }
- } catch (error) {
- console.error(error)
- return {
- fallback: true,
- paths: pages
- }
+ let pages = [];
+ let location = 'services';
+ try {
+ const apps = await getApplications()
+ const pages = apps.map((file) => {
+ return '/applications/' + file.app_id
+ })
+ return {
+ fallback: true,
+ paths: pages
+ }
+ } catch (error) {
+ console.error(error)
+ return {
+ fallback: true,
+ paths: pages
}
+ }
}
export async function getStaticProps(context) {
- try {
- const app = await getApplicationById(context.params.app_id);
- return {
- props: {
- app: app
- },
- };
- } catch (error) {
- console.error(error);
- return {
- props: {
- app: {}
- },
- };
- }
+ try {
+ const app = await getApplicationById(context.params.app_id);
+ return {
+ props: {
+ app: app
+ },
+ };
+ } catch (error) {
+ console.error(error);
+ return {
+ props: {
+ app: {}
+ },
+ };
+ }
}
const ApplicationControls = () => {
- const [state, setControlsData, setResourcesData] =
- useControlOverviewController(() => {
- return new Promise((resolve) => {
- setTimeout(() => {
- resolve(groups);
- }, [500]);
- });
- }, 1);
-
- const handleOnRequestOfControlsData = (id) => {
- setControlsData(id, () => {
- return new Promise((resolve) => {
- setTimeout(() => {
- if (id === 3) resolve("error");
-
- resolve(controls[id]);
- }, [500]);
- });
- });
- };
-
- const handleOnRequestOfResourcesData = (id) => {
- setResourcesData(id, () => {
- return new Promise((resolve) => {
- setTimeout(() => {
- if (id === 3) resolve("error");
-
- resolve(resources[id]);
- }, [500]);
- });
+ const [state, setControlsData, setResourcesData] =
+ useControlOverviewController(() => {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve(groups);
+ }, [500]);
});
- };
-
- const handleOnResourceExemptionDelete = () => {
+ }, 1);
+
+ const handleOnRequestOfControlsData = (id) => {
+ setControlsData(id, () => {
return new Promise((resolve) => {
setTimeout(() => {
- resolve();
- }, [1000]);
+ if (id === 3) resolve("error");
+
+ resolve(controls[id]);
+ }, [500]);
});
- };
-
- const handleOnResourceExemptionSave = () => {
+ });
+ };
+
+ const handleOnRequestOfResourcesData = (id) => {
+ setResourcesData(id, () => {
return new Promise((resolve) => {
setTimeout(() => {
- resolve();
- }, [1000]);
+ if (id === 3) resolve("error");
+
+ resolve(resources[id]);
+ }, [500]);
});
- };
-
- return (
-
- );
+ });
+ };
+
+ const handleOnResourceExemptionDelete = () => {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve();
+ }, [1000]);
+ });
};
-
\ No newline at end of file
+
+ const handleOnResourceExemptionSave = () => {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve();
+ }, [1000]);
+ });
+ };
+
+ return (
+
+ );
+};