Merge branch 'develop' into feature/ClearEvents

This commit is contained in:
pavelbannov 2021-06-23 15:30:55 +03:00
commit 85574630cb
24 changed files with 1764 additions and 1567 deletions

View File

@ -36,6 +36,7 @@ FFMPEG_EXTS=${FFMPEG_EXTS:-'"avi", "mpeg", "mpg", "wmv"'}
ELK_SHEME=${ELK_SHEME:-"http"}
ELK_HOST=${ELK_HOST:-"${PRODUCT}-elasticsearch"}
ELK_PORT=${ELK_PORT:-"9200"}
ELK_THREADS=${ELK_THREADS:-"1"}
KAFKA_HOST=${KAFKA_HOST:-"kafka"}":9092"
@ -67,9 +68,11 @@ sed -i "s!\"exts\".*!\"exts\": \[ ${FFMPEG_EXTS} \]!g" ${PATH_TO_CONF}/appsettin
sed -i "0,/\"value\"/s!\"value\".*,!\"value\": \"${DOCUMENT_SERVER_JWT_SECRET}\",!" ${PATH_TO_CONF}/appsettings.${APP_DOTNET_ENV}.json
sed -i "s!\"header\".*!\"header\": \"${DOCUMENT_SERVER_JWT_HEADER}\"!" ${PATH_TO_CONF}/appsettings.${APP_DOTNET_ENV}.json
sed -i "s!\"Scheme\".*!\"Scheme\": \"${ELK_SHEME}\"!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"Host\".*!\"Host\": \"${ELK_HOST}\"!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"Port\".*!\"Port\": \"${ELK_PORT}\"!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"Scheme\".*!\"Scheme\": \"${ELK_SHEME}\",!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"Host\".*!\"Host\": \"${ELK_HOST}\",!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"Port\".*!\"Port\": \"${ELK_PORT}\",!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"Threads\".*!\"Threads\": \"${ELK_THREADS}\"!g" ${PATH_TO_CONF}/elastic.json
sed -i "s!\"subfolder\".*!\"subfolder\": \"server\",!g" ${PATH_TO_CONF}/appsettings.services.json
sed -i "s!\"BootstrapServers\".*!\"BootstrapServers\": \"${KAFKA_HOST}\"!g" ${PATH_TO_CONF}/kafka.${APP_DOTNET_ENV}.json

View File

@ -22,7 +22,7 @@
"moment": "^2.24.0",
"morgan": "~1.9.1",
"nconf": "^0.10.0",
"redis": "^2.8.0",
"redis": "^3.1.1",
"request": "^2.88.0",
"socket.io": "^2.2.0",
"ua-parser-js": "^0.7.19",

View File

@ -337,6 +337,11 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
denque@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.0.tgz#773de0686ff2d8ec2ff92914316a47b73b1c73de"
integrity sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==
depd@~1.1.1, depd@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
@ -951,16 +956,28 @@ readable-stream@^2.3.7:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
redis-commands@^1.2.0:
redis-commands@^1.2.0, redis-commands@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89"
integrity sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==
redis-errors@^1.0.0, redis-errors@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad"
integrity sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=
redis-parser@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.6.0.tgz#52ed09dacac108f1a631c07e9b69941e7a19504b"
integrity sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=
redis-parser@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4"
integrity sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=
dependencies:
redis-errors "^1.0.0"
redis@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/redis/-/redis-2.8.0.tgz#202288e3f58c49f6079d97af7a10e1303ae14b02"
@ -970,6 +987,16 @@ redis@^2.8.0:
redis-commands "^1.2.0"
redis-parser "^2.6.0"
redis@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/redis/-/redis-3.1.1.tgz#a44bee7c072dcf685e139048d6a1a4d3b00f5d01"
integrity sha512-QhkKhOuzhogR1NDJfBD34TQJz2ZJwDhhIC6ZmvpftlmfYShHHQXjjNspAJ+Z2HH5NwSBVYBVganbiZ8bgFMHjg==
dependencies:
denque "^1.5.0"
redis-commands "^1.7.0"
redis-errors "^1.2.0"
redis-parser "^3.0.0"
request@^2.88.0:
version "2.88.2"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"

View File

