diff --git a/Jenkinsfile b/Jenkinsfile index 2cd90e8cfc5..91ff20e3ac3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,8 @@ def stableBranch = "${serie}.x" def devBranch = "dev-${serie}.x" env.REF_BRANCH = stableBranch env.PROJECT='centreon-web' -if (env.BRANCH_NAME.startsWith('release-')) { + +if (env.BRANCH_NAME.startsWith("hotfix-") || env.BRANCH_NAME.startsWith("release-")) { env.BUILD = 'RELEASE' env.DELIVERY_STAGE = 'Delivery to testing' env.DOCKER_STAGE = 'Docker packaging' diff --git a/tests/e2e/cypress/tsconfig.json b/tests/e2e/cypress/tsconfig.json index 65f715cad16..ab04ebfbadf 100644 --- a/tests/e2e/cypress/tsconfig.json +++ b/tests/e2e/cypress/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../node_modules/@centreon/frontend-core/tsconfig/index", + "extends": "../node_modules/centreon-frontend/packages/frontend-config/tsconfig/index", "compilerOptions": { "baseUrl": "..", "esModuleInterop": true, diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index b485cbb8289..8e01e87f501 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -10,12 +10,12 @@ "devDependencies": { "@babel/core": "^7.14.0", "@babel/preset-env": "^7.14.1", - "@centreon/frontend-core": "github:centreon/frontend-core", "@cypress/webpack-preprocessor": "^5.7.0", "@types/cypress": "^1.1.3", "@types/cypress-cucumber-preprocessor": "^4.0.0", "@types/node": "^14.14.44", "babel-loader": "^8.2.2", + "centreon-frontend": "git+https://centreon@github.com/centreon/centreon-frontend.git#21.10.x", "cypress": "^8.1.0", "cypress-cucumber-preprocessor": "^4.1.0", "eslint-plugin-cypress": "^2.11.3", @@ -1665,54 +1665,6 @@ "node": ">=6.9.0" } }, - "node_modules/@centreon/frontend-core": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/centreon/frontend-core.git#a48ed62b17e0e8d8f1990f48d03afb2474ff916f", - "dev": true, - "license": "GPL-2.0", - "peerDependencies": { - "@babel/core": "^7.x", - "@babel/plugin-proposal-class-properties": "7.x", - "@babel/preset-env": "7.x", - "@babel/preset-react": "7.x", - "@testing-library/jest-dom": "5.x", - "@testing-library/react": "11.x", - "@typescript-eslint/eslint-plugin": "^4.x", - "@typescript-eslint/parser": "^4.x", - "babel-eslint": "^10.x", - "babel-jest": "26.x", - "babel-loader": "8.x", - "babel-merge": "3.x", - "cache-loader": "4.x", - "clean-webpack-plugin": "^3.x", - "css-loader": "5.x", - "eslint": "7.x", - "eslint-config-airbnb": "18.x", - "eslint-config-airbnb-base": "^14.x", - "eslint-config-prettier": "8.x", - "eslint-import-resolver-alias": "1.x", - "eslint-plugin-babel": "5.x", - "eslint-plugin-import": "2.x", - "eslint-plugin-jsx-a11y": "6.x", - "eslint-plugin-prefer-arrow-functions": "3.x", - "eslint-plugin-prettier": "3.x", - "eslint-plugin-react": "7.x", - "eslint-plugin-react-hooks": "4.x", - "eslint-plugin-sort-keys-fix": "1.x", - "eslint-plugin-typescript-sort-keys": "1.x", - "fork-ts-checker-webpack-plugin": "6.x", - "identity-obj-proxy": "3.x", - "jest": "26.x", - "mini-css-extract-plugin": "1.x", - "node-sass": "5.x", - "prettier": "2.x", - "resolve-url-loader": "3.x", - "sass-loader": "11.x", - "ts-loader": "8.x", - "typescript": "4.x", - "webpack-merge": "5.x" - } - }, "node_modules/@cypress/browserify-preprocessor": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@cypress/browserify-preprocessor/-/browserify-preprocessor-3.0.1.tgz", @@ -2004,6 +1956,405 @@ "ms": "^2.1.1" } }, + "node_modules/@dnd-kit/accessibility": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@dnd-kit/accessibility/-/accessibility-3.0.1.tgz", + "integrity": "sha512-HXRrwS9YUYQO9lFRc/49uO/VICbM+O+ZRpFDe9Pd1rwVv2PCNkRiTZRdxrDgng/UkvdC3Re9r2vwPpXXrWeFzg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/accessibility/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/@dnd-kit/core": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-4.0.3.tgz", + "integrity": "sha512-uT1uHZxKx3iEkupmLfknMIvbykMJSetoXXmra6sGGvtWy+OMKrWm3axH2c90+JC/q6qaeKs2znd3Qs8GLnCa5Q==", + "dev": true, + "dependencies": { + "@dnd-kit/accessibility": "^3.0.0", + "@dnd-kit/utilities": "^3.0.1", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/core/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/@dnd-kit/modifiers": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/modifiers/-/modifiers-4.0.0.tgz", + "integrity": "sha512-4OkNTamneH9u3YMJqG6yJ6cwFoEd/4yY9BF39TgmDh9vyMK2MoPZFVAV0vOEm193ZYsPczq3Af5tJFtJhR9jJQ==", + "dev": true, + "dependencies": { + "@dnd-kit/utilities": "^3.0.0", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@dnd-kit/core": "^4.0.0" + } + }, + "node_modules/@dnd-kit/modifiers/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/@dnd-kit/sortable": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/sortable/-/sortable-5.1.0.tgz", + "integrity": "sha512-CPyiUHbTrSYzhddfgdeoX0ERg/dEyVKIWx9+4O6uqpoppo84SXCBHVFiFBRVpQ9wtpsXs7prtUAnAUTcvFQTZg==", + "dev": true, + "dependencies": { + "@dnd-kit/utilities": "^3.0.0", + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@dnd-kit/core": "^4.0.2", + "react": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/sortable/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/@dnd-kit/utilities": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/utilities/-/utilities-3.2.0.tgz", + "integrity": "sha512-h65/pn2IPCCIWwdlR2BMLqRkDxpTEONA+HQW3n765HBijLYGyrnTCLa2YQt8VVjjSQD6EfFlTE6aS2Q/b6nb2g==", + "dev": true, + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@dnd-kit/utilities/node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + }, + "node_modules/@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "dev": true + }, + "node_modules/@material-ui/core": { + "version": "4.12.4", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.4.tgz", + "integrity": "sha512-tr7xekNlM9LjA6pagJmL8QCgZXaubWUwkJnoYcMKd4gw/t4XiyvnTkjdGrUVicyB2BsdaAv1tvow45bPM4sSwQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@material-ui/styles": "^4.11.5", + "@material-ui/system": "^4.12.2", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.3", + "@types/react-transition-group": "^4.2.0", + "clsx": "^1.0.4", + "hoist-non-react-statics": "^3.3.2", + "popper.js": "1.16.1-lts", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0", + "react-transition-group": "^4.4.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/material-ui" + }, + "peerDependencies": { + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/core/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@material-ui/core/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/@material-ui/icons": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-4.11.3.tgz", + "integrity": "sha512-IKHlyx6LDh8n19vzwH5RtHIOHl9Tu90aAAxcbWME6kp4dmvODM3UvOHJeMIDzUbd4muuJKHmlNoBN+mDY4XkBA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.4.4" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "@material-ui/core": "^4.0.0", + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/icons/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@material-ui/icons/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/@material-ui/lab": { + "version": "4.0.0-alpha.61", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.61.tgz", + "integrity": "sha512-rSzm+XKiNUjKegj8bzt5+pygZeckNLOr+IjykH8sYdVk7dE9y2ZuUSofiMV2bJk3qU+JHwexmw+q0RyNZB9ugg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@material-ui/utils": "^4.11.3", + "clsx": "^1.0.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "@material-ui/core": "^4.12.1", + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/lab/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@material-ui/lab/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/@material-ui/styles": { + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.5.tgz", + "integrity": "sha512-o/41ot5JJiUsIETME9wVLAJrmIWL3j0R0Bj2kCOLbSfqEkKf0fmaPt+5vtblUh5eXr2S+J/8J3DaCb10+CzPGA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@emotion/hash": "^0.8.0", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.3", + "clsx": "^1.0.4", + "csstype": "^2.5.2", + "hoist-non-react-statics": "^3.3.2", + "jss": "^10.5.1", + "jss-plugin-camel-case": "^10.5.1", + "jss-plugin-default-unit": "^10.5.1", + "jss-plugin-global": "^10.5.1", + "jss-plugin-nested": "^10.5.1", + "jss-plugin-props-sort": "^10.5.1", + "jss-plugin-rule-value-function": "^10.5.1", + "jss-plugin-vendor-prefixer": "^10.5.1", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/material-ui" + }, + "peerDependencies": { + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/styles/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@material-ui/styles/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/@material-ui/system": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.12.2.tgz", + "integrity": "sha512-6CSKu2MtmiJgcCGf6nBQpM8fLkuB9F55EKfbdTC80NND5wpTmKzwdhLYLH3zL4cLlK0gVaaltW7/wMuyTnN0Lw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "@material-ui/utils": "^4.11.3", + "csstype": "^2.5.2", + "prop-types": "^15.7.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/material-ui" + }, + "peerDependencies": { + "@types/react": "^16.8.6 || ^17.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/system/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@material-ui/system/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/@material-ui/types": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz", + "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==", + "dev": true, + "peerDependencies": { + "@types/react": "*" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@material-ui/utils": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz", + "integrity": "sha512-ZuQPV4rBK/V1j2dIkSSEcH5uT6AaHuKWFfotADHsC0wVL1NLd2WkFCm4ZZbX33iO4ydl6V0GPngKm8HZQ2oujg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.4.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + } + }, + "node_modules/@material-ui/utils/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@material-ui/utils/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, "node_modules/@types/cypress": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.3.tgz", @@ -2032,6 +2383,44 @@ "integrity": "sha512-e6ZowgGJmTuXa3GyaPbTGxX17tnThl2aSSizrFthQ7m9uLGZBXiGhgE55cjRZTF5kjZvYn9EOPOMljdjwbflxw==", "dev": true }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true + }, + "node_modules/@types/react": { + "version": "18.0.15", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.15.tgz", + "integrity": "sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react/node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, "node_modules/@types/sinonjs__fake-timers": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz", @@ -2380,6 +2769,12 @@ "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", "dev": true }, + "node_modules/anylogger": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/anylogger/-/anylogger-1.0.11.tgz", + "integrity": "sha512-sKTWPTG2/d71kLGVmymMJQQslUppxvCz6DN/eODL3/ckmfygZzD0t4P5tRXE3qpM62jI98F/YTHHzFhM12jiJQ==", + "dev": true + }, "node_modules/anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -2626,6 +3021,15 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, "node_modules/babel-loader": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", @@ -3258,6 +3662,83 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "node_modules/centreon-frontend": { + "version": "21.10.0", + "resolved": "git+https://centreon@github.com/centreon/centreon-frontend.git#bbbadcc7f9ab49852df838cb14485726878dd033", + "dev": true, + "license": "GPL-2.0", + "dependencies": { + "@dnd-kit/core": "^4.0.0", + "@dnd-kit/modifiers": "^4.0.0", + "@dnd-kit/sortable": "^5.0.0", + "@dnd-kit/utilities": "^3.0.0", + "@material-ui/core": "^4.12.3", + "@material-ui/icons": "^4.11.2", + "@material-ui/lab": "^4.0.0-alpha.60", + "@material-ui/styles": "^4.11.4", + "anylogger": "^1.0.11", + "axios": "^0.21.4", + "clsx": "^1.1.1", + "dayjs": "^1.10.7", + "formik": "^2.2.9", + "humanize-duration": "^3.27.0", + "i18next": "^21.2.0", + "notistack": "^1.0.10", + "numeral": "^2.0.6", + "prop-types": "^15.7.2", + "ramda": "^0.27.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-files": "^2.4.9", + "react-i18next": "^11.12.0", + "react-router-dom": "^5.3.0", + "resize-observer-polyfill": "^1.5.1", + "ts.data.json": "^2.0.0", + "ulog": "^2.0.0-beta.19" + }, + "peerDependencies": { + "@babel/core": "^7.x", + "@babel/plugin-proposal-class-properties": "7.x", + "@babel/preset-env": "7.x", + "@babel/preset-react": "7.x", + "@testing-library/jest-dom": "5.x", + "@testing-library/react": "12.x", + "@typescript-eslint/eslint-plugin": "^4.x", + "@typescript-eslint/parser": "^4.x", + "babel-eslint": "^10.x", + "babel-jest": "27.x", + "babel-loader": "8.x", + "babel-merge": "3.x", + "clean-webpack-plugin": "^4.x", + "css-loader": "6.x", + "eslint": "7.x", + "eslint-config-airbnb": "18.x", + "eslint-config-airbnb-base": "^14.x", + "eslint-config-prettier": "8.x", + "eslint-import-resolver-alias": "1.x", + "eslint-plugin-babel": "5.x", + "eslint-plugin-hooks": "0.x", + "eslint-plugin-import": "2.x", + "eslint-plugin-jsx-a11y": "6.x", + "eslint-plugin-prefer-arrow-functions": "3.x", + "eslint-plugin-prettier": "4.x", + "eslint-plugin-react": "7.x", + "eslint-plugin-react-hooks": "4.x", + "eslint-plugin-sort-keys-fix": "1.x", + "eslint-plugin-typescript-sort-keys": "1.x", + "fork-ts-checker-webpack-plugin": "6.x", + "identity-obj-proxy": "3.x", + "jest": "27.x", + "mini-css-extract-plugin": "2.x", + "node-sass": "6.x", + "prettier": "2.x", + "resolve-url-loader": "4.x", + "sass-loader": "12.x", + "ts-loader": "9.x", + "typescript": "4.x", + "webpack-merge": "5.x" + } + }, "node_modules/chai": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", @@ -3509,6 +3990,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/coffeeify": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/coffeeify/-/coffeeify-3.0.1.tgz", @@ -3846,6 +4336,40 @@ "node": "*" } }, + "node_modules/css-vendor": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz", + "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.3", + "is-in-browser": "^1.0.2" + } + }, + "node_modules/css-vendor/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/css-vendor/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/csstype": { + "version": "2.6.20", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.20.tgz", + "integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==", + "dev": true + }, "node_modules/cucumber": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/cucumber/-/cucumber-4.2.1.tgz", @@ -4168,9 +4692,9 @@ } }, "node_modules/dayjs": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.5.tgz", - "integrity": "sha512-BUFis41ikLz+65iH6LHQCDm4YPMj5r1YFLdupPIyM4SGcXMmtiLQ7U37i+hGS8urIuqe7I/ou3IS1jVc4nbN4g==", + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.4.tgz", + "integrity": "sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g==", "dev": true }, "node_modules/debug": { @@ -4211,6 +4735,15 @@ "node": ">=0.12" } }, + "node_modules/deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -4319,6 +4852,40 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dom-helpers/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/dom-helpers/node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + }, + "node_modules/dom-helpers/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, "node_modules/domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -4968,6 +5535,26 @@ "readable-stream": "^2.3.6" } }, + "node_modules/follow-redirects": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -5000,6 +5587,30 @@ "node": ">= 0.12" } }, + "node_modules/formik": { + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/formik/-/formik-2.2.9.tgz", + "integrity": "sha512-LQLcISMmf1r5at4/gyJigGn0gOwFbeEAlji+N9InZF6LIMXnFNkO42sCI8Jt84YZggpD4cPWObAZaxpEFtSzNA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://opencollective.com/formik" + } + ], + "dependencies": { + "deepmerge": "^2.1.1", + "hoist-non-react-statics": "^3.3.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "react-fast-compare": "^2.0.1", + "tiny-warning": "^1.0.2", + "tslib": "^1.10.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, "node_modules/fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -5394,6 +6005,20 @@ "minimalistic-assert": "^1.0.1" } }, + "node_modules/history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -5405,6 +6030,30 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dev": true, + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/html-parse-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", + "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "dev": true, + "dependencies": { + "void-elements": "3.1.0" + } + }, "node_modules/htmlescape": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", @@ -5444,6 +6093,59 @@ "node": ">=8.12.0" } }, + "node_modules/humanize-duration": { + "version": "3.27.2", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.27.2.tgz", + "integrity": "sha512-A15OmA3FLFRnehvF4ZMocsxTZYvHq4ze7L+AgR1DeHw0xC9vMd4euInY83uqGU9/XXKNnVIEeKc1R8G8nKqtzg==", + "dev": true + }, + "node_modules/hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==", + "dev": true + }, + "node_modules/i18next": { + "version": "21.8.16", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.8.16.tgz", + "integrity": "sha512-acJLCk38YMfEPjBR/1vS13SFY7rBQLs9E5m1tSRnWc9UW3f+SZszgH+NP1fZRA1+O+CdG2eLGGmuUMJW52EwzQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "dependencies": { + "@babel/runtime": "^7.17.2" + } + }, + "node_modules/i18next/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/i18next/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -5725,6 +6427,12 @@ "node": ">=0.10.0" } }, + "node_modules/is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==", + "dev": true + }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -6010,6 +6718,102 @@ "verror": "1.10.0" } }, + "node_modules/jss": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.9.2.tgz", + "integrity": "sha512-b8G6rWpYLR4teTUbGd4I4EsnWjg7MN0Q5bSsjKhVkJVjhQDy2KzkbD2AW3TuT0RYZVmZZHKIrXDn6kjU14qkUg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "csstype": "^3.0.2", + "is-in-browser": "^1.1.3", + "tiny-warning": "^1.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/jss" + } + }, + "node_modules/jss-plugin-camel-case": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.9.2.tgz", + "integrity": "sha512-wgBPlL3WS0WDJ1lPJcgjux/SHnDuu7opmgQKSraKs4z8dCCyYMx9IDPFKBXQ8Q5dVYij1FFV0WdxyhuOOAXuTg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "hyphenate-style-name": "^1.0.3", + "jss": "10.9.2" + } + }, + "node_modules/jss-plugin-default-unit": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.9.2.tgz", + "integrity": "sha512-pYg0QX3bBEFtTnmeSI3l7ad1vtHU42YEEpgW7pmIh+9pkWNWb5dwS/4onSfAaI0kq+dOZHzz4dWe+8vWnanoSg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2" + } + }, + "node_modules/jss-plugin-global": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.9.2.tgz", + "integrity": "sha512-GcX0aE8Ef6AtlasVrafg1DItlL/tWHoC4cGir4r3gegbWwF5ZOBYhx04gurPvWHC8F873aEGqge7C17xpwmp2g==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2" + } + }, + "node_modules/jss-plugin-nested": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.9.2.tgz", + "integrity": "sha512-VgiOWIC6bvgDaAL97XCxGD0BxOKM0K0zeB/ECyNaVF6FqvdGB9KBBWRdy2STYAss4VVA7i5TbxFZN+WSX1kfQA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2", + "tiny-warning": "^1.0.2" + } + }, + "node_modules/jss-plugin-props-sort": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.9.2.tgz", + "integrity": "sha512-AP1AyUTbi2szylgr+O0OB7gkIxEGzySLITZ2GpsaoX72YMCGI2jYAc+WUhPfvUnZYiauF4zTnN4V4TGuvFjJlw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2" + } + }, + "node_modules/jss-plugin-rule-value-function": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.9.2.tgz", + "integrity": "sha512-vf5ms8zvLFMub6swbNxvzsurHfUZ5Shy5aJB2gIpY6WNA3uLinEcxYyraQXItRHi5ivXGqYciFDRM2ZoVoRZ4Q==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2", + "tiny-warning": "^1.0.2" + } + }, + "node_modules/jss-plugin-vendor-prefixer": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.9.2.tgz", + "integrity": "sha512-SxcEoH+Rttf9fEv6KkiPzLdXRmI6waOTcMkbbEFgdZLDYNIP9UKNHFy6thhbRKqv0XMQZdrEsbDyV464zE/dUA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.3.1", + "css-vendor": "^2.0.8", + "jss": "10.9.2" + } + }, + "node_modules/jss/node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + }, "node_modules/kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -6031,6 +6835,12 @@ "seed-random": "~2.2.0" } }, + "node_modules/kurly": { + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/kurly/-/kurly-2.0.0-beta.3.tgz", + "integrity": "sha512-WXSRkhL2VV9lI/sPomBDV9Xf4oQ1s/RiUqzxKt4slkG7ndCxcDfXJ2ZXdxEYDRfevnkSOxmiVX3etunBlHqTAw==", + "dev": true + }, "node_modules/labeled-stream-splicer": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", @@ -6124,6 +6934,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "dev": true + }, "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -6516,6 +7332,38 @@ "node": ">=6" } }, + "node_modules/mini-create-react-context": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", + "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.12.1", + "tiny-warning": "^1.0.3" + }, + "peerDependencies": { + "prop-types": "^15.0.0", + "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/mini-create-react-context/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/mini-create-react-context/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -6868,6 +7716,25 @@ "node": ">=0.10.0" } }, + "node_modules/notistack": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/notistack/-/notistack-1.0.10.tgz", + "integrity": "sha512-z0y4jJaVtOoH3kc3GtNUlhNTY+5LE04QDeLVujX3VPhhzg67zw055mZjrBF+nzpv3V9aiPNph1EgRU4+t8kQTQ==", + "dev": true, + "dependencies": { + "clsx": "^1.1.0", + "hoist-non-react-statics": "^3.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/notistack" + }, + "peerDependencies": { + "@material-ui/core": "^4.0.0", + "react": "^16.8.0 || ^17.0.0", + "react-dom": "^16.8.0 || ^17.0.0" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -6880,6 +7747,15 @@ "node": ">=8" } }, + "node_modules/numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -7255,6 +8131,21 @@ "node": ">= 0.8.0" } }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -7325,6 +8216,12 @@ "node": ">=8" } }, + "node_modules/popper.js": { + "version": "1.16.1-lts", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz", + "integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA==", + "dev": true + }, "node_modules/posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -7376,6 +8273,23 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -7487,16 +8401,220 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "peerDependencies": { + "react": "17.0.2" + } + }, + "node_modules/react-fast-compare": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", + "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==", + "dev": true + }, + "node_modules/react-files": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/react-files/-/react-files-2.4.9.tgz", + "integrity": "sha512-TSQpynDOkK+umDSGm2r3SeqLjX2FvmqpThHgnL65fGBLUKbT9wT6nLy4Ab62LeZl/WUX7Qpj4IPn+xMA8Yvw9Q==", + "dev": true, + "peerDependencies": { + "react": "^15.0.0 || ^16 || ^17", + "react-dom": "^15.0.0 || ^16 || ^17" + } + }, + "node_modules/react-i18next": { + "version": "11.18.3", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.18.3.tgz", + "integrity": "sha512-EttTX31HbqzZymUM3SIrMPuvamfSXFZVsDHm/ZAqoDfTLjhzlwyxqfbDNxcKNAGOi2mjZaXfR7hSNMlvLNpB/g==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.14.5", + "html-parse-stringify": "^3.0.1" + }, + "peerDependencies": { + "i18next": ">= 19.0.0", + "react": ">= 16.8.0" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, + "node_modules/react-i18next/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/react-i18next/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/react-router": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.3.tgz", + "integrity": "sha512-mzQGUvS3bM84TnbtMYR8ZjKnuPJ71IjSzR+DE6UkUqvN4czWIqEs17yLL8xkAycv4ev0AiN+IGrWu88vJs/p2w==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "mini-create-react-context": "^0.4.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-router-dom": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.3.tgz", + "integrity": "sha512-Ov0tGPMBgqmbu5CDmN++tv2HQ9HlWDuWIIqn4b88gjlAN5IHI+4ZUZRcpz9Hl0azFIwihbLDYw1OiHGRo7ZIng==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.3.3", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "peerDependencies": { + "react": ">=15" + } + }, + "node_modules/react-router-dom/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/react-router-dom/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/react-router/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/react-router/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/react-router/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/react-transition-group/node_modules/@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", "dev": true, "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" } }, + "node_modules/react-transition-group/node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, "node_modules/read-only-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", @@ -7719,6 +8837,12 @@ "node": ">=0.10.0" } }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", + "dev": true + }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -7732,6 +8856,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", + "dev": true + }, "node_modules/resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -7828,6 +8958,16 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dev": true, + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "node_modules/schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", @@ -8829,6 +9969,18 @@ "node": ">=0.6.0" } }, + "node_modules/tiny-invariant": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", + "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==", + "dev": true + }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "dev": true + }, "node_modules/title-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", @@ -9148,6 +10300,12 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/ts.data.json": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ts.data.json/-/ts.data.json-2.1.1.tgz", + "integrity": "sha512-TzMVDIxVxDjHkqM6rOTuv+4iIed+264G3Pwyxxs5z6oY7Qfams41BsY30hbctmS7SZy8aNu35ywyJVc8+AkyyQ==", + "dev": true + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -9224,6 +10382,19 @@ "node": ">=4.2.0" } }, + "node_modules/ulog": { + "version": "2.0.0-beta.19", + "resolved": "https://registry.npmjs.org/ulog/-/ulog-2.0.0-beta.19.tgz", + "integrity": "sha512-27YIp4dUwaJQTh7ovk60wWjBMVV/AXMZhSVftkU7HMjaPc1t8wO5u6hVVUyBTyGKrLxYmR0v34Iihq8mE26LUg==", + "dev": true, + "dependencies": { + "anylogger": "^1.0.11", + "kurly": "^2.0.0-beta.3" + }, + "peerDependencies": { + "anylogger": "^1.0.10" + } + }, "node_modules/umd": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", @@ -9491,6 +10662,12 @@ "uuid": "bin/uuid" } }, + "node_modules/value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==", + "dev": true + }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -9511,6 +10688,15 @@ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, + "node_modules/void-elements": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/watchify": { "version": "3.11.1", "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.11.1.tgz", @@ -11057,12 +12243,6 @@ "to-fast-properties": "^2.0.0" } }, - "@centreon/frontend-core": { - "version": "git+ssh://git@github.com/centreon/frontend-core.git#a48ed62b17e0e8d8f1990f48d03afb2474ff916f", - "dev": true, - "from": "@centreon/frontend-core@github:centreon/frontend-core", - "requires": {} - }, "@cypress/browserify-preprocessor": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@cypress/browserify-preprocessor/-/browserify-preprocessor-3.0.1.tgz", @@ -11314,6 +12494,298 @@ } } }, + "@dnd-kit/accessibility": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@dnd-kit/accessibility/-/accessibility-3.0.1.tgz", + "integrity": "sha512-HXRrwS9YUYQO9lFRc/49uO/VICbM+O+ZRpFDe9Pd1rwVv2PCNkRiTZRdxrDgng/UkvdC3Re9r2vwPpXXrWeFzg==", + "dev": true, + "requires": { + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + } + } + }, + "@dnd-kit/core": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-4.0.3.tgz", + "integrity": "sha512-uT1uHZxKx3iEkupmLfknMIvbykMJSetoXXmra6sGGvtWy+OMKrWm3axH2c90+JC/q6qaeKs2znd3Qs8GLnCa5Q==", + "dev": true, + "requires": { + "@dnd-kit/accessibility": "^3.0.0", + "@dnd-kit/utilities": "^3.0.1", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + } + } + }, + "@dnd-kit/modifiers": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/modifiers/-/modifiers-4.0.0.tgz", + "integrity": "sha512-4OkNTamneH9u3YMJqG6yJ6cwFoEd/4yY9BF39TgmDh9vyMK2MoPZFVAV0vOEm193ZYsPczq3Af5tJFtJhR9jJQ==", + "dev": true, + "requires": { + "@dnd-kit/utilities": "^3.0.0", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + } + } + }, + "@dnd-kit/sortable": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/sortable/-/sortable-5.1.0.tgz", + "integrity": "sha512-CPyiUHbTrSYzhddfgdeoX0ERg/dEyVKIWx9+4O6uqpoppo84SXCBHVFiFBRVpQ9wtpsXs7prtUAnAUTcvFQTZg==", + "dev": true, + "requires": { + "@dnd-kit/utilities": "^3.0.0", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + } + } + }, + "@dnd-kit/utilities": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@dnd-kit/utilities/-/utilities-3.2.0.tgz", + "integrity": "sha512-h65/pn2IPCCIWwdlR2BMLqRkDxpTEONA+HQW3n765HBijLYGyrnTCLa2YQt8VVjjSQD6EfFlTE6aS2Q/b6nb2g==", + "dev": true, + "requires": { + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true + } + } + }, + "@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", + "dev": true + }, + "@material-ui/core": { + "version": "4.12.4", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.12.4.tgz", + "integrity": "sha512-tr7xekNlM9LjA6pagJmL8QCgZXaubWUwkJnoYcMKd4gw/t4XiyvnTkjdGrUVicyB2BsdaAv1tvow45bPM4sSwQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.4", + "@material-ui/styles": "^4.11.5", + "@material-ui/system": "^4.12.2", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.3", + "@types/react-transition-group": "^4.2.0", + "clsx": "^1.0.4", + "hoist-non-react-statics": "^3.3.2", + "popper.js": "1.16.1-lts", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0", + "react-transition-group": "^4.4.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "@material-ui/icons": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-4.11.3.tgz", + "integrity": "sha512-IKHlyx6LDh8n19vzwH5RtHIOHl9Tu90aAAxcbWME6kp4dmvODM3UvOHJeMIDzUbd4muuJKHmlNoBN+mDY4XkBA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.4" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "@material-ui/lab": { + "version": "4.0.0-alpha.61", + "resolved": "https://registry.npmjs.org/@material-ui/lab/-/lab-4.0.0-alpha.61.tgz", + "integrity": "sha512-rSzm+XKiNUjKegj8bzt5+pygZeckNLOr+IjykH8sYdVk7dE9y2ZuUSofiMV2bJk3qU+JHwexmw+q0RyNZB9ugg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.4", + "@material-ui/utils": "^4.11.3", + "clsx": "^1.0.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "@material-ui/styles": { + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.11.5.tgz", + "integrity": "sha512-o/41ot5JJiUsIETME9wVLAJrmIWL3j0R0Bj2kCOLbSfqEkKf0fmaPt+5vtblUh5eXr2S+J/8J3DaCb10+CzPGA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.4", + "@emotion/hash": "^0.8.0", + "@material-ui/types": "5.1.0", + "@material-ui/utils": "^4.11.3", + "clsx": "^1.0.4", + "csstype": "^2.5.2", + "hoist-non-react-statics": "^3.3.2", + "jss": "^10.5.1", + "jss-plugin-camel-case": "^10.5.1", + "jss-plugin-default-unit": "^10.5.1", + "jss-plugin-global": "^10.5.1", + "jss-plugin-nested": "^10.5.1", + "jss-plugin-props-sort": "^10.5.1", + "jss-plugin-rule-value-function": "^10.5.1", + "jss-plugin-vendor-prefixer": "^10.5.1", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "@material-ui/system": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.12.2.tgz", + "integrity": "sha512-6CSKu2MtmiJgcCGf6nBQpM8fLkuB9F55EKfbdTC80NND5wpTmKzwdhLYLH3zL4cLlK0gVaaltW7/wMuyTnN0Lw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.4", + "@material-ui/utils": "^4.11.3", + "csstype": "^2.5.2", + "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "@material-ui/types": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.0.tgz", + "integrity": "sha512-7cqRjrY50b8QzRSYyhSpx4WRw2YuO0KKIGQEVk5J8uoz2BanawykgZGoWEqKm7pVIbzFDN0SpPcVV4IhOFkl8A==", + "dev": true + }, + "@material-ui/utils": { + "version": "4.11.3", + "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz", + "integrity": "sha512-ZuQPV4rBK/V1j2dIkSSEcH5uT6AaHuKWFfotADHsC0wVL1NLd2WkFCm4ZZbX33iO4ydl6V0GPngKm8HZQ2oujg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.4", + "prop-types": "^15.7.2", + "react-is": "^16.8.0 || ^17.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, "@types/cypress": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-1.1.3.tgz", @@ -11341,6 +12813,46 @@ "integrity": "sha512-e6ZowgGJmTuXa3GyaPbTGxX17tnThl2aSSizrFthQ7m9uLGZBXiGhgE55cjRZTF5kjZvYn9EOPOMljdjwbflxw==", "dev": true }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true + }, + "@types/react": { + "version": "18.0.15", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.15.tgz", + "integrity": "sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + }, + "dependencies": { + "csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + } + } + }, + "@types/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, "@types/sinonjs__fake-timers": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz", @@ -11607,15 +13119,13 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true, - "requires": {} + "dev": true }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "ansi-colors": { "version": "4.1.1", @@ -11653,6 +13163,12 @@ "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", "dev": true }, + "anylogger": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/anylogger/-/anylogger-1.0.11.tgz", + "integrity": "sha512-sKTWPTG2/d71kLGVmymMJQQslUppxvCz6DN/eODL3/ckmfygZzD0t4P5tRXE3qpM62jI98F/YTHHzFhM12jiJQ==", + "dev": true + }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -11852,6 +13368,15 @@ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.0" + } + }, "babel-loader": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", @@ -11934,8 +13459,7 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz", "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==", - "dev": true, - "requires": {} + "dev": true }, "balanced-match": { "version": "1.0.2", @@ -12375,6 +13899,40 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "centreon-frontend": { + "version": "git+https://centreon@github.com/centreon/centreon-frontend.git#bbbadcc7f9ab49852df838cb14485726878dd033", + "dev": true, + "from": "centreon-frontend@git+https://centreon@github.com/centreon/centreon-frontend.git#21.10.x", + "requires": { + "@dnd-kit/core": "^4.0.0", + "@dnd-kit/modifiers": "^4.0.0", + "@dnd-kit/sortable": "^5.0.0", + "@dnd-kit/utilities": "^3.0.0", + "@material-ui/core": "^4.12.3", + "@material-ui/icons": "^4.11.2", + "@material-ui/lab": "^4.0.0-alpha.60", + "@material-ui/styles": "^4.11.4", + "anylogger": "^1.0.11", + "axios": "^0.21.4", + "clsx": "^1.1.1", + "dayjs": "^1.10.7", + "formik": "^2.2.9", + "humanize-duration": "^3.27.0", + "i18next": "^21.2.0", + "notistack": "^1.0.10", + "numeral": "^2.0.6", + "prop-types": "^15.7.2", + "ramda": "^0.27.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-files": "^2.4.9", + "react-i18next": "^11.12.0", + "react-router-dom": "^5.3.0", + "resize-observer-polyfill": "^1.5.1", + "ts.data.json": "^2.0.0", + "ulog": "^2.0.0-beta.19" + } + }, "chai": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", @@ -12573,6 +14131,12 @@ "string-width": "^4.2.0" } }, + "clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "dev": true + }, "coffeeify": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/coffeeify/-/coffeeify-3.0.1.tgz", @@ -12866,6 +14430,39 @@ "randomfill": "^1.0.3" } }, + "css-vendor": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz", + "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.3", + "is-in-browser": "^1.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "csstype": { + "version": "2.6.20", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.20.tgz", + "integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==", + "dev": true + }, "cucumber": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/cucumber/-/cucumber-4.2.1.tgz", @@ -13134,9 +14731,9 @@ } }, "dayjs": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.5.tgz", - "integrity": "sha512-BUFis41ikLz+65iH6LHQCDm4YPMj5r1YFLdupPIyM4SGcXMmtiLQ7U37i+hGS8urIuqe7I/ou3IS1jVc4nbN4g==", + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.4.tgz", + "integrity": "sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g==", "dev": true }, "debug": { @@ -13163,6 +14760,12 @@ "type-detect": "^4.0.0" } }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -13244,10 +14847,43 @@ "randombytes": "^2.0.0" }, "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true } } @@ -13797,6 +15433,12 @@ "readable-stream": "^2.3.6" } }, + "follow-redirects": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "dev": true + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -13820,6 +15462,21 @@ "mime-types": "^2.1.12" } }, + "formik": { + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/formik/-/formik-2.2.9.tgz", + "integrity": "sha512-LQLcISMmf1r5at4/gyJigGn0gOwFbeEAlji+N9InZF6LIMXnFNkO42sCI8Jt84YZggpD4cPWObAZaxpEFtSzNA==", + "dev": true, + "requires": { + "deepmerge": "^2.1.1", + "hoist-non-react-statics": "^3.3.0", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "react-fast-compare": "^2.0.1", + "tiny-warning": "^1.0.2", + "tslib": "^1.10.0" + } + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -14119,6 +15776,20 @@ "minimalistic-assert": "^1.0.1" } }, + "history": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz", + "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "loose-envify": "^1.2.0", + "resolve-pathname": "^3.0.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0", + "value-equal": "^1.0.1" + } + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -14130,6 +15801,32 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dev": true, + "requires": { + "react-is": "^16.7.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + } + } + }, + "html-parse-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", + "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "dev": true, + "requires": { + "void-elements": "3.1.0" + } + }, "htmlescape": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", @@ -14159,6 +15856,44 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, + "humanize-duration": { + "version": "3.27.2", + "resolved": "https://registry.npmjs.org/humanize-duration/-/humanize-duration-3.27.2.tgz", + "integrity": "sha512-A15OmA3FLFRnehvF4ZMocsxTZYvHq4ze7L+AgR1DeHw0xC9vMd4euInY83uqGU9/XXKNnVIEeKc1R8G8nKqtzg==", + "dev": true + }, + "hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==", + "dev": true + }, + "i18next": { + "version": "21.8.16", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-21.8.16.tgz", + "integrity": "sha512-acJLCk38YMfEPjBR/1vS13SFY7rBQLs9E5m1tSRnWc9UW3f+SZszgH+NP1fZRA1+O+CdG2eLGGmuUMJW52EwzQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.17.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -14378,6 +16113,12 @@ "is-extglob": "^2.1.1" } }, + "is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==", + "dev": true + }, "is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", @@ -14592,6 +16333,100 @@ "verror": "1.10.0" } }, + "jss": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.9.2.tgz", + "integrity": "sha512-b8G6rWpYLR4teTUbGd4I4EsnWjg7MN0Q5bSsjKhVkJVjhQDy2KzkbD2AW3TuT0RYZVmZZHKIrXDn6kjU14qkUg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "csstype": "^3.0.2", + "is-in-browser": "^1.1.3", + "tiny-warning": "^1.0.2" + }, + "dependencies": { + "csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true + } + } + }, + "jss-plugin-camel-case": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.9.2.tgz", + "integrity": "sha512-wgBPlL3WS0WDJ1lPJcgjux/SHnDuu7opmgQKSraKs4z8dCCyYMx9IDPFKBXQ8Q5dVYij1FFV0WdxyhuOOAXuTg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "hyphenate-style-name": "^1.0.3", + "jss": "10.9.2" + } + }, + "jss-plugin-default-unit": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.9.2.tgz", + "integrity": "sha512-pYg0QX3bBEFtTnmeSI3l7ad1vtHU42YEEpgW7pmIh+9pkWNWb5dwS/4onSfAaI0kq+dOZHzz4dWe+8vWnanoSg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2" + } + }, + "jss-plugin-global": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.9.2.tgz", + "integrity": "sha512-GcX0aE8Ef6AtlasVrafg1DItlL/tWHoC4cGir4r3gegbWwF5ZOBYhx04gurPvWHC8F873aEGqge7C17xpwmp2g==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2" + } + }, + "jss-plugin-nested": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.9.2.tgz", + "integrity": "sha512-VgiOWIC6bvgDaAL97XCxGD0BxOKM0K0zeB/ECyNaVF6FqvdGB9KBBWRdy2STYAss4VVA7i5TbxFZN+WSX1kfQA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2", + "tiny-warning": "^1.0.2" + } + }, + "jss-plugin-props-sort": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.9.2.tgz", + "integrity": "sha512-AP1AyUTbi2szylgr+O0OB7gkIxEGzySLITZ2GpsaoX72YMCGI2jYAc+WUhPfvUnZYiauF4zTnN4V4TGuvFjJlw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2" + } + }, + "jss-plugin-rule-value-function": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.9.2.tgz", + "integrity": "sha512-vf5ms8zvLFMub6swbNxvzsurHfUZ5Shy5aJB2gIpY6WNA3uLinEcxYyraQXItRHi5ivXGqYciFDRM2ZoVoRZ4Q==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.9.2", + "tiny-warning": "^1.0.2" + } + }, + "jss-plugin-vendor-prefixer": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.9.2.tgz", + "integrity": "sha512-SxcEoH+Rttf9fEv6KkiPzLdXRmI6waOTcMkbbEFgdZLDYNIP9UKNHFy6thhbRKqv0XMQZdrEsbDyV464zE/dUA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.3.1", + "css-vendor": "^2.0.8", + "jss": "10.9.2" + } + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -14610,6 +16445,12 @@ "seed-random": "~2.2.0" } }, + "kurly": { + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/kurly/-/kurly-2.0.0-beta.3.tgz", + "integrity": "sha512-WXSRkhL2VV9lI/sPomBDV9Xf4oQ1s/RiUqzxKt4slkG7ndCxcDfXJ2ZXdxEYDRfevnkSOxmiVX3etunBlHqTAw==", + "dev": true + }, "labeled-stream-splicer": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", @@ -14684,6 +16525,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "dev": true + }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", @@ -14991,6 +16838,33 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, + "mini-create-react-context": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz", + "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.1", + "tiny-warning": "^1.0.3" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -15308,6 +17182,16 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "notistack": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/notistack/-/notistack-1.0.10.tgz", + "integrity": "sha512-z0y4jJaVtOoH3kc3GtNUlhNTY+5LE04QDeLVujX3VPhhzg67zw055mZjrBF+nzpv3V9aiPNph1EgRU4+t8kQTQ==", + "dev": true, + "requires": { + "clsx": "^1.1.0", + "hoist-non-react-statics": "^3.3.0" + } + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -15317,6 +17201,12 @@ "path-key": "^3.0.0" } }, + "numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", + "dev": true + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -15612,6 +17502,23 @@ "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", "dev": true }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + } + } + }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -15664,6 +17571,12 @@ "find-up": "^4.0.0" } }, + "popper.js": { + "version": "1.16.1-lts", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz", + "integrity": "sha512-Kjw8nKRl1m+VrSFCoVGPph93W/qrSO7ZkqPpTf7F4bk/sqcfWK019dWBUpE/fBOsOQY1dks/Bmcbfn1heM/IsA==", + "dev": true + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -15700,6 +17613,25 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + } + } + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -15816,6 +17748,174 @@ "safe-buffer": "^5.1.0" } }, + "react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + } + }, + "react-fast-compare": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", + "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==", + "dev": true + }, + "react-files": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/react-files/-/react-files-2.4.9.tgz", + "integrity": "sha512-TSQpynDOkK+umDSGm2r3SeqLjX2FvmqpThHgnL65fGBLUKbT9wT6nLy4Ab62LeZl/WUX7Qpj4IPn+xMA8Yvw9Q==", + "dev": true + }, + "react-i18next": { + "version": "11.18.3", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.18.3.tgz", + "integrity": "sha512-EttTX31HbqzZymUM3SIrMPuvamfSXFZVsDHm/ZAqoDfTLjhzlwyxqfbDNxcKNAGOi2mjZaXfR7hSNMlvLNpB/g==", + "dev": true, + "requires": { + "@babel/runtime": "^7.14.5", + "html-parse-stringify": "^3.0.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "react-router": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.3.tgz", + "integrity": "sha512-mzQGUvS3bM84TnbtMYR8ZjKnuPJ71IjSzR+DE6UkUqvN4czWIqEs17yLL8xkAycv4ev0AiN+IGrWu88vJs/p2w==", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "hoist-non-react-statics": "^3.1.0", + "loose-envify": "^1.3.1", + "mini-create-react-context": "^0.4.0", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.2", + "react-is": "^16.6.0", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "react-router-dom": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.3.tgz", + "integrity": "sha512-Ov0tGPMBgqmbu5CDmN++tv2HQ9HlWDuWIIqn4b88gjlAN5IHI+4ZUZRcpz9Hl0azFIwihbLDYw1OiHGRo7ZIng==", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.13", + "history": "^4.9.0", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-router": "5.3.3", + "tiny-invariant": "^1.0.2", + "tiny-warning": "^1.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, + "react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dev": true, + "requires": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", + "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + } + } + }, "read-only-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", @@ -16010,6 +18110,12 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, + "resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", + "dev": true + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -16020,6 +18126,12 @@ "path-parse": "^1.0.6" } }, + "resolve-pathname": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz", + "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==", + "dev": true + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -16100,6 +18212,16 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, "schema-utils": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", @@ -16917,6 +19039,18 @@ "process": "~0.11.0" } }, + "tiny-invariant": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz", + "integrity": "sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg==", + "dev": true + }, + "tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", + "dev": true + }, "title-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", @@ -17160,6 +19294,12 @@ } } }, + "ts.data.json": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ts.data.json/-/ts.data.json-2.1.1.tgz", + "integrity": "sha512-TzMVDIxVxDjHkqM6rOTuv+4iIed+264G3Pwyxxs5z6oY7Qfams41BsY30hbctmS7SZy8aNu35ywyJVc8+AkyyQ==", + "dev": true + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -17217,6 +19357,16 @@ "integrity": "sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==", "dev": true }, + "ulog": { + "version": "2.0.0-beta.19", + "resolved": "https://registry.npmjs.org/ulog/-/ulog-2.0.0-beta.19.tgz", + "integrity": "sha512-27YIp4dUwaJQTh7ovk60wWjBMVV/AXMZhSVftkU7HMjaPc1t8wO5u6hVVUyBTyGKrLxYmR0v34Iihq8mE26LUg==", + "dev": true, + "requires": { + "anylogger": "^1.0.11", + "kurly": "^2.0.0-beta.3" + } + }, "umd": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", @@ -17440,6 +19590,12 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, + "value-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", + "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -17457,6 +19613,12 @@ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, + "void-elements": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "dev": true + }, "watchify": { "version": "3.11.1", "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.11.1.tgz", diff --git a/tests/e2e/package.json b/tests/e2e/package.json index d76ea68ad56..38e3e763195 100644 --- a/tests/e2e/package.json +++ b/tests/e2e/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@babel/core": "^7.14.0", "@babel/preset-env": "^7.14.1", - "@centreon/frontend-core": "github:centreon/frontend-core", + "centreon-frontend": "git+https://centreon@github.com/centreon/centreon-frontend.git#21.10.x", "@cypress/webpack-preprocessor": "^5.7.0", "@types/cypress": "^1.1.3", "@types/cypress-cucumber-preprocessor": "^4.0.0", diff --git a/www/include/common/common-Func.php b/www/include/common/common-Func.php index 5ba9f12bf87..9461155eda7 100644 --- a/www/include/common/common-Func.php +++ b/www/include/common/common-Func.php @@ -113,9 +113,20 @@ function table_not_exists($table_name) } } -function myDecode($arg) +function myDecode($data) { - return html_entity_decode($arg, ENT_QUOTES, "UTF-8"); + if (is_string($data)) { + $data = html_entity_decode($data, ENT_QUOTES, "UTF-8"); + } + return $data; +} + +function myEncode($data) +{ + if (is_string($data)) { + $data = htmlentities($data); + } + return $data; } /* diff --git a/www/include/configuration/configObject/escalation/DB-Func.php b/www/include/configuration/configObject/escalation/DB-Func.php index 662b143b9bd..96eaf257444 100644 --- a/www/include/configuration/configObject/escalation/DB-Func.php +++ b/www/include/configuration/configObject/escalation/DB-Func.php @@ -1,6 +1,7 @@ getSubmitValue('esc_id'); - } - $dbResult = $pearDB->query("SELECT esc_name, esc_id FROM escalation WHERE esc_name = '" . $name . "'"); - $esc = $dbResult->fetch(); - #Modif case - if ($dbResult->rowCount() >= 1 && $esc["esc_id"] == $id) { - return true; - #Duplicate entry - } elseif ($dbResult->rowCount() >= 1 && $esc["esc_id"] != $id) { - return false; - } else { - return true; - } + + $id = isset($form) ? $form->getSubmitValue('esc_id') : null; + + $stmt = $pearDB->prepare("SELECT esc_id FROM escalation WHERE esc_name = :name"); + $stmt->bindValue(':name', html_entity_decode($name, ENT_QUOTES, "UTF-8"), \PDO::PARAM_STR); + $stmt->execute(); + + $escalation = $stmt->fetch(); + + return ! ($stmt->rowCount() >= 1 && $escalation["esc_id"] !== $id); } -function deleteEscalationInDB($escalations = array()) +/** + * @param array $escalations + * @throws \Exception + */ +function deleteEscalationInDB(array $escalations = []) { global $pearDB, $centreon; - foreach ($escalations as $key => $value) { - $dbResult2 = $pearDB->query("SELECT esc_name FROM `escalation` WHERE `esc_id` = '" . $key . "' LIMIT 1"); - $row = $dbResult2->fetch(); + foreach (array_keys($escalations) as $escalationId) { + $stmt = $pearDB->prepare("SELECT esc_name FROM `escalation` WHERE `esc_id` = :escalationId LIMIT 1"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalation = $stmt->fetch(); + + $stmt = $pearDB->prepare("DELETE FROM escalation WHERE esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); - $dbResult = $pearDB->query("DELETE FROM escalation WHERE esc_id = '" . $key . "'"); - $centreon->CentreonLogAction->insertLog("escalation", $key, $row['esc_name'], "d"); + $centreon->CentreonLogAction->insertLog("escalation", $escalationId, $escalation['esc_name'], "d"); } } -function multipleEscalationInDB($escalations = array(), $nbrDup = array()) +function multipleEscalationInDB(array $escalations = [], array $nbrDup = []): void { - foreach ($escalations as $key => $value) { - global $pearDB, $centreon; - $dbResult = $pearDB->query("SELECT * FROM escalation WHERE esc_id = '" . $key . "' LIMIT 1"); - $row = $dbResult->fetch(); - $row["esc_id"] = ''; - for ($i = 1; $i <= $nbrDup[$key]; $i++) { - $val = null; - foreach ($row as $key2 => $value2) { - $key2 == "esc_name" ? ($esc_name = $value2 = $value2 . "_" . $i) : null; - $val ? $val .= ($value2 != null ? (", '" . $value2 . "'") : ", NULL") - : $val .= ($value2 != null ? ("'" . $value2 . "'") : "NULL"); - if ($key2 != "esc_id") { - $fields[$key2] = $value2; - } - if (isset($esc_name)) { - $fields["esc_name"] = $esc_name; - } - } - if (isset($esc_name) && testExistence($esc_name)) { - $val ? $rq = "INSERT INTO escalation VALUES (" . $val . ")" : $rq = null; - $pearDB->query($rq); - $dbResult = $pearDB->query("SELECT MAX(esc_id) FROM escalation"); - $maxId = $dbResult->fetch(); - if (isset($maxId["MAX(esc_id)"])) { - $dbResult = $pearDB->query( - "SELECT DISTINCT contactgroup_cg_id " - . "FROM escalation_contactgroup_relation " - . "WHERE escalation_esc_id = '" . $key . "'" - ); - $fields["esc_cgs"] = ""; - $statement = $pearDB->prepare( - "INSERT INTO escalation_contactgroup_relation " - . "VALUES (:esc_id, :contactgroup_cg_id)" - ); - while ($cg = $dbResult->fetch()) { - $statement->bindValue(':esc_id', (int) $maxId["MAX(esc_id)"], \PDO::PARAM_INT); - $statement->bindValue(':contactgroup_cg_id', (int) $cg["contactgroup_cg_id"], \PDO::PARAM_INT); - $statement->execute(); - $fields["esc_cgs"] .= $cg["contactgroup_cg_id"] . ","; - } - $fields["esc_cgs"] = trim($fields["esc_cgs"], ","); - $dbResult = $pearDB->query( - "SELECT DISTINCT host_host_id " - . "FROM escalation_host_relation " - . "WHERE escalation_esc_id = '" . $key . "'" - ); - $fields["esc_hosts"] = ""; - $statement = $pearDB->prepare( - "INSERT INTO escalation_host_relation " - . "VALUES (:esc_id, :host_host_id)" - ); - while ($host = $dbResult->fetch()) { - $statement->bindValue(':esc_id', (int) $maxId["MAX(esc_id)"], \PDO::PARAM_INT); - $statement->bindValue(':host_host_id', (int) $host["host_host_id"], \PDO::PARAM_INT); - $statement->execute(); - $fields["esc_hosts"] .= $host["host_host_id"] . ","; - } - $fields["esc_hosts"] = trim($fields["esc_hosts"], ","); - $dbResult = $pearDB->query( - "SELECT DISTINCT hostgroup_hg_id " - . "FROM escalation_hostgroup_relation " - . "WHERE escalation_esc_id = '" . $key . "'" - ); - $fields["esc_hgs"] = ""; - $statement = $pearDB->prepare( - "INSERT INTO escalation_hostgroup_relation " - . "VALUES (:esc_id, :hostgroup_hg_id)" - ); - while ($hg = $dbResult->fetch()) { - $statement->bindValue(':esc_id', (int) $maxId["MAX(esc_id)"], \PDO::PARAM_INT); - $statement->bindValue(':hostgroup_hg_id', (int) $hg["hostgroup_hg_id"], \PDO::PARAM_INT); - $statement->execute(); - $fields["esc_hgs"] .= $hg["hostgroup_hg_id"] . ","; - } - $fields["esc_hgs"] = trim($fields["esc_hgs"], ","); - $dbResult = $pearDB->query( - "SELECT DISTINCT servicegroup_sg_id " - . "FROM escalation_servicegroup_relation " - . "WHERE escalation_esc_id = '" . $key . "'" - ); - $fields["esc_sgs"] = ""; - $statement = $pearDB->prepare( - "INSERT INTO escalation_servicegroup_relation " - . "VALUES (:esc_id, :servicegroup_sg_id)" - ); - while ($sg = $dbResult->fetch()) { - $statement->bindValue(':esc_id', (int) $maxId["MAX(esc_id)"], \PDO::PARAM_INT); - $statement->bindValue(':servicegroup_sg_id', (int) $sg["servicegroup_sg_id"], \PDO::PARAM_INT); - $statement->execute(); - $fields["esc_sgs"] .= $sg["servicegroup_sg_id"] . ","; - } - $fields["esc_sgs"] = trim($fields["esc_sgs"], ","); - $dbResult = $pearDB->query( - "SELECT * FROM escalation_service_relation " - . "WHERE escalation_esc_id = '" . $key . "'" - ); - $fields["esc_hServices"] = ""; - $statement = $pearDB->prepare( - "INSERT INTO escalation_service_relation " - . "VALUES (:esc_id, :service_service_id, :host_host_id)" - ); - while ($sv = $dbResult->fetch()) { - $statement->bindValue(':esc_id', (int) $maxId["MAX(esc_id)"], \PDO::PARAM_INT); - $statement->bindValue(':service_service_id', (int) $sv["service_service_id"], \PDO::PARAM_INT); - $statement->bindValue(':host_host_id', (int) $sv["host_host_id"], \PDO::PARAM_INT); - $statement->execute(); - $fields["esc_hServices"] .= $sv["service_service_id"] . ","; - } - $fields["esc_hServices"] = trim($fields["esc_hServices"], ","); - $dbResult = $pearDB->query( - "SELECT DISTINCT meta_service_meta_id " - . "FROM escalation_meta_service_relation " - . "WHERE escalation_esc_id = '" . $key . "'" - ); - $fields["esc_metas"] = ""; - $statement = $pearDB->prepare( - 'INSERT INTO escalation_meta_service_relation ' - . 'VALUES (:esc_id, :meta_service_meta_id)' - ); - while ($sv = $dbResult->fetch()) { - $statement->bindValue(':esc_id', (int) $maxId["MAX(esc_id)"], \PDO::PARAM_INT); - $statement->bindValue( - ':meta_service_meta_id', - (int) $sv["meta_service_meta_id"], - \PDO::PARAM_INT - ); - $statement->execute(); - $fields["esc_metas"] .= $sv["meta_service_meta_id"] . ","; - } - $fields["esc_metas"] = trim($fields["esc_metas"], ","); - $centreon->CentreonLogAction->insertLog( - "escalation", - $maxId["MAX(esc_id)"], - $esc_name, - "a" - ); + global $pearDB, $centreon; + + foreach (array_keys($escalations) as $escalationId) { + $stmt = $pearDB->prepare("SELECT * FROM `escalation` WHERE `esc_id` = :escalationId LIMIT 1"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $escalationModel = $stmt->fetch(); + if (! $escalationModel) { + continue; + } + + for ($i = 1; $i <= $nbrDup[$escalationId]; $i++) { + $escalationDuplicate = $escalationModel; + $escalationDuplicate['esc_name'] = $escalationModel['esc_name'] . "_" . $i; + + if (testExistence($escalationDuplicate['esc_name'])) { + $escalationDuplicate['esc_id'] = insertEscalation($pearDB, $escalationDuplicate, false); + + if (! $escalationDuplicate['esc_id']) { + continue; } + + $stmt = $pearDB->prepare( + 'SELECT DISTINCT contactgroup_cg_id + FROM escalation_contactgroup_relation + WHERE escalation_esc_id = :escalationId' + ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalationContactGroups = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0); + updateEscalationContactGroups($pearDB, $escalationContactGroups, $escalationDuplicate['esc_id']); + + $stmt = $pearDB->prepare( + 'SELECT DISTINCT host_host_id + FROM escalation_host_relation + WHERE escalation_esc_id = :escalationId' + ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalationHosts = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0); + updateEscalationHosts($pearDB, $escalationHosts, $escalationDuplicate['esc_id']); + + $stmt = $pearDB->prepare( + 'SELECT DISTINCT hostgroup_hg_id + FROM escalation_hostgroup_relation + WHERE escalation_esc_id = :escalationId' + ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalationHostGroups = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0); + updateEscalationHostGroups($pearDB, $escalationHostGroups, $escalationDuplicate['esc_id']); + + $stmt = $pearDB->prepare( + "SELECT DISTINCT CONCAT(host_host_id, '-', service_service_id) + FROM escalation_service_relation + WHERE escalation_esc_id = :escalationId" + ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalationServices = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0); + updateEscalationServices($pearDB, $escalationServices, $escalationDuplicate['esc_id']); + + $stmt = $pearDB->prepare( + 'SELECT DISTINCT meta_service_meta_id + FROM escalation_meta_service_relation + WHERE escalation_esc_id = :escalationId' + ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalationMetas = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0); + updateEscalationMetaServices($pearDB, $escalationMetas, $escalationDuplicate['esc_id']); + + $stmt = $pearDB->prepare( + 'SELECT DISTINCT servicegroup_sg_id + FROM escalation_servicegroup_relation + WHERE escalation_esc_id = :escalationId' + ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + $escalationServiceGroups = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0); + updateEscalationServiceGroups($pearDB, $escalationServiceGroups, $escalationDuplicate['esc_id']); + + $centreon->CentreonLogAction->insertLog( + "escalation", + $escalationDuplicate['esc_id'], + $escalationDuplicate['esc_name'], + "a" + ); } } } } -function updateEscalationInDB($esc_id = null) +function updateEscalationInDB($escalationId): void { - if (!$esc_id) { - exit(); - } - updateEscalation($esc_id); - updateEscalationContactGroups($esc_id); - updateEscalationHosts($esc_id); - updateEscalationHostGroups($esc_id); - updateEscalationServices($esc_id); - updateEscalationMetaServices($esc_id); - updateEscalationServiceGroups($esc_id); + global $form, $pearDB; + + if (! $escalationId) { + exit; + } + $data = $form->getSubmitValues(); + updateEscalation($pearDB, $data, $escalationId); + $escalationContactGroups = CentreonUtils::mergeWithInitialValues($form, 'esc_cgs'); + updateEscalationContactGroups($pearDB, $escalationContactGroups, $escalationId); + $escalationHosts = CentreonUtils::mergeWithInitialValues($form, 'esc_hosts'); + updateEscalationHosts($pearDB, $escalationHosts, $escalationId); + $escalationHostGroups = CentreonUtils::mergeWithInitialValues($form, 'esc_hgs'); + updateEscalationHostGroups($pearDB, $escalationHostGroups, $escalationId); + $escalationServices = CentreonUtils::mergeWithInitialValues($form, 'esc_hServices'); + updateEscalationServices($pearDB, $escalationServices, $escalationId); + $escalationMetas = CentreonUtils::mergeWithInitialValues($form, 'esc_metas'); + updateEscalationMetaServices($pearDB, $escalationMetas, $escalationId); + $escalationServiceGroups = CentreonUtils::mergeWithInitialValues($form, 'esc_sgs'); + updateEscalationServiceGroups($pearDB, $escalationServiceGroups, $escalationId); } -function insertEscalationInDB() +/** + * @return int|null + * @throws \Exception + */ +function insertEscalationInDB(): ?int { - $esc_id = insertEscalation(); - updateEscalationContactGroups($esc_id); - updateEscalationHosts($esc_id); - updateEscalationHostGroups($esc_id); - updateEscalationServices($esc_id); - updateEscalationMetaServices($esc_id); - updateEscalationServiceGroups($esc_id); - return ($esc_id); + global $form, $pearDB; + + $data = $form->getSubmitValues(); + if (! $escalationId = insertEscalation($pearDB, $data)) { + return null; + } + $escalationContactGroups = CentreonUtils::mergeWithInitialValues($form, 'esc_cgs'); + updateEscalationContactGroups($pearDB, $escalationContactGroups, $escalationId); + $escalationHosts = CentreonUtils::mergeWithInitialValues($form, 'esc_hosts'); + updateEscalationHosts($pearDB, $escalationHosts, $escalationId); + $escalationHostGroups = CentreonUtils::mergeWithInitialValues($form, 'esc_hgs'); + updateEscalationHostGroups($pearDB, $escalationHostGroups, $escalationId); + $escalationServices = CentreonUtils::mergeWithInitialValues($form, 'esc_hServices'); + updateEscalationServices($pearDB, $escalationServices, $escalationId); + $escalationMetas = CentreonUtils::mergeWithInitialValues($form, 'esc_metas'); + updateEscalationMetaServices($pearDB, $escalationMetas, $escalationId); + $escalationServiceGroups = CentreonUtils::mergeWithInitialValues($form, 'esc_sgs'); + updateEscalationServiceGroups($pearDB, $escalationServiceGroups, $escalationId); + + return $escalationId; } -function insertEscalation() +/** + * @param CentreonDB $pearDB + * @param array $data + * @param bool $logAction (default = true) + * @return int|null + * @throws \Exception + */ +function insertEscalation(CentreonDB $pearDB, array $data, bool $logAction = true): ?int { - global $form, $pearDB, $centreon; - $ret = array(); - $ret = $form->getSubmitValues(); - $rq = "INSERT INTO escalation "; - $rq .= "(esc_name, esc_alias, first_notification, last_notification, " - . "notification_interval, escalation_period, host_inheritance_to_services, " - . "hostgroup_inheritance_to_services, escalation_options1, " - . "escalation_options2, esc_comment) "; - $rq .= "VALUES ("; - isset($ret["esc_name"]) && $ret["esc_name"] != null - ? $rq .= "'" . htmlentities($ret["esc_name"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - isset($ret["esc_alias"]) && $ret["esc_alias"] != null - ? $rq .= "'" . htmlentities($ret["esc_alias"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - isset($ret["first_notification"]) && $ret["first_notification"] != null - ? $rq .= "'" . htmlentities($ret["first_notification"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - isset($ret["last_notification"]) && $ret["last_notification"] != null - ? $rq .= "'" . htmlentities($ret["last_notification"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - isset($ret["notification_interval"]) && $ret["notification_interval"] != null - ? $rq .= "'" . htmlentities($ret["notification_interval"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - isset($ret["escalation_period"]) && $ret["escalation_period"] != null - ? $rq .= "'" . htmlentities($ret["escalation_period"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= (isset($ret["host_inheritance_to_services"]) ? 1 : 0) . ', '; - $rq .= (isset($ret["hostgroup_inheritance_to_services"]) ? 1 : 0) . ', '; - isset($ret["escalation_options1"]) && $ret["escalation_options1"] != null - ? $rq .= "'" . implode(",", array_keys($ret["escalation_options1"])) . "', " - : $rq .= "NULL, "; - isset($ret["escalation_options2"]) && $ret["escalation_options2"] != null - ? $rq .= "'" . implode(",", array_keys($ret["escalation_options2"])) . "', " - : $rq .= "NULL, "; - isset($ret["esc_comment"]) && $ret["esc_comment"] != null - ? $rq .= "'" . htmlentities($ret["esc_comment"], ENT_QUOTES, "UTF-8") . "' " - : $rq .= "NULL "; - $rq .= ")"; - $pearDB->query($rq); - $dbResult = $pearDB->query("SELECT MAX(esc_id) FROM escalation"); - $esc_id = $dbResult->fetch(); - $fields["esc_name"] = htmlentities($ret["esc_name"], ENT_QUOTES, "UTF-8"); - $fields["esc_alias"] = htmlentities($ret["esc_alias"], ENT_QUOTES, "UTF-8"); - $fields["first_notification"] = htmlentities($ret["first_notification"], ENT_QUOTES, "UTF-8"); - $fields["last_notification"] = htmlentities($ret["last_notification"], ENT_QUOTES, "UTF-8"); - $fields["notification_interval"] = htmlentities($ret["notification_interval"], ENT_QUOTES, "UTF-8"); - $fields["escalation_period"] = htmlentities($ret["escalation_period"], ENT_QUOTES, "UTF-8"); - $fields["escalation_options1"] = ""; - if (isset($ret["escalation_options1"]) && $ret["escalation_options1"] != null) { - $fields["escalation_options1"] = implode(",", array_keys($ret["escalation_options1"])); - } - $fields["escalation_options2"] = ""; - if (isset($ret["escalation_options2"]) && $ret["escalation_options2"] != null) { - $fields["escalation_options2"] = implode(",", array_keys($ret["escalation_options2"])); - } - $fields["esc_comment"] = htmlentities($ret["esc_comment"], ENT_QUOTES, "UTF-8"); - $fields["esc_cgs"] = ""; - if (isset($ret["esc_cgs"])) { - $fields["esc_cgs"] = implode(",", $ret["esc_cgs"]); - } - $fields["esc_hosts"] = ""; - if (isset($ret["host_inheritance_to_services"])) { - $fields["host_inheritance_to_services"] = $ret["host_inheritance_to_services"]; - } - if (isset($ret["hostgroup_inheritance_to_services"])) { - $fields["hostgroup_inheritance_to_services"] = $ret["hostgroup_inheritance_to_services"]; - } - if (isset($ret["esc_hosts"])) { - $fields["esc_hosts"] = implode(",", $ret["esc_hosts"]); - } - $fields["esc_hgs"] = ""; - if (isset($ret["esc_hgs"])) { - $fields["esc_hgs"] = implode(",", $ret["esc_hgs"]); + $data = array_map("myDecode", $data); + + $query = "INSERT INTO escalation ( + esc_name, esc_alias, first_notification, last_notification, notification_interval, + escalation_period, host_inheritance_to_services, hostgroup_inheritance_to_services, escalation_options1, + escalation_options2, esc_comment + ) VALUES ( + :esc_name, :esc_alias, :first_notification, :last_notification, :notification_interval, :escalation_period, + :host_inheritance_to_services, :hostgroup_inheritance_to_services, :escalation_options1, + :escalation_options2, :esc_comment + ) "; + + $params = [ + "esc_name" => \PDO::PARAM_STR, + "esc_alias" => \PDO::PARAM_STR, + "first_notification" => \PDO::PARAM_INT, + "last_notification" => \PDO::PARAM_INT, + "notification_interval" => \PDO::PARAM_INT, + "escalation_period" => \PDO::PARAM_INT, + "host_inheritance_to_services" => "checkbox", + "hostgroup_inheritance_to_services" => "checkbox", + "escalation_options1" => \PDO::PARAM_STR, + "escalation_options2" => \PDO::PARAM_STR, + "esc_comment" => \PDO::PARAM_STR, + ]; + + $stmt = $pearDB->prepare($query); + + foreach ($params as $paramName => $paramType) { + if ($paramType === \PDO::PARAM_INT) { + $stmt->bindValue( + ":" . $paramName, + isset($data[$paramName]) && $data[$paramName] !== '' ? $data[$paramName] : null, + $paramType + ); + } elseif ($paramType === \PDO::PARAM_STR) { + $value = isset($data[$paramName]) + ? (is_array($data[$paramName]) ? implode(",", array_keys($data[$paramName])) : $data[$paramName]) + : null; + $stmt->bindValue( + ":" . $paramName, + $value, + $paramType + ); + } else { + $stmt->bindValue( + ":" . $paramName, + isset($data[$paramName]) && $data[$paramName] !== '0' ? 1 : 0, + \PDO::PARAM_INT + ); + } } - $fields["esc_sgs"] = ""; - if (isset($ret["esc_sgs"])) { - $fields["esc_sgs"] = implode(",", $ret["esc_sgs"]); + $stmt->execute(); + + $dbResult = $pearDB->query("SELECT MAX(esc_id) FROM escalation"); + $escalationId = $dbResult->fetch(); + $escalationId = $escalationId ? (int) $escalationId["MAX(esc_id)"] : null; + + if ($logAction) { + logEscalation($escalationId, 'a', $data); } - $fields["esc_hServices"] = ""; - if (isset($ret["esc_hServices"])) { - $fields["esc_hServices"] = implode(",", $ret["esc_hServices"]); + + return $escalationId; +} + +/** + * @param CentreonDB $pearDB + * @param array $data + * @param int $escalationId + * @throws \Exception + */ +function updateEscalation(CentreonDB $pearDB, array $data, int $escalationId): void +{ + $data = array_map("myDecode", $data); + + $query = "UPDATE escalation SET + esc_name = :esc_name, + esc_alias = :esc_alias, + first_notification = :first_notification, + last_notification = :last_notification, + notification_interval = :notification_interval, + escalation_period = :escalation_period, + host_inheritance_to_services = :host_inheritance_to_services, + hostgroup_inheritance_to_services = :hostgroup_inheritance_to_services, + escalation_options1 = :escalation_options1, + escalation_options2 = :escalation_options2, + esc_comment = :esc_comment + WHERE esc_id = :esc_id"; + + $params = [ + "esc_name" => \PDO::PARAM_STR, + "esc_alias" => \PDO::PARAM_STR, + "first_notification" => \PDO::PARAM_INT, + "last_notification" => \PDO::PARAM_INT, + "notification_interval" => \PDO::PARAM_INT, + "escalation_period" => \PDO::PARAM_INT, + "host_inheritance_to_services" => "checkbox", + "hostgroup_inheritance_to_services" => "checkbox", + "escalation_options1" => \PDO::PARAM_STR, + "escalation_options2" => \PDO::PARAM_STR, + "esc_comment" => \PDO::PARAM_STR, + ]; + + $stmt = $pearDB->prepare($query); + + foreach ($params as $paramName => $paramType) { + if ($paramType === \PDO::PARAM_INT) { + $stmt->bindValue( + ":" . $paramName, + isset($data[$paramName]) && $data[$paramName] !== '' ? $data[$paramName] : null, + $paramType + ); + } elseif ($paramType === \PDO::PARAM_STR) { + $value = isset($data[$paramName]) + ? (is_array($data[$paramName]) ? implode(",", array_keys($data[$paramName])) : $data[$paramName]) + : null; + $stmt->bindValue( + ":" . $paramName, + $value, + $paramType + ); + } else { + $stmt->bindValue( + ":" . $paramName, + isset($data[$paramName]) ? 1 : 0, + \PDO::PARAM_INT + ); + } } - $fields["esc_metas"] = ""; - if (isset($ret["esc_metas"])) { - $fields["esc_metas"] = implode(",", $ret["esc_metas"]); + $stmt->bindValue(":esc_id", $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + logEscalation($escalationId, 'c', $data); +} + +/** + * Log escalation creation or update for the action log + * + * @param int|null $esc_id + * @param string $action ('a' = add, 'c' = update) + * @param array $data + */ +function logEscalation(?int $escalationId, string $action, array $data): void +{ + global $centreon; + + $fields = [ + "esc_name" => $data["esc_name"], + "esc_alias" => $data["esc_alias"], + "first_notification" => $data["first_notification"], + "last_notification" => $data["last_notification"], + "notification_interval" => $data["notification_interval"], + "escalation_period" => $data["escalation_period"], + "escalation_options1" => isset($data["escalation_options1"]) + ? implode(",", array_keys($data["escalation_options1"])) + : "", + "escalation_options2" => isset($data["escalation_options2"]) + ? implode(",", array_keys($data["escalation_options2"])) + : "", + "esc_comment" => $data["esc_comment"], + "esc_cgs" => isset($data["esc_cgs"]) + ? implode(",", array_keys($data["esc_cgs"])) + : "", + "esc_hosts" => isset($data["esc_hosts"]) + ? implode(",", array_keys($data["esc_hosts"])) + : "", + "esc_hgs" => isset($data["esc_hgs"]) + ? implode(",", array_keys($data["esc_hgs"])) + : "", + "esc_sgs" => isset($data["esc_sgs"]) + ? implode(",", array_keys($data["esc_sgs"])) + : "", + "esc_hServices" => isset($data["esc_hServices"]) + ? implode(",", array_keys($data["esc_hServices"])) + : "", + "esc_metas" => isset($data["esc_metas"]) + ? implode(",", array_keys($data["esc_metas"])) + : "", + ]; + if (isset($data["host_inheritance_to_services"])) { + $fields["host_inheritance_to_services"] = $data["host_inheritance_to_services"]; + } + if (isset($data["hostgroup_inheritance_to_services"])) { + $fields["hostgroup_inheritance_to_services"] = $data["hostgroup_inheritance_to_services"]; } + $centreon->CentreonLogAction->insertLog( "escalation", - $esc_id["MAX(esc_id)"], - htmlentities($ret["esc_name"], ENT_QUOTES, "UTF-8"), - "a", + $escalationId, + $fields['esc_name'], + $action, $fields ); - return ($esc_id["MAX(esc_id)"]); } -function updateEscalation($esc_id = null) +/** + * @param CentreonDB $pearDB + * @param array $escalationContactGroups + * @param int $escalationId + * @throws \Exception + */ +function updateEscalationContactGroups(CentreonDB $pearDB, array $escalationContactGroups, int $escalationId): void { - if (!$esc_id) { - exit(); - } - global $form; - global $pearDB, $centreon; - $ret = array(); - $ret = $form->getSubmitValues(); - $rq = "UPDATE escalation SET "; - $rq .= "esc_name = "; - isset($ret["esc_name"]) && $ret["esc_name"] != null - ? $rq .= "'" . htmlentities($ret["esc_name"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= "esc_alias = "; - isset($ret["esc_alias"]) && $ret["esc_alias"] != null - ? $rq .= "'" . htmlentities($ret["esc_alias"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= "first_notification = "; - isset($ret["first_notification"]) && $ret["first_notification"] != null - ? $rq .= "'" . htmlentities($ret["first_notification"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= "last_notification = "; - isset($ret["last_notification"]) && $ret["last_notification"] != null - ? $rq .= "'" . htmlentities($ret["last_notification"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= "notification_interval = "; - isset($ret["notification_interval"]) && $ret["notification_interval"] != null - ? $rq .= "'" . htmlentities($ret["notification_interval"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= "escalation_period = "; - isset($ret["escalation_period"]) && $ret["escalation_period"] != null - ? $rq .= "'" . htmlentities($ret["escalation_period"], ENT_QUOTES, "UTF-8") . "', " - : $rq .= "NULL, "; - $rq .= "host_inheritance_to_services = "; - $rq .= (isset($ret['host_inheritance_to_services']) ? 1 : 0) . ', '; - $rq .= "hostgroup_inheritance_to_services = "; - $rq .= (isset($ret['hostgroup_inheritance_to_services']) ? 1 : 0) . ', '; - $rq .= "escalation_options1 = "; - isset($ret["escalation_options1"]) && $ret["escalation_options1"] != null - ? $rq .= "'" . implode(",", array_keys($ret["escalation_options1"])) . "', " - : $rq .= "NULL, "; - $rq .= "escalation_options2 = "; - isset($ret["escalation_options2"]) && $ret["escalation_options2"] != null - ? $rq .= "'" . implode(",", array_keys($ret["escalation_options2"])) . "', " - : $rq .= "NULL, "; - $rq .= "esc_comment = "; - isset($ret["esc_comment"]) && $ret["esc_comment"] != null - ? $rq .= "'" . htmlentities($ret["esc_comment"], ENT_QUOTES, "UTF-8") . "' " - : $rq .= "NULL "; - $rq .= "WHERE esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $fields["esc_name"] = htmlentities($ret["esc_name"], ENT_QUOTES, "UTF-8"); - $fields["esc_alias"] = htmlentities($ret["esc_alias"], ENT_QUOTES, "UTF-8"); - $fields["first_notification"] = htmlentities($ret["first_notification"], ENT_QUOTES, "UTF-8"); - $fields["last_notification"] = htmlentities($ret["last_notification"], ENT_QUOTES, "UTF-8"); - $fields["notification_interval"] = htmlentities($ret["notification_interval"], ENT_QUOTES, "UTF-8"); - $fields["escalation_period"] = htmlentities($ret["escalation_period"], ENT_QUOTES, "UTF-8"); - if (isset($ret["host_inheritance_to_services"])) { - $fields["host_inheritance_to_services"] = $ret["host_inheritance_to_services"]; - } - if (isset($ret["hostgroup_inheritance_to_services"])) { - $fields["hostgroup_inheritance_to_services"] = $ret["hostgroup_inheritance_to_services"]; - } - $fields["esc_comment"] = htmlentities($ret["esc_comment"], ENT_QUOTES, "UTF-8"); - $fields["esc_cgs"] = ""; - if (isset($ret["esc_cgs"])) { - $fields["esc_cgs"] = implode(",", $ret["esc_cgs"]); + $stmt = $pearDB->prepare("DELETE FROM escalation_contactgroup_relation WHERE escalation_esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $contactGroupManager = new CentreonContactgroup($pearDB); + + $queryParams = []; + $params = []; + foreach ($escalationContactGroups as $key => $contactGroupId) { + if (!is_numeric($contactGroupId)) { + $contactGroupId = $contactGroupManager->insertLdapGroup($contactGroupId) ?? null; + } + if (! $contactGroupId || ($key = filter_var($key, FILTER_VALIDATE_INT)) === false) { + continue; + } + + $params[':contactGroupId' . $key] = $contactGroupId; + $queryParams[] = "(:escalationId, :contactGroupId{$key})"; } - $fields["esc_hosts"] = ""; - if (isset($ret["esc_hosts"])) { - $fields["esc_hosts"] = implode(",", $ret["esc_hosts"]); + + if (empty($params)) { + return; } - $fields["esc_hgs"] = ""; - if (isset($ret["esc_hgs"])) { - $fields["esc_hgs"] = implode(",", $ret["esc_hgs"]); + + $query = "INSERT INTO escalation_contactgroup_relation (escalation_esc_id, contactgroup_cg_id) VALUES "; + $query .= implode(', ', $queryParams); + + $stmt = $pearDB->prepare($query); + foreach ($params as $paramName => $value) { + $stmt->bindValue($paramName, $value, \PDO::PARAM_INT); } - $fields["esc_sgs"] = ""; - if (isset($ret["esc_sgs"])) { - $fields["esc_sgs"] = implode(",", $ret["esc_sgs"]); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); +} + +/** + * @param CentreonDB $pearDB + * @param array $escalationHosts + * @param int $escalationId + * @throws \Exception + */ +function updateEscalationHosts(CentreonDB $pearDB, array $escalationHosts, int $escalationId): void +{ + $stmt = $pearDB->prepare("DELETE FROM escalation_host_relation WHERE escalation_esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $queryParams = []; + $params = []; + foreach ($escalationHosts as $key => $hostId) { + if (($key = filter_var($key, FILTER_VALIDATE_INT)) === false) { + continue; + } + $params[':hostId' . $key] = $hostId; + $queryParams[] = "(:escalationId, :hostId{$key})"; } - $fields["esc_hServices"] = ""; - if (isset($ret["esc_hServices"])) { - $fields["esc_hServices"] = implode(",", $ret["esc_hServices"]); + + if (empty($params)) { + return; } - $fields["esc_metas"] = ""; - if (isset($ret["esc_metas"])) { - $fields["esc_metas"] = implode(",", $ret["esc_metas"]); + + $query = "INSERT INTO escalation_host_relation (escalation_esc_id, host_host_id) VALUES "; + $query .= implode(', ', $queryParams); + + $stmt = $pearDB->prepare($query); + foreach ($params as $paramName => $value) { + $stmt->bindValue($paramName, $value, \PDO::PARAM_INT); } - $centreon->CentreonLogAction->insertLog( - "escalation", - $esc_id, - htmlentities($ret["esc_name"], ENT_QUOTES, "UTF-8"), - "c", - $fields - ); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); } -function updateEscalationContactGroups($esc_id = null) +/** + * @param CentreonDB $pearDB + * @param array $escalationHostGroups + * @param int $escalationId + * @throws \Exception + */ +function updateEscalationHostGroups(CentreonDB $pearDB, array $escalationHostGroups, int $escalationId): void { - if (!$esc_id) { - exit(); - } - global $form; - global $pearDB; - $rq = "DELETE FROM escalation_contactgroup_relation "; - $rq .= "WHERE escalation_esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $ret = array(); - $ret = CentreonUtils::mergeWithInitialValues($form, 'esc_cgs'); - $cg = new CentreonContactgroup($pearDB); - for ($i = 0; $i < count($ret); $i++) { - if (!is_numeric($ret[$i])) { - $res = $cg->insertLdapGroup($ret[$i]); - if ($res != 0) { - $ret[$i] = $res; - } else { - continue; - } + $stmt = $pearDB->prepare("DELETE FROM escalation_hostgroup_relation WHERE escalation_esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $queryParams = []; + $params = []; + foreach ($escalationHostGroups as $key => $hostGroupId) { + if (($key = filter_var($key, FILTER_VALIDATE_INT)) === false) { + continue; } - $rq = "INSERT INTO escalation_contactgroup_relation "; - $rq .= "(escalation_esc_id, contactgroup_cg_id) "; - $rq .= "VALUES "; - $rq .= "('" . $esc_id . "', '" . $ret[$i] . "')"; - $pearDB->query($rq); + $params[':hostGroupId' . $key] = $hostGroupId; + $queryParams[] = "(:escalationId, :hostGroupId{$key})"; } -} -function updateEscalationHosts($esc_id = null) -{ - if (!$esc_id) { - exit(); + if (empty($params)) { + return; } - global $form; - global $pearDB; - $rq = "DELETE FROM escalation_host_relation "; - $rq .= "WHERE escalation_esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $ret = array(); - $ret = CentreonUtils::mergeWithInitialValues($form, 'esc_hosts'); - for ($i = 0; $i < count($ret); $i++) { - $rq = "INSERT INTO escalation_host_relation "; - $rq .= "(escalation_esc_id, host_host_id) "; - $rq .= "VALUES "; - $rq .= "('" . $esc_id . "', '" . $ret[$i] . "')"; - $pearDB->query($rq); + + $query = "INSERT INTO escalation_hostgroup_relation (escalation_esc_id, hostgroup_hg_id) VALUES "; + $query .= implode(', ', $queryParams); + + $stmt = $pearDB->prepare($query); + foreach ($params as $paramName => $value) { + $stmt->bindValue($paramName, $value, \PDO::PARAM_INT); } + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); } -function updateEscalationHostGroups($esc_id = null) +/** + * @param CentreonDB $pearDB + * @param array $escalationServiceGroups + * @param int $escalationId + * @throws \Exception + */ +function updateEscalationServiceGroups(CentreonDB $pearDB, array $escalationServiceGroups, int $escalationId): void { - if (!$esc_id) { - exit(); + $stmt = $pearDB->prepare("DELETE FROM escalation_servicegroup_relation WHERE escalation_esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $queryParams = []; + $params = []; + foreach ($escalationServiceGroups as $key => $serviceGroupId) { + if (($key = filter_var($key, FILTER_VALIDATE_INT)) === false) { + continue; + } + $params[':serviceGroupId' . $key] = $serviceGroupId; + $queryParams[] = "(:escalationId, :serviceGroupId{$key})"; } - global $form; - global $pearDB; - $rq = "DELETE FROM escalation_hostgroup_relation "; - $rq .= "WHERE escalation_esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $ret = array(); - $ret = CentreonUtils::mergeWithInitialValues($form, 'esc_hgs'); - for ($i = 0; $i < count($ret); $i++) { - $rq = "INSERT INTO escalation_hostgroup_relation "; - $rq .= "(escalation_esc_id, hostgroup_hg_id) "; - $rq .= "VALUES "; - $rq .= "('" . $esc_id . "', '" . $ret[$i] . "')"; - $pearDB->query($rq); + + if (empty($params)) { + return; } + + $query = "INSERT INTO escalation_servicegroup_relation (escalation_esc_id, servicegroup_sg_id) VALUES "; + $query .= implode(', ', $queryParams); + + $stmt = $pearDB->prepare($query); + foreach ($params as $paramName => $value) { + $stmt->bindValue($paramName, $value, \PDO::PARAM_INT); + } + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); } -function updateEscalationServiceGroups($esc_id = null) +/** + * @param CentreonDB $pearDB + * @param array $escalationServices + * @param int $escalationId + * @throws \Exception + */ +function updateEscalationServices(CentreonDB $pearDB, array $escalationServices, int $escalationId): void { - if (!$esc_id) { - exit(); + $stmt = $pearDB->prepare("DELETE FROM escalation_service_relation WHERE escalation_esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $queryParams = []; + $params = []; + foreach ($escalationServices as $key => $serviceData) { + if (($key = filter_var($key, FILTER_VALIDATE_INT)) === false) { + continue; + } + $exp = explode("-", $serviceData); + if (count($exp) === 2) { + $params[':serviceId' . $key] = $exp[1]; + $params[':hostId' . $key] = $exp[0]; + + $queryParams[] = "(:escalationId, :serviceId{$key}, :hostId{$key})"; + } } - global $form; - global $pearDB; - $rq = "DELETE FROM escalation_servicegroup_relation "; - $rq .= "WHERE escalation_esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $ret = array(); - $ret = CentreonUtils::mergeWithInitialValues($form, 'esc_sgs'); - for ($i = 0; $i < count($ret); $i++) { - $rq = "INSERT INTO escalation_servicegroup_relation "; - $rq .= "(escalation_esc_id, servicegroup_sg_id) "; - $rq .= "VALUES "; - $rq .= "('" . $esc_id . "', '" . $ret[$i] . "')"; - $pearDB->query($rq); + + if (empty($params)) { + return; + } + + $query = "INSERT INTO escalation_service_relation (escalation_esc_id, service_service_id, host_host_id) VALUES "; + $query .= implode(', ', $queryParams); + + $stmt = $pearDB->prepare($query); + foreach ($params as $paramName => $value) { + $stmt->bindValue($paramName, $value, \PDO::PARAM_INT); } + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); } -function updateEscalationServices($esc_id = null) +/** + * @param CentreonDB $pearDB + * @param array $escalationMetas + * @param int $escalationId + * @throws \Exception + */ +function updateEscalationMetaServices(CentreonDB $pearDB, array $escalationMetas, int $escalationId): void { - if (!$esc_id) { - exit(); - } - global $form; - global $pearDB; - $rq = "DELETE FROM escalation_service_relation "; - $rq .= "WHERE escalation_esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $ret = CentreonUtils::mergeWithInitialValues($form, 'esc_hServices'); - for ($i = 0; $i < count($ret); $i++) { - $exp = explode("-", $ret[$i]); - if (count($exp) == 2) { - $rq = "INSERT INTO escalation_service_relation "; - $rq .= "(escalation_esc_id, service_service_id, host_host_id) "; - $rq .= "VALUES "; - $rq .= "('" . $esc_id . "', '" . $exp[1] . "', '" . $exp[0] . "')"; - $pearDB->query($rq); + $stmt = $pearDB->prepare("DELETE FROM escalation_meta_service_relation WHERE escalation_esc_id = :escalationId"); + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); + + $queryParams = []; + $params = []; + foreach ($escalationMetas as $key => $metaServiceId) { + if (($key = filter_var($key, FILTER_VALIDATE_INT)) === false) { + continue; } + $params[':metaServiceId' . $key] = $metaServiceId; + $queryParams[] = "(:escalationId, :metaServiceId{$key})"; } -} -function updateEscalationMetaServices($esc_id = null) -{ - if (!$esc_id) { - exit(); + if (empty($params)) { + return; } - global $form; - global $pearDB; - $rq = "DELETE FROM escalation_meta_service_relation "; - $rq .= "WHERE escalation_esc_id = '" . $esc_id . "'"; - $pearDB->query($rq); - $ret = array(); - $ret = CentreonUtils::mergeWithInitialValues($form, 'esc_metas'); - for ($i = 0; $i < count($ret); $i++) { - $rq = "INSERT INTO escalation_meta_service_relation "; - $rq .= "(escalation_esc_id, meta_service_meta_id) "; - $rq .= "VALUES "; - $rq .= "('" . $esc_id . "', '" . $ret[$i] . "')"; - $pearDB->query($rq); + + $query = "INSERT INTO escalation_meta_service_relation (escalation_esc_id, meta_service_meta_id) VALUES "; + $query .= implode(', ', $queryParams); + + $stmt = $pearDB->prepare($query); + foreach ($params as $paramName => $value) { + $stmt->bindValue($paramName, $value, \PDO::PARAM_INT); } + $stmt->bindValue(':escalationId', $escalationId, \PDO::PARAM_INT); + $stmt->execute(); } diff --git a/www/include/configuration/configObject/escalation/formEscalation.php b/www/include/configuration/configObject/escalation/formEscalation.php index f2e4668c32d..3d329caee75 100755 --- a/www/include/configuration/configObject/escalation/formEscalation.php +++ b/www/include/configuration/configObject/escalation/formEscalation.php @@ -1,6 +1,7 @@ query("SELECT * FROM escalation WHERE esc_id = '" . $esc_id . "' LIMIT 1"); # Set base value - $esc = array_map("myDecode", $DBRESULT->fetchRow()); + $esc = array_map("myEncode", $DBRESULT->fetchRow()); # Set Host Options $esc["escalation_options1"] = explode(',', $esc["escalation_options1"]); @@ -221,7 +222,6 @@ $form->addRule('last_notification', _("Required Field"), 'required'); $form->addRule('notification_interval', _("Required Field"), 'required'); $form->addRule('esc_cgs', _("Required Field"), 'required'); -// $form->addRule('dep_hostChilds', _("Required Field"), 'required'); - Fields is not added so rule is not needed $form->registerRule('exist', 'callback', 'testExistence'); $form->addRule('esc_name', _("Name is already in use"), 'exist'); $form->setRequiredNote("* " . _("Required fields")); diff --git a/www/include/configuration/configObject/escalation/listEscalation.php b/www/include/configuration/configObject/escalation/listEscalation.php index 38a5b9c417a..1a18d42e566 100644 --- a/www/include/configuration/configObject/escalation/listEscalation.php +++ b/www/include/configuration/configObject/escalation/listEscalation.php @@ -1,6 +1,7 @@ fetch(); $i++) { + $esc = array_map("myEncode", $esc); $moptions = ""; $selectedElements = $form->addElement('checkbox', "select[" . $esc['esc_id'] . "]"); $moptions .= @@ -160,8 +162,8 @@ $elemArr[$i] = array( "MenuClass" => "list_" . $style, "RowMenu_select" => $selectedElements->toHtml(), - "RowMenu_name" => CentreonUtils::escapeSecure(myDecode($esc["esc_name"])), - "RowMenu_alias" => CentreonUtils::escapeSecure(myDecode($esc["esc_alias"])), + "RowMenu_name" => CentreonUtils::escapeSecure($esc["esc_name"]), + "RowMenu_alias" => CentreonUtils::escapeSecure($esc["esc_alias"]), "RowMenu_link" => "main.php?p=" . $p . "&o=c&esc_id=" . $esc['esc_id'], "RowMenu_options" => $moptions ); diff --git a/www/install/insertBaseConf.sql b/www/install/insertBaseConf.sql index b80d24b5e63..de0f1927ef6 100644 --- a/www/install/insertBaseConf.sql +++ b/www/install/insertBaseConf.sql @@ -2,7 +2,7 @@ -- Insert version -- -INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '21.10.7'); +INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '21.10.8'); -- -- Contenu de la table `contact` diff --git a/www/install/php/Update-21.10.8.php b/www/install/php/Update-21.10.8.php new file mode 100644 index 00000000000..8572f2a05df --- /dev/null +++ b/www/install/php/Update-21.10.8.php @@ -0,0 +1,20 @@ +