diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..6a0e7bd --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: "39 17 * * 0" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ javascript ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}" diff --git a/src/pages/ExtractsPage.js b/src/pages/ExtractsPage.js index 4593fe4..a828758 100644 --- a/src/pages/ExtractsPage.js +++ b/src/pages/ExtractsPage.js @@ -16,6 +16,7 @@ import { People, Autorenew as RenewIcon, Keyboard } from "@material-ui/icons"; import FeedbackIcon from "@material-ui/icons/SpeakerNotesOutlined"; import Block from "../components/Block"; import { RIGHT_EXTRACTS } from "../constants"; +import {string} from "prop-types"; const EXTRACTS_URL = `${baseApiUrl}/tools/extracts`; diff --git a/src/pages/RegistersPage.js b/src/pages/RegistersPage.js index 18063ae..bb34265 100644 --- a/src/pages/RegistersPage.js +++ b/src/pages/RegistersPage.js @@ -13,7 +13,7 @@ import { Dialog, DialogContent, DialogTitle, - DialogActions, + DialogActions } from "@material-ui/core"; import { @@ -84,7 +84,6 @@ const RegistersPage = () => { const rights = useSelector((state) => state.core?.user?.i_user?.rights ?? []); const [dialogState, setDialogState] = useState({}); const [popupState, setPopupState] = useState({}); - const REGISTERS_URL = `${baseApiUrl}/tools/registers`; const EXPORTS_URL = `${baseApiUrl}/tools/exports`; const IMPORTS_URL = `${baseApiUrl}/tools/imports`; @@ -141,6 +140,7 @@ const RegistersPage = () => { }); }; + const onDialogClose = (reason) => { if (reason === "escapeKeyDown" || reason === "backdropClick") { return; @@ -165,10 +165,8 @@ const RegistersPage = () => { anchorEl: null, error: null, }); - const fileFormat = values.file.type; let formData = new FormData(); - formData.append("file", values.file); let url_import; @@ -227,7 +225,7 @@ const RegistersPage = () => { }); } }; - + console.log("TOOLS RENDERING") return ( <> {dialogState?.open && ( @@ -515,7 +513,7 @@ const RegistersPage = () => { /> -