@ -10,18 +10,18 @@
"dependencies": {
"co": "^4.6.0",
"cookie-parser": "~1.4.5",
"cross-spawn": "^7.0.3",
"express": "^4.17.1",
"filenamify-url": "^2.1.1",
"filenamify-url": "^2.1.2",
"graceful-fs": "~4.2.4",
"moment": "^2.26.0",
"nconf": "^0.11.0",
"node-cache": "^5.1.0",
"phantomjs-prebuilt": "^2.1.16",
"request": "^2.88.2",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.4.2",
"graceful-fs": "~4.2.4",
"cross-spawn": "^7.0.3",
"tmp": "~0.2.1",
"phantomjs-prebuilt": "^2.1.16"
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.4.2"
},
"devDependencies": {},
"scripts": {

View File

@ -84,9 +84,9 @@ aws4@^1.8.0:
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
bcrypt-pbkdf@^1.0.0:
version "1.0.2"
@ -183,9 +183,9 @@ color-name@^1.0.0, color-name@~1.1.4:
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-string@^1.5.2:
version "1.5.4"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6"
integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==
version "1.5.5"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014"
integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
@ -443,9 +443,9 @@ fd-slicer@~1.1.0:
pend "~1.2.0"
fecha@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.0.tgz#3ffb6395453e3f3efff850404f0a59b6747f5f41"
integrity sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg==
version "4.2.1"
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.1.tgz#0a83ad8f86ef62a091e22bb5a039cd03d23eecce"
integrity sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q==
file-stream-rotator@^0.5.7:
version "0.5.7"
@ -459,18 +459,18 @@ filename-reserved-regex@^2.0.0:
resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229"
integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik=
filenamify-url@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/filenamify-url/-/filenamify-url-2.1.1.tgz#db9e8c382a3fb9e80c50bc7b596821e80fc4cf81"
integrity sha512-6HaMJgiRamhFMlUfCu5M8xlkgPS75p6xPZdIQwKWQrI8HcywH1+npwl3uMh9QnE8aBa/xBUNQmf4HEJVOybwpQ==
filenamify-url@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/filenamify-url/-/filenamify-url-2.1.2.tgz#844607d5e86919617340ba0fad4b458dae247100"
integrity sha512-3rMbAr7vDNMOGsj1aMniQFl749QjgM+lMJ/77ZRSPTIgxvolZwoQbn8dXLs7xfd+hAdli+oTnSWZNkJJLWQFEQ==
dependencies:
filenamify "^4.0.0"
humanize-url "^2.0.0"
filenamify "^4.3.0"
humanize-url "^2.1.1"
filenamify@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-4.2.0.tgz#c99716d676869585b3b5d328b3f06590d032e89f"
integrity sha512-pkgE+4p7N1n7QieOopmn3TqJaefjdWXwEkj2XLZJLKfOgcQKkn11ahvGNgTD8mLggexLiDFQxeTs14xVU22XPA==
filenamify@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-4.3.0.tgz#62391cb58f02b09971c9d4f9d63b3cf9aba03106"
integrity sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==
dependencies:
filename-reserved-regex "^2.0.0"
strip-outer "^1.0.1"
@ -508,10 +508,10 @@ form-data@~2.3.2:
combined-stream "^1.0.6"
mime-types "^2.1.12"
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
forwarded@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==
fresh@0.5.2:
version "0.5.2"
@ -545,9 +545,9 @@ getpass@^0.1.1:
assert-plus "^1.0.0"
glob@^7.1.3:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
version "7.1.7"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
@ -557,9 +557,9 @@ glob@^7.1.3:
path-is-absolute "^1.0.0"
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@~4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
version "4.2.6"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
har-schema@^2.0.0:
version "2.0.0"
@ -613,12 +613,12 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"
humanize-url@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/humanize-url/-/humanize-url-2.1.0.tgz#329738ea1e18bce270129ee30a7f2757c53866d5"
integrity sha512-Z/F04Y4/VGDuUyUhwbK8NaW5gd8HqjinDMMTfBwviGblt9VUlyog6TEff+BVEh2COXgIehQ/m3Pza0uUx7h1sQ==
humanize-url@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/humanize-url/-/humanize-url-2.1.1.tgz#1be3dc2b8a23ee28fdf9db95b22962b3eb5e4683"
integrity sha512-V4nxsPGNE7mPjr1qDp471YfW8nhBiTRWrG/4usZlpvFU8I7gsV7Jvrrzv/snbLm5dWO3dr1ennu2YqnhTWFmYA==
dependencies:
normalize-url "^4.3.0"
normalize-url "^4.5.1"
iconv-lite@0.4.24:
version "0.4.24"
@ -645,10 +645,10 @@ inherits@2.0.3:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
ini@^1.3.0:
version "1.3.8"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
ini@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5"
integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==
ipaddr.js@1.9.1:
version "1.9.1"
@ -775,17 +775,17 @@ methods@~1.1.2:
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
mime-db@1.44.0:
version "1.44.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
mime-db@1.48.0:
version "1.48.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d"
integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==
mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
version "2.1.27"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
version "2.1.31"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b"
integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==
dependencies:
mime-db "1.44.0"
mime-db "1.48.0"
mime@1.6.0:
version "1.6.0"
@ -832,12 +832,12 @@ ms@^2.1.1:
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
nconf@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/nconf/-/nconf-0.11.0.tgz#585fb59ec1360b8179361fb7a2dae4f71cd2ebaa"
integrity sha512-c4W7QqYF6p5BC7J/eVTOvtUlQgvS5CgbJ11xgjhSr8yyius7km7xgdIYHkFLR4TWY1HjsFkia/3l5OprGqCHvA==
version "0.11.2"
resolved "https://registry.yarnpkg.com/nconf/-/nconf-0.11.2.tgz#707fa9db383e85ad7e8f1a17be1b053d1bd751c4"
integrity sha512-gDmn0Fgt0U0esRE8OCF72tO8AA9dtlG9eZhW4/Ex5hozNC2/LgdhWO4vKLGHNfTxcvsv6Aoxk/ROVYJD2SAdyg==
dependencies:
async "^1.4.0"
ini "^1.3.0"
ini "^2.0.0"
secure-keys "^1.0.0"
yargs "^16.1.1"
@ -853,10 +853,10 @@ node-cache@^5.1.0:
dependencies:
clone "2.x"
normalize-url@^4.3.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
normalize-url@^4.5.1:
version "4.5.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a"
integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==
oauth-sign@~0.9.0:
version "0.9.0"
@ -864,9 +864,9 @@ oauth-sign@~0.9.0:
integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
object-hash@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.0.3.tgz#d12db044e03cd2ca3d77c0570d87225b02e1e6ea"
integrity sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg==
version "2.2.0"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5"
integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==
on-finished@~2.3.0:
version "2.3.0"
@ -957,11 +957,11 @@ progress@^1.1.8:
integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=
proxy-addr@~2.0.5:
version "2.0.6"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==
version "2.0.7"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025"
integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==
dependencies:
forwarded "~0.1.2"
forwarded "0.2.0"
ipaddr.js "1.9.1"
psl@^1.1.28:
@ -1165,9 +1165,9 @@ stack-trace@0.0.x:
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
string-width@^4.1.0, string-width@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
version "4.2.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
@ -1274,9 +1274,9 @@ unpipe@1.0.0, unpipe@~1.0.0:
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
uri-js@^4.2.2:
version "4.4.0"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"
integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
@ -1324,16 +1324,16 @@ which@^2.0.1:
isexe "^2.0.0"
winston-daily-rotate-file@^4.4.2:
version "4.5.0"
resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-4.5.0.tgz#3914ac57c4bdae1138170bec85af0c2217b253b1"
integrity sha512-/HqeWiU48dzGqcrABRlxYWVMdL6l3uKCtFSJyrqK+E2rLnSFNsgYpvwx15EgTitBLNzH69lQd/+z2ASryV2aqw==
version "4.5.5"
resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-4.5.5.tgz#cfa3a89f4eb0e4126917592b375759b772bcd972"
integrity sha512-ds0WahIjiDhKCiMXmY799pDBW+58ByqIBtUcsqr4oDoXrAI3Zn+hbgFdUxzMfqA93OG0mPLYVMiotqTgE/WeWQ==
dependencies:
file-stream-rotator "^0.5.7"
object-hash "^2.0.1"
triple-beam "^1.3.0"
winston-transport "^4.2.0"
winston-transport "^4.4.0"
winston-transport@^4.2.0, winston-transport@^4.4.0:
winston-transport@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.4.0.tgz#17af518daa690d5b2ecccaa7acf7b20ca7925e59"
integrity sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==
@ -1371,14 +1371,14 @@ wrappy@1:
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
y18n@^5.0.5:
version "5.0.5"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"
integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
yargs-parser@^20.2.2:
version "20.2.4"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
version "20.2.7"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a"
integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==
yargs@^16.1.1:
version "16.2.0"

View File

@ -3,7 +3,8 @@
"elastic": {
"Scheme": "http",
"Host": "onlyoffice-elasticsearch",
"Port": "9200"
"Port": "9200",
"Threads": "1"
}
}
}

