diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index 176d87055e..7cd6f4fd09 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -31,7 +31,7 @@ jobs: run: rm -rf apps/backend - name: Install frontend dev dependencies - run: yarn frontend install --frozen-lockfile + run: yarn workspace @mitre/heimdall-lite install --frozen-lockfile - name: Run frontend tests run: yarn frontend test diff --git a/.gitignore b/.gitignore index 8d3720a0b3..07b0525363 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,7 @@ certs/*.pem .pnp.* # Database Content -data/* \ No newline at end of file +data/* + +# Nx build manager +.nx/* \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ee28db4914..de77515f4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /src # python3/make/compiler is a requirement for node-gyp RUN curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && microdnf install -y python3 make gcc-c++ yarn && microdnf clean all && rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* -COPY package.json yarn.lock lerna.json tsconfig.json postcss.config.js ./ +COPY package.json yarn.lock nx.json tsconfig.json ./ COPY apps/backend/package.json apps/backend/tsconfig.* ./apps/backend/ COPY apps/frontend/package.json apps/frontend/tsconfig.* ./apps/frontend/ COPY libs/hdf-converters/package.json libs/hdf-converters/tsconfig.* ./libs/hdf-converters/ diff --git a/Dockerfile.lite b/Dockerfile.lite index 5a248acbab..2c98fe9811 100644 --- a/Dockerfile.lite +++ b/Dockerfile.lite @@ -15,7 +15,7 @@ WORKDIR /src # python3/make/compiler is a requirement for node-gyp RUN curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && microdnf install -y python3 make gcc-c++ yarn && microdnf clean all && rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* -COPY package.json yarn.lock lerna.json tsconfig.json postcss.config.js ./ +COPY package.json yarn.lock nx.json tsconfig.json ./ COPY apps/frontend/package.json apps/frontend/tsconfig.json ./apps/frontend/ COPY libs/hdf-converters/package.json libs/hdf-converters/tsconfig.* ./libs/hdf-converters/ COPY libs/inspecjs/package.json libs/inspecjs/tsconfig.* ./libs/inspecjs/ diff --git a/apps/frontend/package.json b/apps/frontend/package.json index aa3e2af438..f72b39ceb3 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -14,8 +14,7 @@ ], "scripts": { "prebuild": "rimraf ../../dist/frontend", - "build:tailwind": "tailwindcss -i ./src/tailwind.css -o ./public/static/export/style.css --minify", - "build": "yarn build:tailwind && vue-cli-service build", + "build": "vue-cli-service build", "lint": "vue-cli-service lint", "lint:ci": "vue-cli-service lint --no-fix --maxWarnings 0", "make:component": "vue-cli-service make:component", @@ -25,7 +24,7 @@ "make:view": "vue-cli-service make:view", "prepack": "vue-cli-service build --dest dist && cp ../../README.md README.md && cp package.json package.json.orig && cat package.json.orig | jq '.dependencies = (.dependencies | with_entries(select(.key | contains(\"express\"))))' > package.json", "postpack": "mv package.json.orig package.json && rm README.md", - "start:dev": "vue-cli-service serve & yarn build:tailwind --watch", + "start:dev": "vue-cli-service serve", "test": "jest" }, "dependencies": { @@ -123,6 +122,7 @@ "chai-as-promised": "^7.1.1", "jest": "^27.0.6", "jest-useragent-mock": "^0.1.1", + "nx": "^19.5.3", "sinon": "^18.0.0", "ts-jest": "^29.1.0", "vue-jest": "^3.0.7" @@ -133,5 +133,22 @@ "branch": "/blob/master/", "changelog": "/releases", "issues": "/issues/new/choose", - "readme": "README.md" + "readme": "README.md", + "nx": { + "implicitDependencies": [ + "@mitre/hdf-converters" + ], + "targets": { + "start:dev": { + "dependsOn": [ + "^build" + ] + }, + "test": { + "dependsOn": [ + "^build" + ] + } + } + } } diff --git a/apps/frontend/public/static/export/style.css b/apps/frontend/public/static/export/style.css deleted file mode 100644 index 4a940624b5..0000000000 --- a/apps/frontend/public/static/export/style.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;-webkit-box-sizing:border-box;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;-webkit-font-feature-settings:normal;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Roboto,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{-webkit-font-feature-settings:normal;font-feature-settings:normal;font-family:ui-monospace,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{-webkit-font-feature-settings:inherit;font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#9ca3af;opacity:1}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}input[type=range]::-webkit-slider-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#3b71ca;border:0;border-radius:9999px;cursor:pointer;height:1rem;width:1rem}input[type=range]:disabled::-webkit-slider-thumb,input[type=range]:disabled:focus::-webkit-slider-thumb{background:#a3a3a3}input[type=range]:disabled:active::-webkit-slider-thumb{background:#a3a3a3}input[type=range]::-moz-range-thumb{appearance:none;-moz-appearance:none;-webkit-appearance:none;background:#3b71ca;border:0;border-radius:9999px;cursor:pointer;height:1rem;width:1rem}input[type=range]:disabled::-moz-range-thumb{background:#a3a3a3}input[type=range]::-moz-range-progress{background:#3061af}input[type=range]::-ms-fill-lower{background:#3061af}input[type=range]:focus{outline:none}input[type=range]:focus::-webkit-slider-thumb{background:#3061af}input[type=range]:active::-webkit-slider-thumb{background:#285192}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::-ms-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.collapse{visibility:collapse}.relative{position:relative}.top-0{top:0}.z-10{z-index:10}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-mr-1{margin-right:-.25rem}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.w-1\/2{width:50%}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-36{width:9rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-full{width:100%}.min-w-full{min-width:100%}.shrink{-ms-flex-negative:1;flex-shrink:1}.shrink-0{-ms-flex-negative:0;flex-shrink:0}.border-separate{border-collapse:separate}.border-spacing-x-2{--tw-border-spacing-x:0.5rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.rotate-\[-180deg\]{--tw-rotate:-180deg;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.gap-x-2{-webkit-column-gap:.5rem;-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-6{-webkit-column-gap:1.5rem;-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.overflow-hidden{overflow:hidden}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.fill-\[\#336dec\]{fill:#336dec}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-top:1.5rem}.pb-6,.py-6{padding-bottom:1.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition{-webkit-transition-duration:.15s;transition-duration:.15s;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{-webkit-transition-duration:.15s;transition-duration:.15s;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{-webkit-transition-duration:.2s;transition-duration:.2s}.ease-in-out{-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.\[overflow-anchor\:none\]{overflow-anchor:none}.odd\:bg-gray-100:nth-child(odd){--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.even\:bg-white:nth-child(2n){--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\:z-\[2\]:hover{z-index:2}.focus\:z-\[3\]:focus{z-index:3}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.group[data-te-collapse-collapsed] .group-\[\[data-te-collapse-collapsed\]\]\:mr-0{margin-right:0}.group[data-te-collapse-collapsed] .group-\[\[data-te-collapse-collapsed\]\]\:rotate-0{--tw-rotate:0deg;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-te-collapse-collapsed] .group-\[\[data-te-collapse-collapsed\]\]\:fill-\[\#212529\]{fill:#212529}@media (prefers-reduced-motion:reduce){.motion-reduce\:transition-none{-webkit-transition-property:none;transition-property:none}}@media (min-width:640px){.sm\:block{display:block}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:w-40{width:10rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[10\%_90\%\]{grid-template-columns:10% 90%}.sm\:break-words{overflow-wrap:break-word}.sm\:font-normal{font-weight:400}.sm\:no-underline{text-decoration-line:none}}@media (min-width:768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1024px){.lg\:sticky{position:sticky}.lg\:block{display:block}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:w-32{width:8rem}.lg\:w-36{width:9rem}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:break-normal{overflow-wrap:normal;word-break:normal}.lg\:pl-9{padding-left:2.25rem}}@media (min-width:1280px){.xl\:w-52{width:13rem}.xl\:grid-flow-col{grid-auto-flow:column}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media print{.print\:block{display:block}.print\:hidden{display:none}.print\:border-none{border-style:none}.print\:border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.print\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.print\:text-left{text-align:left}.print\:text-2xl{font-size:1.5rem;line-height:2rem}}.\[\&\:not\(\[data-te-collapse-collapsed\]\)\]\:bg-blue-200:not([data-te-collapse-collapsed]){--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.\[\&\:not\(\[data-te-collapse-collapsed\]\)\]\:text-blue-900:not([data-te-collapse-collapsed]){--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.\[\&\:not\(\[data-te-collapse-collapsed\]\)\]\:\[box-shadow\:inset_0_-1px_0_rgba\(229\2c 231\2c 235\)\]:not([data-te-collapse-collapsed]){-webkit-box-shadow:inset 0 -1px 0 #e5e7eb;box-shadow:inset 0 -1px 0 #e5e7eb}.\[\&\[data-te-dropdown-show\]\]\:grid[data-te-dropdown-show]{display:grid} \ No newline at end of file diff --git a/apps/frontend/public/static/export/template.html b/apps/frontend/public/static/export/template.html deleted file mode 100644 index c685f2a05d..0000000000 --- a/apps/frontend/public/static/export/template.html +++ /dev/null @@ -1,646 +0,0 @@ - - -
- -{{full_code}}
- {{/showCode}}
- Status | -ID | -Severity | -Title | -
---|---|---|---|
-
-
- {{resultStatus.status}}
-
- |
-
-
- {{hdf.wraps.id}}
- |
-
-
-
- {{resultSeverity.severity}}
-
- |
-
- {{hdf.wraps.title}} | -
800-53 Controls & CCIs | -
---|
-
-
- {{#controlTags}}
-
-
- {{.}}
-
- {{/controlTags}}
- |
-
Name | -Value | - - - {{#hdf.segments}} - -
---|---|
Status | -{{status}} | -
Test | -{{code_desc}} | -
Result | -{{message}} | -
Name | -Value | - - - - {{#details}} -
---|---|
{{name}} | -{{value}} | -
{{full_code}}
- {{/showCode}}
- ${n}
-${a}
-`:""} -${l.enable?wC(l,r,c):""} - `,rows:y,column:T}},PC=({rows:s,field:t,order:e})=>s.sort((n,o)=>{let r=n[t],a=o[t];return typeof r=="string"&&(r=r.toLowerCase()),typeof a=="string"&&(a=a.toLowerCase()),ra?e==="desc"?-1:1:0}),NC=(s,t,e)=>{if(!t)return s;const i=n=>{const o=document.createElement("div");return o.innerHTML=n,n=o.textContent||o.innerText||"",n.toString().toLowerCase().match(t.toLowerCase())};return s.filter(n=>{if(e&&typeof e=="string")return i(n[e]);let o=Object.values(n);return e&&Array.isArray(e)&&(o=Object.keys(n).filter(r=>e.includes(r)).map(r=>n[r])),o.filter(r=>i(r)).length>0})},Ip=({rows:s,entries:t,activePage:e})=>{const i=e*t;return s.slice(i,i+Number(t))},un="datatable",Ht=`data-te-${un}`,pn=`te.${un}`,ur=`.${pn}`,BC=`[${Ht}-inner-ref]`,Xl=`[${Ht}-cell-ref]`,HC=`[${Ht}-header-ref]`,VC=`[${Ht}-header-checkbox-ref]`,FC=`[${Ht}-pagination-right-ref]`,WC=`[${Ht}-pagination-left-ref]`,zC=`[${Ht}-pagination-start-ref]`,jC=`[${Ht}-pagination-end-ref]`,YC=`[${Ht}-pagination-nav-ref]`,KC=`[${Ht}-select-ref]`,Gl=`[${Ht}-sort-icon-ref]`,fn=`[${Ht}-row-ref]`,ql=`[${Ht}-row-checkbox-ref]`,UC=`selectRows${ur}`,Dp=`render${ur}`,XC=`rowClick${ur}`,GC=`update${ur}`,qC=``,ZC=``,QC=``,JC=``,tA=``,eA="border-neutral-200 dark:border-neutral-500",iA="border-none",sA="relative float-left -ml-[1.5rem] mr-[6px] mt-[0.15rem] h-[1.125rem] w-[1.125rem] appearance-none rounded-[0.25rem] border-[0.125rem] border-solid border-neutral-300 outline-none before:pointer-events-none before:absolute before:h-[0.875rem] before:w-[0.875rem] before:scale-0 before:rounded-full before:bg-transparent before:opacity-0 before:shadow-[0px_0px_0px_13px_transparent] before:content-[''] checked:border-primary checked:bg-primary checked:before:opacity-[0.16] checked:after:absolute checked:after:-mt-px checked:after:ml-[0.25rem] checked:after:block checked:after:h-[0.8125rem] checked:after:w-[0.375rem] checked:after:rotate-45 checked:after:border-[0.125rem] checked:after:border-l-0 checked:after:border-t-0 checked:after:border-solid checked:after:border-white checked:after:bg-transparent checked:after:content-[''] hover:cursor-pointer hover:before:opacity-[0.04] hover:before:shadow-[0px_0px_0px_13px_rgba(0,0,0,0.6)] focus:shadow-none focus:transition-[border-color_0.2s] focus:before:scale-100 focus:before:opacity-[0.12] focus:before:shadow-[0px_0px_0px_13px_rgba(0,0,0,0.6)] focus:before:transition-[box-shadow_0.2s,transform_0.2s] focus:after:absolute focus:after:z-[1] focus:after:block focus:after:h-[0.875rem] focus:after:w-[0.875rem] focus:after:rounded-[0.125rem] focus:after:content-[''] checked:focus:before:scale-100 checked:focus:before:shadow-[0px_0px_0px_13px_#3b71ca] checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] checked:focus:after:-mt-px checked:focus:after:ml-[0.25rem] checked:focus:after:h-[0.8125rem] checked:focus:after:w-[0.375rem] checked:focus:after:rotate-45 checked:focus:after:rounded-none checked:focus:after:border-[0.125rem] checked:focus:after:border-l-0 checked:focus:after:border-t-0 checked:focus:after:border-solid checked:focus:after:border-white checked:focus:after:bg-transparent dark:border-neutral-600 dark:checked:border-primary dark:checked:bg-primary dark:focus:before:shadow-[0px_0px_0px_13px_rgba(255,255,255,0.4)] dark:checked:focus:before:shadow-[0px_0px_0px_13px_#3b71ca] dark:border-neutral-400",nA="mb-[0.125rem] min-h-[1.5rem] pl-[1.5rem] ml-3 flex items-center",oA="relative float-left -ml-[1.5rem] mr-[6px] mt-[0.15rem] h-[1.125rem] w-[1.125rem] appearance-none rounded-[0.25rem] border-[0.125rem] border-solid border-neutral-300 outline-none before:pointer-events-none before:absolute before:h-[0.875rem] before:w-[0.875rem] before:scale-0 before:rounded-full before:bg-transparent before:opacity-0 before:shadow-[0px_0px_0px_13px_transparent] before:content-[''] checked:border-primary checked:bg-primary checked:before:opacity-[0.16] checked:after:absolute checked:after:-mt-px checked:after:ml-[0.25rem] checked:after:block checked:after:h-[0.8125rem] checked:after:w-[0.375rem] checked:after:rotate-45 checked:after:border-[0.125rem] checked:after:border-l-0 checked:after:border-t-0 checked:after:border-solid checked:after:border-white checked:after:bg-transparent checked:after:content-[''] hover:cursor-pointer hover:before:opacity-[0.04] hover:before:shadow-[0px_0px_0px_13px_rgba(0,0,0,0.6)] focus:shadow-none focus:transition-[border-color_0.2s] focus:before:scale-100 focus:before:opacity-[0.12] focus:before:shadow-[0px_0px_0px_13px_rgba(0,0,0,0.6)] focus:before:transition-[box-shadow_0.2s,transform_0.2s] focus:after:absolute focus:after:z-[1] focus:after:block focus:after:h-[0.875rem] focus:after:w-[0.875rem] focus:after:rounded-[0.125rem] focus:after:content-[''] checked:focus:before:scale-100 checked:focus:before:shadow-[0px_0px_0px_13px_#3b71ca] checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] checked:focus:after:-mt-px checked:focus:after:ml-[0.25rem] checked:focus:after:h-[0.8125rem] checked:focus:after:w-[0.375rem] checked:focus:after:rotate-45 checked:focus:after:rounded-none checked:focus:after:border-[0.125rem] checked:focus:after:border-l-0 checked:focus:after:border-t-0 checked:focus:after:border-solid checked:focus:after:border-white checked:focus:after:bg-transparent dark:border-neutral-600 dark:checked:border-primary dark:checked:bg-primary dark:focus:before:shadow-[0px_0px_0px_13px_rgba(255,255,255,0.4)] dark:checked:focus:before:shadow-[0px_0px_0px_13px_#3b71ca] dark:border-neutral-400",rA="mb-[0.125rem] min-h-[1.5rem] pl-[1.5rem] ml-3 flex items-center",aA="bg-white dark:bg-neutral-800",lA="py-4 pl-1 text-clip overflow-hidden text-[#212529] dark:text-white",cA="focus:outline-none",hA="sticky top-0 z-30",dA="sticky z-10 bg-inherit",uA="hover:bg-neutral-100 dark:hover:bg-neutral-700",pA="pointer-events-none cursor-none text-neutral-400 dark:text-neutral-300",fA="h-[2px] relative w-full overflow-hidden",_A="text-center text-neutral-500 font-ligh text-sm my-4 dark:text-neutral-400",gA="text-neutral-500 dark:text-neutral-300",mA="text-neutral-500 dark:text-neutral-300",bA="pointer-events-none cursor-none",vA="h-full w-[45%] bg-primary-400 dark:bg-primary-600",yA="h-full animate-[progress_3s_ease-in-out_infinite]",TA="pl-2 py-3 font-light text-sm dark:text-neutral-300",EA="border-b",xA="flex md:flex-row justify-end items-center py-2 space-x-4 text-sm flex-col leading-[1.6]",CA="border border-t-0",AA="order-1 my-3 md:order-none md:my-0 md:pr-1",wA="inline-block rounded p-2.5 text-xs font-medium uppercase leading-normal transition duration-150 ease-in-out hover:bg-neutral-100 hover:text-primary-600 focus:text-primary-600 focus:outline-none focus:ring-0 active:text-primary-700 disabled:text-slate-300 disabled:hover:bg-transparent dark:hover:bg-neutral-500 dark:disabled:hover:bg-transparent dark:disabled:text-neutral-600",kA="inline-block rounded p-2.5 font-medium uppercase leading-normal transition duration-150 ease-in-out hover:bg-neutral-100 hover:text-primary-600 focus:text-primary-600 focus:outline-none focus:ring-0 active:text-primary-700 disabled:text-slate-300 disabled:hover:bg-transparent dark:hover:bg-neutral-500 dark:disabled:hover:bg-transparent dark:disabled:text-neutral-600",SA="font-normal order-2 mb-3 md:order-none md:mb-0",OA="inline-block rounded p-2.5 font-medium uppercase leading-normal transition duration-150 ease-in-out hover:bg-neutral-100 hover:text-primary-600 focus:text-primary-600 focus:outline-none focus:ring-0 active:text-primary-700 disabled:text-slate-300 disabled:hover:bg-transparent dark:hover:bg-neutral-500 dark:disabled:hover:bg-transparent dark:disabled:text-neutral-600",IA="font-light",DA="inline-block rounded p-2.5 font-medium uppercase leading-normal transition duration-150 ease-in-out hover:bg-neutral-100 hover:text-primary-600 focus:text-primary-600 focus:outline-none focus:ring-0 active:text-primary-700 disabled:text-slate-300 disabled:hover:bg-transparent dark:hover:bg-neutral-500 dark:disabled:hover:bg-transparent dark:disabled:text-neutral-600",MA="border-b",LA="transition ease-in-out duration-300 motion-reduce:transition-none",$A="whitespace-nowrap text-clip overflow-auto px-[1.4rem] py-4",RA="relative",PA="!bg-neutral-100 dark:!bg-neutral-600",NA="flex items-center space-x-4 order-3 md:order-none",BA="w-[70px]",HA="!py-2",VA="w-[15px] h-[10px] origin-bottom font-black mr-1 opacity-0 text-neutral-500 group-hover:opacity-100 transition hover:ease-in-out transform ease-linear duration-300 motion-reduce:transition-none dark:text-neutral-400",FA="flex flex-row group",WA="[&:nth-child(odd)]:bg-neutral-50 [&:nth-child(odd)]:dark:bg-neutral-700",zA="border",jA="border-b font-normal px-[1.4rem]",YA="text-left text-sm font-light w-full leading-[1.6]",KA={bordered:"boolean",borderless:"boolean",clickableRows:"boolean",defaultValue:"string",edit:"boolean",entries:"(number|string)",entriesOptions:"array",fullPagination:"boolean",hover:"boolean",loading:"boolean",loadingMessage:"string",maxWidth:"(null|number|string)",maxHeight:"(null|number|string)",multi:"boolean",noFoundMessage:"string",pagination:"boolean",selectable:"boolean",sm:"boolean",sortField:"(null|string)",sortOrder:"string",fixedHeader:"boolean",striped:"boolean",rowsText:"string",ofText:"string",allText:"string",forceSort:"boolean",sortIconTemplate:"string",paginationStartIconTemplate:"string",paginationEndIconTemplate:"string",paginationLeftIconTemplate:"string",paginationRightIconTemplate:"string"},UA={bordered:!1,borderless:!1,clickableRows:!1,defaultValue:"-",edit:!1,entries:10,entriesOptions:[10,25,50,200],fixedHeader:!1,fullPagination:!1,hover:!1,loading:!1,loadingMessage:"Loading results...",maxWidth:null,maxHeight:null,multi:!1,noFoundMessage:"No matching results found",pagination:!0,selectable:!1,sm:!1,sortField:null,sortOrder:"asc",striped:!1,rowsText:"Rows per page:",ofText:"of",allText:"All",forceSort:!1,sortIconTemplate:qC,paginationStartIconTemplate:ZC,paginationEndIconTemplate:tA,paginationLeftIconTemplate:QC,paginationRightIconTemplate:JC},XA={label:"string",field:"string",fixed:"(boolean|string)",format:"(function|null)",width:"(number|null)",sort:"boolean",columnIndex:"number"},GA={label:"",field:"",fixed:!1,format:null,width:null,sort:!0,columnIndex:0},qA={table:YA,tableHeader:jA,column:lA,pagination:xA,selectWrapper:BA,scroll:RA,tableBordered:zA,paginationBordered:CA,borderless:iA,checkboxRowWrapper:rA,checkboxRow:oA,checkboxHeaderWrapper:nA,checkboxHeader:sA,row:MA,rowItem:$A,striped:WA,sortIconWrapper:FA,sortIcon:VA,paginationRowsText:IA,paginationNav:SA,paginationButtonsWrapper:AA,hoverRow:uA,borderColor:eA,color:aA,fixedHeader:hA,fixedHeaderBody:dA,selectableRow:PA,rowAnimation:LA,sm:HA,edit:cA,selectItemsWrapper:NA,paginationStartButton:DA,paginationLeftButton:kA,paginationRightButton:OA,paginationEndButton:wA,loadingItemsWrapper:fA,loadingProgressBarWrapper:yA,loadingProgressBar:vA,loadingMessage:_A,loadingPaginationRowsText:mA,loadingPaginationSelectWrapper:bA,loadingPaginationNav:gA,loadingColumn:pA,noFoundMessageWrapper:EA,noFoundMessage:TA},ZA={table:"string",tableHeader:"string",column:"string",pagination:"string",selectWrapper:"string",scroll:"string",tableBordered:"string",paginationBordered:"string",borderless:"string",checkboxRowWrapper:"string",checkboxRow:"string",checkboxHeaderWrapper:"string",checkboxHeader:"string",row:"string",rowItem:"string",striped:"string",sortIconWrapper:"string",sortIcon:"string",paginationRowsText:"string",paginationNav:"string",paginationButtonsWrapper:"string",hoverRow:"string",borderColor:"string",color:"string",fixedHeader:"string",fixedHeaderBody:"string",selectableRow:"string",rowAnimation:"string",sm:"string",edit:"string",selectItemsWrapper:"string",paginationStartButton:"string",paginationLeftButton:"string",paginationRightButton:"string",paginationEndButton:"string",loadingItemsWrapper:"string",loadingProgressBarWrapper:"string",loadingProgressBar:"string",loadingMessage:"string",loadingPaginationRowsText:"string",loadingPaginationSelectWrapper:"string",loadingPaginationNav:"string",loadingColumn:"string",noFoundMessageWrapper:"string",noFoundMessage:"string"};class pr{constructor(t,e={},i={},n={}){this._element=t,this._options=this._getOptions(i),this._classes=this._getClasses(n),this._sortReverse=!1,this._activePage=0,this._search="",this._searchColumn=null,this._paginationLeft=null,this._paginationRight=null,this._paginationStart=null,this._paginationEnd=null,this._select=null,this._selectInstance=null,this._selected=[],this._checkboxes=null,this._headerCheckbox=null,this._rows=this._getRows(e.rows),this._columns=this._getColumns(e.columns),this._element&&(O.setData(t,pn,this),this._perfectScrollbar=null,this._setup())}static get NAME(){return un}get columns(){return this._columns.map((t,e)=>{let i={...GA,field:`field_${e}`,columnIndex:e};return typeof t=="string"?i.label=t:typeof t=="object"&&(i={...i,...t}),L("column",i,XA),i})}get rows(){return this._rows.map((t,e)=>{const i={rowIndex:e};return Array.isArray(t)?this.columns.forEach((n,o)=>{t[o]===0?i[n.field]=t[o]:i[n.field]=t[o]||this._options.defaultValue}):typeof t=="object"&&this.columns.forEach(n=>{t[n.field]===0?i[n.field]=t[n.field]:i[n.field]=t[n.field]||this._options.defaultValue}),i})}get searchResult(){return NC(this.rows,this._search,this._searchColumn)}get computedRows(){let t=[...this.searchResult];return this._options.sortOrder&&(t=PC({rows:t,field:this._options.sortField,order:this._options.sortOrder})),this._options.pagination&&(this._options.entries==="All"?t=Ip({rows:t,entries:t.length,activePage:this._activePage}):t=Ip({rows:t,entries:this._options.entries,activePage:this._activePage})),t}get pages(){return this._options.entries==="All"?1:Math.ceil(this.searchResult.length/this._options.entries)}get navigationText(){const t=this._activePage*this._options.entries;return this.searchResult.length===0?`0 ${this._options.ofText} 0`:this._options.entries==="All"?`1 - ${this.searchResult.length} ${this._options.ofText} ${this.searchResult.length}`:`${t+1} - ${this.computedRows.length+t} ${this._options.ofText} ${this.searchResult.length}`}get tableOptions(){return{classes:this._classes,columns:this.columns,rows:this.computedRows,noFoundMessage:this._options.noFoundMessage,edit:this._options.edit,loading:this._options.loading,loaderClass:this._options.loaderClass,loadingMessage:this._options.loadingMessage,selectable:this._options.selectable,multi:this._options.multi,bordered:this._options.bordered,borderless:this._options.borderless,striped:this._options.striped,hover:this._options.hover,fixedHeader:this._options.fixedHeader,sm:this._options.sm,sortIconTemplate:this._options.sortIconTemplate,pagination:{enable:this._options.pagination,text:this.navigationText,entries:this._options.entries,entriesOptions:this._options.entriesOptions,fullPagination:this._options.fullPagination,rowsText:this._options.rowsText,ofText:this._options.ofText,allText:this._options.allText,paginationStartIconTemplate:this._options.paginationStartIconTemplate,paginationLeftIconTemplate:this._options.paginationLeftIconTemplate,paginationRightIconTemplate:this._options.paginationRightIconTemplate,paginationEndIconTemplate:this._options.paginationEndIconTemplate,classes:this._classes},forceSort:this._options.forceSort}}update(t,e={}){t&&t.rows&&(this._rows=t.rows),t&&t.columns&&(this._columns=t.columns),this._clearClassList(e),this._options=this._getOptions({...this._options,...e}),this._setup(),this._performSort()}dispose(){this._selectInstance&&this._selectInstance.dispose(),O.removeData(this._element,pn),this._removeEventListeners(),this._perfectScrollbar.destroy(),this._element=null}search(t,e){this._search=t,this._searchColumn=e,this._activePage=0,this._options.pagination&&this._toggleDisableState(),this._renderRows(),this._options.maxHeight&&(this._perfectScrollbar.element.scrollTop=0,this._perfectScrollbar.update())}sort(t,e="asc"){this._options.sortOrder=e,typeof t=="string"?this._options.sortField=this.columns.find(n=>n.label===t).field:this._options.sortField=t.field;const i=m.findOne(`[data-te-sort="${this._options.sortField}"]`,this._element);this._activePage=0,this._toggleDisableState(),this._renderRows(),this._setActiveSortIcon(i)}setActivePage(t){t0&&s.stroke()}}function Pn(s,t,e){return e=e||.5,!t||s&&s.x>t.left-e&&s.x l(n,x,y)&&a(n,x)!==0,C=()=>a(o,y)===0||l(o,x,y),A=()=>b||E(),w=()=>!b||C();for(let S=h,k=h;S<=d;++S)T=t[S%r],!T.skip&&(y=c(T[i]),y!==x&&(b=l(y,n,o),v===null&&A()&&(v=a(y,n)===0?S:k),v!==null&&w()&&(f.push(l_({start:v,end:S,loop:u,count:r,style:p})),v=null),k=S,x=y));return v!==null&&f.push(l_({start:v,end:d,loop:u,count:r,style:p})),f}function h_(s,t){const e=[],i=s.segments;for(let n=0;n