View File

@ -19,18 +19,12 @@ import SectionToggler from "./sub-components/section-toggler";
import ReactResizeDetector from "react-resize-detector";
import FloatingButton from "../FloatingButton";
import { inject, observer } from "mobx-react";
import { SelectableGroup } from "react-selectable-fast";
import Selecto from "react-selecto";
import styled from "styled-components";
const StyledSelectableGroup = styled(SelectableGroup)`
display: contents;
.selectable-selectbox {
display: ${(props) => (props.dragging ? "none" : "block")};
border: 1px dotted #5c6a8e;
background-color: #6582c9;
const StyledSelectoWrapper = styled.div`
.selecto-selection {
z-index: 200;
opacity: 0.4;
}
`;
@ -91,9 +85,15 @@ class PageLayout extends React.Component {
this.timeoutHandler = null;
this.intervalHandler = null;
this.scroll = null;
}
componentDidUpdate(prevProps) {
if (!this.scroll) {
this.scroll = document.getElementsByClassName("section-scroll")[0];
}
if (
(this.props.hideAside &&
!this.state.isArticlePinned &&
@ -175,15 +175,30 @@ class PageLayout extends React.Component {
isMobile && this.props.setArticleVisibleOnUnpin(true);
};
duringSelection = (duringItems) => {
if (!this.props.uploadFiles || isMobile) return;
const items = [];
for (let item of duringItems) {
items.push(item.props.item);
}
onSelect = (e) => {
if (this.props.dragging) return;
const items = e.selected;
this.props.setSelections(items);
};
dragCondition = (e) => {
const path = e.inputEvent.composedPath();
const isBackdrop = path.some(
(x) => x.classList && x.classList.contains("backdrop-active")
);
const notSelectablePath = path.some(
(x) => x.classList && x.classList.contains("not-selectable")
);
if (notSelectablePath || isBackdrop) {
return false;
} else return true;
};
onScroll = (e) => {
this.scroll.scrollBy(e.direction[0] * 10, e.direction[1] * 10);
};
render() {
const {
onDrop,
@ -437,19 +452,35 @@ class PageLayout extends React.Component {
);
};
return isMobile || !uploadFiles ? (
renderPageLayout()
) : (
<StyledSelectableGroup
dragging={dragging}
enableDeselect
resetOnStart
allowClickWithoutSelected={false}
duringSelection={this.duringSelection}
ignoreList={[".not-selectable", "draggable"]}
>
const scrollOptions = this.scroll
? {
container: this.scroll,
throttleTime: 0,
threshold: 100,
}
: {};
return (
<>
{renderPageLayout()}
</StyledSelectableGroup>
{!isMobile && uploadFiles && !dragging && (
<StyledSelectoWrapper>
<Selecto
dragContainer={".main"}
selectableTargets={[".files-row"]}
hitRate={1}
selectByClick={false}
selectFromInside={true}
ratio={0}
continueSelect={false}
onSelect={this.onSelect}
dragCondition={this.dragCondition}
scrollOptions={scrollOptions}
onScroll={this.onScroll}
/>
</StyledSelectoWrapper>
)}
</>
);
}
}

View File

@ -77,7 +77,6 @@ class SectionBody extends React.Component {
super(props);
this.focusRef = React.createRef();
this.scrollRef = React.createRef();
}
// shouldComponentUpdate(nextProps) {
@ -91,7 +90,6 @@ class SectionBody extends React.Component {
componentWillUnmount() {
this.focusRef = null;
this.scrollRef = null;
}
render() {
@ -101,7 +99,6 @@ class SectionBody extends React.Component {
children,
onDrop,
pinned,
setSelections,
uploadFiles,
viewAs,
withScroll,
@ -115,8 +112,6 @@ class SectionBody extends React.Component {
}
: {};
const scrollProp = uploadFiles ? { ref: this.scrollRef } : {};
return uploadFiles ? (
<StyledDropZoneBody
isDropZone
@ -128,7 +123,7 @@ class SectionBody extends React.Component {
>
{withScroll ? (
!isMobile ? (
<Scrollbar {...scrollProp} stype="mediumBlack">
<Scrollbar scrollclass="section-scroll" stype="mediumBlack">
<div className="section-wrapper">
<div className="section-wrapper-content" {...focusProps}>
{children}
@ -160,7 +155,7 @@ class SectionBody extends React.Component {
>
{withScroll ? (
!isMobile ? (
<Scrollbar {...scrollProp} stype="mediumBlack">
<Scrollbar stype="mediumBlack">
<div className="section-wrapper">
<div className="section-wrapper-content" {...focusProps}>
{children}
@ -194,7 +189,6 @@ SectionBody.propTypes = {
autoFocus: PropTypes.bool,
pinned: PropTypes.bool,
onDrop: PropTypes.func,
setSelections: PropTypes.func,
uploadFiles: PropTypes.bool,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),

View File

@ -18,6 +18,6 @@
},
"dependencies": {
"global": "^4.4.0",
"react-selectable-fast": "^3.4.0"
"react-selecto": "^1.12.0"
}
}

View File

@ -82,12 +82,12 @@ const Scrollbar = React.forwardRef((props, ref) => {
/>
);
const renderView = ({ style, ...props }) => (
const renderView = ({ style, ...rest }) => (
<div
{...props}
{...rest}
style={{ ...style, ...view }}
tabIndex={-1}
className={"scroll-body"}
className={`${props.scrollclass} scroll-body`}
/>
);

View File

@ -41,15 +41,14 @@ namespace ASC.Web.CRM
[Scope]
public class PathProvider
{
private HttpContext _httpContext;
// private HttpContext _httpContext;
private CommonLinkUtility _commonLinkUtility;
private WebPath _webPath;
// private WebPath _webPath;
public PathProvider(IHttpContextAccessor httpContextAccessor,
CommonLinkUtility commonLinkUtility)
public PathProvider(CommonLinkUtility commonLinkUtility)
{
_commonLinkUtility = commonLinkUtility;
_httpContext = httpContextAccessor.HttpContext;
// _httpContext = httpContextAccessor.HttpContext;
BaseAbsolutePath = _commonLinkUtility.ToAbsolute(BaseVirtualPath);
}

View File

@ -341,7 +341,7 @@ namespace ASC.CRM.Core.Dao
var ids = new List<int>();
List<int> contactsIds;
// List<int> contactsIds;
IReadOnlyCollection<DbContactInfo> dbContactInfos;

View File

@ -202,7 +202,7 @@ namespace ASC.CRM.Core.Dao
}
catch (Exception ex)
{
throw new ArgumentException(CRMErrorsResource.CustomFieldMaskNotValid);
throw new ArgumentException(CRMErrorsResource.CustomFieldMaskNotValid, ex);
}
}
}
@ -352,7 +352,7 @@ namespace ASC.CRM.Core.Dao
}
catch (Exception ex)
{
throw new ArgumentException(CRMErrorsResource.CustomFieldMaskNotValid);
throw new ArgumentException(CRMErrorsResource.CustomFieldMaskNotValid, ex);
}
}
}

View File

@ -296,14 +296,14 @@ namespace ASC.CRM.Core.Dao
if (item.CategoryID == (int)HistoryCategorySystem.MailMessage)
{
var jsonObj = JsonDocument.Parse(item.Content).RootElement;
var messageId = jsonObj.GetProperty("message_id").GetInt32();
// var jsonObj = JsonDocument.Parse(item.Content).RootElement;
// var messageId = jsonObj.GetProperty("message_id").GetInt32();
//var apiServer = new ApiServer();
//var msg = apiServer.GetApiResponse(
// String.Format("{0}mail/messages/{1}.json?id={1}&loadImages=true&needSanitize=true", SetupInfo.WebApiBaseUrl, messageId), "GET");
String msg = null;
// String msg = null;
// if (msg == null)
throw new ArgumentException("Mail message cannot be found");

View File

@ -58,13 +58,21 @@ namespace ASC.CRM.Core.Dao
private Dictionary<EntityType, IEnumerable<int>> _findedIDs;
//TODO: setting _fullTextSearchEnable field
private readonly bool _fullTextSearchEnable;
private bool _fullTextSearchEnable;
private readonly DaoFactory _daoFactory;
private readonly CrmSecurity _crmSecurity;
private readonly BundleSearch _bundleSearch;
private readonly WebImageSupplier _webImageSupplier;
private readonly TenantUtil _tenantUtil;
private readonly PathProvider _pathProvider;
private readonly FactoryIndexerTask _factoryIndexerTask;
private readonly FactoryIndexerInvoice _factoryIndexerInvoice;
private DaoFactory DaoFactory { get; set; }
public SearchDao(DbContextManager<CrmDbContext> dbContextManager,
TenantManager tenantManager,
DaoFactory daoFactory,
SecurityContext securityContext,
CrmSecurity crmSecurity,
TenantUtil tenantUtil,
@ -84,25 +92,17 @@ namespace ASC.CRM.Core.Dao
ascCache,
mapper)
{
FactoryIndexerTask = tasksDtoIndexer;
FactoryIndexerInvoice = invoicesDtoIndexer;
CRMSecurity = crmSecurity;
TenantUtil = tenantUtil;
PathProvider = pathProvider;
WebImageSupplier = webImageSupplier;
BundleSearch = bundleSearch;
_daoFactory = daoFactory;
_factoryIndexerTask = tasksDtoIndexer;
_factoryIndexerInvoice = invoicesDtoIndexer;
_crmSecurity = crmSecurity;
_tenantUtil = tenantUtil;
_pathProvider = pathProvider;
_webImageSupplier = webImageSupplier;
_bundleSearch = bundleSearch;
}
public BundleSearch BundleSearch { get; }
public WebImageSupplier WebImageSupplier { get; }
public TenantUtil TenantUtil { get; }
public PathProvider PathProvider { get; }
public FactoryIndexerTask FactoryIndexerTask { get; }
public FactoryIndexerInvoice FactoryIndexerInvoice { get; }
public CrmSecurity CRMSecurity { get; }
public SearchResultItem[] Search(String searchText)
{
@ -111,38 +111,40 @@ namespace ASC.CRM.Core.Dao
if (keywords.Length == 0) return new List<SearchResultItem>().ToArray();
_fullTextSearchEnable = _bundleSearch.CheckFullTextSearchEnable();
if (_fullTextSearchEnable)
{
_findedIDs = new Dictionary<EntityType, IEnumerable<int>>();
List<int> casesId;
if (BundleSearch.TrySelectCase(searchText, out casesId))
if (_bundleSearch.TrySelectCase(searchText, out casesId))
{
_findedIDs.Add(EntityType.Case, casesId);
}
List<int> contactsId;
if (BundleSearch.TrySelectContact(searchText, out contactsId))
if (_bundleSearch.TrySelectContact(searchText, out contactsId))
{
_findedIDs.Add(EntityType.Contact, contactsId);
}
List<int> dealsId;
if (BundleSearch.TrySelectOpportunity(searchText, out dealsId))
if (_bundleSearch.TrySelectOpportunity(searchText, out dealsId))
{
_findedIDs.Add(EntityType.Opportunity, dealsId);
}
List<int> tasksId;
if (FactoryIndexerTask.TrySelectIds(r => r.MatchAll(searchText), out tasksId))
if (_factoryIndexerTask.TrySelectIds(r => r.MatchAll(searchText), out tasksId))
{
_findedIDs.Add(EntityType.Task, tasksId);
}
List<int> invoicesId;
if (FactoryIndexerInvoice.TrySelectIds(r => r.MatchAll(searchText), out invoicesId))
if (_factoryIndexerInvoice.TrySelectIds(r => r.MatchAll(searchText), out invoicesId))
{
_findedIDs.Add(EntityType.Invoice, invoicesId);
}
@ -237,16 +239,16 @@ namespace ASC.CRM.Core.Dao
sqlQuery.ToList().ForEach(x =>
{
if (!CRMSecurity.CanAccessTo(new Task { ID = x.Id })) return;
if (!_crmSecurity.CanAccessTo(new Task { ID = x.Id })) return;
result.Add(new SearchResultItem
{
Name = x.Title,
Description = HtmlUtil.GetText(x.Description, 120),
URL = PathProvider.BaseAbsolutePath,
Date = TenantUtil.DateTimeFromUtc(x.CreateOn),
URL = _pathProvider.BaseAbsolutePath,
Date = _tenantUtil.DateTimeFromUtc(x.CreateOn),
Additional = new Dictionary<String, Object>
{ { "imageRef", WebImageSupplier.GetAbsoluteWebPath("tasks_widget.png", ProductEntryPoint.ID) },
{ { "imageRef", _webImageSupplier.GetAbsoluteWebPath("tasks_widget.png", ProductEntryPoint.ID) },
{"relativeInfo", GetPath(
x.ContactId,
x.EntityId,
@ -280,16 +282,16 @@ namespace ASC.CRM.Core.Dao
sqlQuery.ToList().ForEach(x =>
{
if (!CRMSecurity.CanAccessTo(new Deal { ID = x.Id })) return;
if (!_crmSecurity.CanAccessTo(new Deal { ID = x.Id })) return;
result.Add(new SearchResultItem
{
Name = x.Title,
Description = HtmlUtil.GetText(x.Description, 120),
URL = string.Concat(PathProvider.BaseAbsolutePath, string.Format("deals.aspx?id={0}", x.Id)),
Date = TenantUtil.DateTimeFromUtc(x.CreateOn),
URL = string.Concat(_pathProvider.BaseAbsolutePath, string.Format("deals.aspx?id={0}", x.Id)),
Date = _tenantUtil.DateTimeFromUtc(x.CreateOn),
Additional = new Dictionary<string, object>
{ { "imageRef", WebImageSupplier.GetAbsoluteWebPath("deal_widget.png", ProductEntryPoint.ID) },
{ { "imageRef", _webImageSupplier.GetAbsoluteWebPath("deal_widget.png", ProductEntryPoint.ID) },
{"relativeInfo", GetPath(
x.ContactId,
0,
@ -330,21 +332,21 @@ namespace ASC.CRM.Core.Dao
{
if (x.IsCompany)
{
if (!CRMSecurity.CanAccessTo(new Company { ID = x.Id })) return;
if (!_crmSecurity.CanAccessTo(new Company { ID = x.Id })) return;
}
else
{
if (!CRMSecurity.CanAccessTo(new Person { ID = x.Id })) return;
if (!_crmSecurity.CanAccessTo(new Person { ID = x.Id })) return;
}
result.Add(new SearchResultItem
{
Name = x.IsCompany ? x.CompanyName : String.Format("{0} {1}", x.FirstName, x.LastName),
Description = HtmlUtil.GetText(x.Notes, 120),
URL = String.Concat(PathProvider.BaseAbsolutePath, String.Format("default.aspx?id={0}", x.Id)),
Date = TenantUtil.DateTimeFromUtc(x.CreateOn),
URL = String.Concat(_pathProvider.BaseAbsolutePath, String.Format("default.aspx?id={0}", x.Id)),
Date = _tenantUtil.DateTimeFromUtc(x.CreateOn),
Additional = new Dictionary<String, Object>
{ { "imageRef", WebImageSupplier.GetAbsoluteWebPath(x.IsCompany ? "companies_widget.png" : "people_widget.png", ProductEntryPoint.ID) },
{ { "imageRef", _webImageSupplier.GetAbsoluteWebPath(x.IsCompany ? "companies_widget.png" : "people_widget.png", ProductEntryPoint.ID) },
{"relativeInfo", GetPath(
0,
0,
@ -376,16 +378,16 @@ namespace ASC.CRM.Core.Dao
sqlQuery.ToList().ForEach(x =>
{
if (!CRMSecurity.CanAccessTo(new Cases { ID = x.Id })) return;
if (!_crmSecurity.CanAccessTo(new Cases { ID = x.Id })) return;
result.Add(new SearchResultItem
{
Name = x.Title,
Description = String.Empty,
URL = String.Concat(PathProvider.BaseAbsolutePath, String.Format("cases.aspx?id={0}", x.Id)),
Date = TenantUtil.DateTimeFromUtc(x.CreateOn),
URL = String.Concat(_pathProvider.BaseAbsolutePath, String.Format("cases.aspx?id={0}", x.Id)),
Date = _tenantUtil.DateTimeFromUtc(x.CreateOn),
Additional = new Dictionary<String, Object>
{ { "imageRef", WebImageSupplier.GetAbsoluteWebPath("cases_widget.png", ProductEntryPoint.ID) },
{ { "imageRef", _webImageSupplier.GetAbsoluteWebPath("cases_widget.png", ProductEntryPoint.ID) },
{"relativeInfo", GetPath(
0,
0,
@ -421,16 +423,16 @@ namespace ASC.CRM.Core.Dao
sqlQuery.ToList().ForEach(x =>
{
if (!CRMSecurity.CanAccessTo(new Invoice { ID = x.Id })) return;
if (!_crmSecurity.CanAccessTo(new Invoice { ID = x.Id })) return;
result.Add(new SearchResultItem
{
Name = x.Number,
Description = String.Empty,
URL = String.Concat(PathProvider.BaseAbsolutePath, String.Format("invoices.aspx?id={0}", x.Id)),
Date = TenantUtil.DateTimeFromUtc(x.CreateOn),
URL = String.Concat(_pathProvider.BaseAbsolutePath, String.Format("invoices.aspx?id={0}", x.Id)),
Date = _tenantUtil.DateTimeFromUtc(x.CreateOn),
Additional = new Dictionary<String, Object>
{ { "imageRef", WebImageSupplier.GetAbsoluteWebPath("invoices_widget.png", ProductEntryPoint.ID) },
{ { "imageRef", _webImageSupplier.GetAbsoluteWebPath("invoices_widget.png", ProductEntryPoint.ID) },
{"relativeInfo", GetPath(
x.ContactId,
x.EntityId,
@ -451,20 +453,20 @@ namespace ASC.CRM.Core.Dao
if (contactID == 0) return String.Empty;
if (entityID == 0)
return DaoFactory.GetContactDao().GetByID(contactID).GetTitle();
return _daoFactory.GetContactDao().GetByID(contactID).GetTitle();
switch (entityType)
{
case EntityType.Company:
case EntityType.Person:
case EntityType.Contact:
var contact = DaoFactory.GetContactDao().GetByID(contactID);
var contact = _daoFactory.GetContactDao().GetByID(contactID);
return contact == null ? string.Empty : contact.GetTitle();
case EntityType.Opportunity:
var opportunity = DaoFactory.GetDealDao().GetByID(entityID);
var opportunity = _daoFactory.GetDealDao().GetByID(entityID);
return opportunity == null ? string.Empty : opportunity.Title;
case EntityType.Case:
var @case = DaoFactory.GetCasesDao().GetByID(entityID);
var @case = _daoFactory.GetCasesDao().GetByID(entityID);
return @case == null ? string.Empty : @case.Title;
default:
throw new ArgumentException();

View File

@ -29,6 +29,8 @@ using System.Linq;
using ASC.Common;
using ASC.CRM.Core.EF;
using ASC.CRM.Core.Enums;
using ASC.ElasticSearch;
namespace ASC.Web.CRM.Core.Search
{
@ -43,8 +45,10 @@ namespace ASC.Web.CRM.Core.Search
private readonly FactoryIndexerTask _factoryIndexerTask;
private readonly FactoryIndexerCase _factoryIndexerCase;
private readonly FactoryIndexerInvoice _factoryIndexerInvoice;
private readonly FactoryIndexer _factoryIndexer;
public BundleSearch(FactoryIndexerContact factoryIndexerContact,
public BundleSearch( FactoryIndexer factoryIndexer,
FactoryIndexerContact factoryIndexerContact,
FactoryIndexerContactInfo factoryIndexerContactInfo,
FactoryIndexerFieldValue factoryIndexerFieldValue,
FactoryIndexerEvents factoryIndexerEvents,
@ -61,6 +65,13 @@ namespace ASC.Web.CRM.Core.Search
_factoryIndexerTask = factoryIndexerTask;
_factoryIndexerCase = factoryIndexerCase;
_factoryIndexerInvoice = factoryIndexerInvoice;
_factoryIndexer = factoryIndexer;
}
public bool CheckFullTextSearchEnable()
{
return _factoryIndexer.CheckState();
}
public bool TrySelectCase(string text, out List<int> result)

View File

@ -67,7 +67,6 @@ namespace ASC.Web.CRM.Classes
private readonly SecurityContext _securityContext;
private readonly UserManager _userManager;
private readonly DaoFactory _daoFactory;
private readonly ILog _logManager;
public ImportDataOperation(Global global,
TenantManager tenantManager,
@ -86,6 +85,7 @@ namespace ASC.Web.CRM.Classes
_securityContext = securityContext;
_dataStore = global.GetStore();
_tenantManager = tenantManager;
_tenantID = tenantManager.GetCurrentTenant().TenantId;
_author = _securityContext.CurrentAccount;

View File

@ -115,13 +115,19 @@ namespace ASC.Web.CRM.Classes
private Guid _userId;
public object Error { get; set; }
private readonly PdfCreator PdfCreator;
private readonly SecurityContext SecurityContext;
private readonly TenantManager TenantManager;
private readonly PdfCreator _pdfCreator;
private readonly SecurityContext _securityContext;
private readonly TenantManager _tenantManager;
public PdfProgressItem(IHttpContextAccessor httpContextAccessor)
public PdfProgressItem(IHttpContextAccessor httpContextAccessor,
PdfCreator pdfCreator,
SecurityContext securityContext,
TenantManager tenantManager)
{
_contextUrl = httpContextAccessor.HttpContext != null ? httpContextAccessor.HttpContext.Request.GetUrlRewriter().ToString() : null;
_pdfCreator = pdfCreator;
_securityContext = securityContext;
_tenantManager = tenantManager;
Error = null;
Percentage = 0;
@ -146,9 +152,9 @@ namespace ASC.Web.CRM.Classes
{
Percentage = 0;
TenantManager.SetCurrentTenant(_tenantId);
_tenantManager.SetCurrentTenant(_tenantId);
SecurityContext.AuthenticateMe(_userId);
_securityContext.AuthenticateMe(_userId);
//if (HttpContext.Current == null && !WorkContext.IsMono)
//{
@ -157,7 +163,7 @@ namespace ASC.Web.CRM.Classes
// new HttpResponse(new System.IO.StringWriter()));
//}
PdfCreator.CreateAndSaveFile(_invoiceId);
_pdfCreator.CreateAndSaveFile(_invoiceId);
Percentage = 100;
PublishChanges();

View File

@ -5,7 +5,6 @@ import DragAndDrop from "@appserver/components/drag-and-drop";
import Row from "@appserver/components/row";
import FilesRowContent from "./FilesRowContent";
import { withRouter } from "react-router-dom";
import { createSelectable } from "react-selectable-fast";
import withFileActions from "../../../../../HOCs/withFileActions";
import withContextOptions from "../../../../../HOCs/withContextOptions";
@ -46,7 +45,7 @@ const StyledSimpleFilesRow = styled(Row)`
}
`;
const SimpleFilesRow = createSelectable((props) => {
const SimpleFilesRow = (props) => {
const {
item,
sectionWidth,
@ -72,7 +71,7 @@ const SimpleFilesRow = createSelectable((props) => {
<DragAndDrop
data-title={item.title}
value={value}
className={className}
className={`files-row ${className}`}
onDrop={onDrop}
onMouseDown={onMouseDown}
dragging={dragging && isDragging}
@ -100,7 +99,7 @@ const SimpleFilesRow = createSelectable((props) => {
</DragAndDrop>
</div>
);
});
};
export default withTranslation(["Home", "Translations"])(
withFileActions(withRouter(withContextOptions(SimpleFilesRow)))

View File

@ -6,11 +6,10 @@ import DragAndDrop from "@appserver/components/drag-and-drop";
import Tile from "./sub-components/Tile";
import FilesTileContent from "./FilesTileContent";
import { withRouter } from "react-router-dom";
import { createSelectable } from "react-selectable-fast";
import withFileActions from "../hoc/withFileActions";
const FilesTile = createSelectable((props) => {
const FilesTile = (props) => {
const {
item,
sectionWidth,
@ -59,6 +58,6 @@ const FilesTile = createSelectable((props) => {
</DragAndDrop>
</div>
);
});
};
export default withTranslation("Home")(withFileActions(withRouter(FilesTile)));

View File

@ -500,7 +500,7 @@ class FilesActionStore {
selectRowAction = (checked, file) => {
const { selected, setSelected, selectFile, deselectFile } = this.filesStore;
selected === "close" && setSelected("none");
//selected === "close" && setSelected("none");
if (checked) {
selectFile(file);
} else {

View File

@ -1194,14 +1194,28 @@ class FilesStore {
setSelections = (items) => {
if (!items.length && !this.selection.length) return;
if (items.length !== this.selection.length) {
this.setSelection(items);
} else if (items.length === 0) {
const item = this.selection.find(
(x) => x.id === item[0].id && x.fileExst === item.fileExst
);
if (!item) this.setSelection(items);
//if (items.length !== this.selection.length) {
const newSelection = [];
for (let item of items) {
const value = item.getAttribute("value");
const splitValue = value && value.split("_");
const fileType = splitValue[0];
const id =
splitValue[splitValue.length - 1] === "draggable"
? splitValue.slice(1, -1).join("_")
: splitValue.slice(1).join("_");
if (fileType === "file") {
newSelection.push(this.files.find((f) => f.id == id && f.fileExst));
} else {
newSelection.push(this.folders.find((f) => f.id == id && !f.fileExst));
}
}
this.setSelection(newSelection);
//}
};
getShareUsers(folderIds, fileIds) {

View File

@ -27,7 +27,7 @@ const Main = React.memo((props) => {
const vh = (window.innerHeight - 57) * 0.01;
document.documentElement.style.setProperty("--vh", `${vh}px`);
//console.log("Main render");
return <StyledMain {...props} />;
return <StyledMain className="main" {...props} />;
});
/*Main.defaultProps = {

119
yarn.lock
View File

@ -1333,11 +1333,28 @@
exec-sh "^0.3.2"
minimist "^1.2.0"
"@daybrush/utils@^1.0.0", "@daybrush/utils@^1.1.1", "@daybrush/utils@^1.3.1", "@daybrush/utils@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@daybrush/utils/-/utils-1.4.0.tgz#c42ea6e65c044b8854d3456531deb226f2db7a56"
integrity sha512-P+l76QjGFwu8IbrFoIHO1equrL02h6wYJLRZ37Snr6o3bPEwPS0mdJqyTZipHMhrWoR44UVtZTUi41GPCDc9PQ==
"@discoveryjs/json-ext@^0.5.0":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752"
integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==
"@egjs/children-differ@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@egjs/children-differ/-/children-differ-1.0.1.tgz#5465fa80671d5ca3564ebe912f48b05b3e8a14fd"
integrity sha512-DRvyqMf+CPCOzAopQKHtW+X8iN6Hy6SFol+/7zCUiE5y4P/OB8JP8FtU4NxtZwtafvSL4faD5KoQYPj3JHzPFQ==
dependencies:
"@egjs/list-differ" "^1.0.0"
"@egjs/list-differ@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@egjs/list-differ/-/list-differ-1.0.0.tgz#2277aff52e3e4bd9318d5c30ffc3ba3b6216f05e"
integrity sha512-HsbMKc0ZAQH+EUeCmI/2PvTYSybmkaWwakU8QGDYYgMVIg9BQ5sM0A0Nnombjxo2+JzXHxmH+jw//yGX+y6GYw==
"@emotion/babel-plugin-jsx-pragmatic@^0.1.5":
version "0.1.5"
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-0.1.5.tgz#27debfe9c27c4d83574d509787ae553bf8a34d7e"
@ -2748,6 +2765,27 @@
estree-walker "^1.0.1"
picomatch "^2.2.2"
"@scena/dragscroll@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@scena/dragscroll/-/dragscroll-1.0.1.tgz#efa81c984f0dd00ce90130f29580a471e2a171dc"
integrity sha512-EQXsJku85gb8dxlCWmMpqWieunN/Ojr5u5czNQwwC/Ab0YjhdHtvvK9DGS9ej9Uu4+MbN/F4HUTIMhhukx6dSg==
dependencies:
"@scena/event-emitter" "^1.0.2"
"@scena/event-emitter@^1.0.2", "@scena/event-emitter@^1.0.5":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@scena/event-emitter/-/event-emitter-1.0.5.tgz#047e3acef93cf238d7ce3a8cc5a12ec6bd9c3bb1"
integrity sha512-AzY4OTb0+7ynefmWFQ6hxDdk0CySAq/D4efljfhtRHCOP7MBF9zUfhKG3TJiroVjASqVgkRJFdenS8ArZo6Olg==
dependencies:
"@daybrush/utils" "^1.1.1"
"@scena/matrix@^1.0.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@scena/matrix/-/matrix-1.1.1.tgz#5297f71825c72e2c2c8f802f924f482ed200c43c"
integrity sha512-JVKBhN0tm2Srl+Yt+Ywqu0oLgLcdemDQlD1OxmN9jaCTwaFPZ7tY8n6dhVgMEaR9qcR7r+kAlMXnSfNyYdE+Vg==
dependencies:
"@daybrush/utils" "^1.4.0"
"@sheerun/mutationobserver-shim@^0.3.2":
version "0.3.3"
resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz#5405ee8e444ed212db44e79351f0c70a582aae25"
@ -6836,6 +6874,22 @@ css-select@^4.1.2:
domutils "^2.6.0"
nth-check "^2.0.0"
css-styled@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/css-styled/-/css-styled-1.0.0.tgz#6fe10a98f95c24fa66cb1c41e11e7c00bcedac13"
integrity sha512-lDdPvM2/djv+La110zVY3RGQ7X4OOlzLS+IEjRcn8UlUmJd1+GNcGfDFmsKWwnLBupsY1w0QM1gRgV4RdcCjfw==
dependencies:
"@daybrush/utils" "^1.0.0"
string-hash "^1.1.3"
css-to-mat@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/css-to-mat/-/css-to-mat-1.0.3.tgz#5c0d9b572b68b57fa8ba0b1a4c572c18ce3b2b60"
integrity sha512-HADRhVqPc8wFqEp6ClK+uuPYg+FMBinNo2ReLyI/KQCncmHPJ60o5zldyJG7NjsTqXWbdfGJO51jnoxfMvWJiA==
dependencies:
"@daybrush/utils" "^1.3.1"
"@scena/matrix" "^1.0.0"
css-to-react-native@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756"
@ -8578,6 +8632,11 @@ framesync@5.3.0:
dependencies:
tslib "^2.1.0"
framework-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/framework-utils/-/framework-utils-1.1.0.tgz#a3b528bce838dfd623148847dc92371b09d0da2d"
integrity sha512-KAfqli5PwpFJ8o3psRNs8svpMGyCSAe8nmGcjQ0zZBWN2H6dZDnq+ABp3N3hdUmFeMrLtjOCTXD4yplUJIWceg==
fresh@0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
@ -8727,6 +8786,14 @@ gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
gesto@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/gesto/-/gesto-1.3.0.tgz#ff141964faecbbae38e0cfb008607c533a6c694f"
integrity sha512-be9jSmhiDMjMzCQwBewOp/kBtKDB97d3e2lNkojMW9Ckgeu8c8Qglx7fopnLweoIGlIYsqDqwxHdJAkyL/TmFA==
dependencies:
"@daybrush/utils" "^1.0.0"
"@scena/event-emitter" "^1.0.2"
get-caller-file@^2.0.1:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
@ -10991,6 +11058,20 @@ junk@^3.1.0:
resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1"
integrity sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==
keycode@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
integrity sha1-PQr1bce4uOXLqNCpfxByBO7CKwQ=
keycon@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/keycon/-/keycon-1.1.2.tgz#a7a9f5f22f32012fafd11e68c4283911d0738bce"
integrity sha512-yCoUAfwqmQUWrtOFuZhicxasF/4ae+M0aH8yV1wEKKZCZql8v6jWhlVF9dT5i1TfuHSmgt/GNuCaWIHT8wk6eQ==
dependencies:
"@daybrush/utils" "^1.0.0"
"@scena/event-emitter" "^1.0.2"
keycode "^2.2.0"
killable@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
@ -12585,6 +12666,13 @@ osenv@^0.1.4, osenv@^0.1.5:
os-homedir "^1.0.0"
os-tmpdir "^1.0.0"
overlap-area@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/overlap-area/-/overlap-area-1.0.0.tgz#d44db45b810ec05c4c2c9f430ab60c9473f2101b"
integrity sha512-Oi3hxRf6Flvv1upldnjOtV7euFkc75G/wsxYfS/ssNKEZ3Z+HbIoPHkFfLH3hgwqLJKpq9wdFo7I6xcdS6k8yg==
dependencies:
"@daybrush/utils" "^1.3.1"
overlayscrollbars@^1.13.1:
version "1.13.1"
resolved "https://registry.yarnpkg.com/overlayscrollbars/-/overlayscrollbars-1.13.1.tgz#0b840a88737f43a946b9d87875a2f9e421d0338a"
@ -13987,10 +14075,12 @@ react-router@5.2.0, react-router@^5.2.0:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
react-selectable-fast@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/react-selectable-fast/-/react-selectable-fast-3.4.0.tgz#fb3e6490ebd3f91309b5a58ca17f629baab6e625"
integrity sha512-4DVrX6eTCLqt+GVtSNAEcL3S9ODUvtcPrzUL1ObjSL507D+i+HE4tCokSxUn4PqLtEsrWxXJU+CVC43XmwIVyw==
react-selecto@^1.12.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/react-selecto/-/react-selecto-1.12.0.tgz#dd1d3c415d7c9f302cc358fcec7b6f7bf0ea3bd3"
integrity sha512-W4dX0d5EVeAuBK485tWm8uF9xjAavdm+HQ4dIghXU3t9NvSN0WOfCvW+gD/o3BszXb7y7XPHp/42hXxBuJ6w9w==
dependencies:
selecto "~1.12.1"
react-shallow-renderer@^16.13.1:
version "16.14.1"
@ -14972,6 +15062,22 @@ select@^1.1.2:
resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=
selecto@~1.12.1:
version "1.12.1"
resolved "https://registry.yarnpkg.com/selecto/-/selecto-1.12.1.tgz#3cc1852fa4d243c7f15523837bb748f122440ccc"
integrity sha512-X/NcHVFp55YbmV15N8mq6NUexQ+5JM1lKXbGSjdS7hGXLcJ4vxs6VELQtNpoETSTdgDL3d0Hvp0z7sR9MtkXXg==
dependencies:
"@daybrush/utils" "^1.4.0"
"@egjs/children-differ" "^1.0.1"
"@scena/dragscroll" "^1.0.1"
"@scena/event-emitter" "^1.0.5"
css-styled "^1.0.0"
css-to-mat "^1.0.3"
framework-utils "^1.1.0"
gesto "^1.3.0"
keycon "^1.1.2"
overlap-area "^1.0.0"
selfsigned@^1.10.8:
version "1.10.11"
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.11.tgz#24929cd906fe0f44b6d01fb23999a739537acbe9"
@ -15614,6 +15720,11 @@ strict-uri-encode@^2.0.0:
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY=
string-hash@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b"
integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=
string-length@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"