Merge branch 'develop' into release/1.0.0

This commit is contained in:
Alexey Safronov 2021-08-16 11:08:09 +03:00
commit 9f5c732501
16 changed files with 719 additions and 666 deletions

12
build/build.static.bat Normal file
View File

@ -0,0 +1,12 @@
PUSHD %~dp0..
REM call yarn wipe
call yarn install
REM call yarn build
call yarn build
REM call yarn wipe
call yarn deploy
pause

View File

@ -123,14 +123,24 @@ namespace ASC.Common.Caching
.SetErrorHandler((_, e) => Log.Error(e))
.Build())
{
try
{
//TODO: must add checking exist
adminClient.CreateTopicsAsync(
new TopicSpecification[]
new TopicSpecification[]
{
new TopicSpecification
{
Name = channelName
}
new TopicSpecification
{
Name = channelName,
NumPartitions = 1,
ReplicationFactor = 1
}
}).Wait();
}
catch(AggregateException)
{
}
}

View File

@ -39,6 +39,7 @@ using ASC.Core.Common.Settings;
using ASC.Data.Storage.Configuration;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
@ -149,7 +150,7 @@ namespace ASC.Data.Storage
private static readonly IDictionary<string, bool> Existing = new ConcurrentDictionary<string, bool>();
private WebPathSettings WebPathSettings { get; }
private StaticUploader StaticUploader { get; }
public IServiceProvider ServiceProvider { get; }
private SettingsManager SettingsManager { get; }
private StorageSettingsHelper StorageSettingsHelper { get; }
private IHttpContextAccessor HttpContextAccessor { get; }
@ -159,7 +160,7 @@ namespace ASC.Data.Storage
public WebPath(
WebPathSettings webPathSettings,
StaticUploader staticUploader,
IServiceProvider serviceProvider,
SettingsManager settingsManager,
StorageSettingsHelper storageSettingsHelper,
IHostEnvironment hostEnvironment,
@ -167,7 +168,7 @@ namespace ASC.Data.Storage
IOptionsMonitor<ILog> options)
{
WebPathSettings = webPathSettings;
StaticUploader = staticUploader;
ServiceProvider = serviceProvider;
SettingsManager = settingsManager;
StorageSettingsHelper = storageSettingsHelper;
HostEnvironment = hostEnvironment;
@ -177,6 +178,7 @@ namespace ASC.Data.Storage
public WebPath(
WebPathSettings webPathSettings,
IServiceProvider serviceProvider,
StaticUploader staticUploader,
SettingsManager settingsManager,
StorageSettingsHelper storageSettingsHelper,
@ -184,7 +186,7 @@ namespace ASC.Data.Storage
IHostEnvironment hostEnvironment,
CoreBaseSettings coreBaseSettings,
IOptionsMonitor<ILog> options)
: this(webPathSettings, staticUploader, settingsManager, storageSettingsHelper, hostEnvironment, coreBaseSettings, options)
: this(webPathSettings, serviceProvider, settingsManager, storageSettingsHelper, hostEnvironment, coreBaseSettings, options)
{
HttpContextAccessor = httpContextAccessor;
}
@ -196,7 +198,7 @@ namespace ASC.Data.Storage
throw new ArgumentException(string.Format("bad path format {0} remove '~'", relativePath), "relativePath");
}
if (CoreBaseSettings.Standalone && StaticUploader.CanUpload())
if (CoreBaseSettings.Standalone && ServiceProvider.GetService<StaticUploader>().CanUpload()) //hack for skip resolve DistributedTaskQueueOptionsManager
{
try
{

View File

@ -95,8 +95,8 @@
"images": "images",
"hide-settings": "Monitoring,LdapSettings,DocService,MailService,PublicPortal,ProxyHttpContent,SpamSubscription,FullTextSearch",
"hub": {
"url": "/socketio/socket.io/",
"internal": "http://localhost:9899/"
"url": "",
"internal": ""
},
"cultures": "en-US,ru-RU,de-DE,it-IT,fr-FR,pt-BR",
"url-shortener": {

View File

@ -16,7 +16,7 @@
"products/ASC.Calendar/Client"
],
"scripts": {
"wipe": "rimraf node_modules yarn.lock web/**/node_modules products/**/node_modules",
"wipe": "shx rm -rf node_modules yarn.lock web/**/node_modules products/**/node_modules",
"build": "concurrently \"wsrun --parallel build\"",
"sw-build": "workbox injectManifest config/workbox-config.js && yarn sw-modify && yarn sw-minimize",
"sw-calendar-replace": "replace-in-files --string='products/ASC.Calendar/client/' --replacement='products/calendar/' build/deploy/public/sw.js",
@ -39,13 +39,13 @@
"storybook": "yarn workspace @appserver/components storybook",
"storybook-build": "yarn workspace @appserver/components run storybook-build",
"bump": "lerna version --no-push --no-git-tag-version",
"deploy": "rimraf build/deploy && concurrently \"wsrun --parallel deploy\" && cp -r public build/deploy && yarn sw-build"
"deploy": "shx rm -rf build/deploy && concurrently \"wsrun --parallel deploy\" && shx cp -r public build/deploy && yarn sw-build"
},
"devDependencies": {
"concurrently": "^5.3.0",
"lerna": "^3.22.1",
"replace-in-files-cli": "^1.0.0",
"rimraf": "^3.0.2",
"shx": "^0.3.3",
"terser": "^5.7.1",
"workbox-cli": "^6.2.3",
"wsrun": "^5.2.4"

View File

@ -9,9 +9,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5014",
"build": "webpack --mode production",
"deploy": "mkdirp ../../../build/deploy/products/ASC.CRM/client && cp -r -u dist/* ../../../build/deploy/products/ASC.CRM/client",
"deploy": "shx mkdir -p ../../../build/deploy/products/ASC.CRM/client && shx cp -r dist/* ../../../build/deploy/products/ASC.CRM/client",
"serve": "serve dist -p 5014",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -29,9 +29,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -9,9 +9,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5017",
"build": "webpack --mode production",
"deploy": "mkdirp ../../../build/deploy/products/ASC.Calendar/client && cp -r -u dist/* ../../../build/deploy/products/ASC.Calendar/client",
"deploy": "shx mkdir -p ../../../build/deploy/products/ASC.Calendar/client && shx cp -r dist/* ../../../build/deploy/products/ASC.Calendar/client",
"serve": "serve dist -p 5017",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -29,9 +29,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -9,9 +9,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5008",
"build": "webpack --mode production",
"deploy": "mkdirp ../../../build/deploy/products/ASC.Files/client && cp -r -u dist/* ../../../build/deploy/products/ASC.Files/client",
"deploy": "shx mkdir -p ../../../build/deploy/products/ASC.Files/client && shx cp -r dist/* ../../../build/deploy/products/ASC.Files/client",
"serve": "serve dist -p 5008",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -31,11 +31,10 @@
"interpolate-html-plugin": "^4.0.0",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^1.3.9",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"sass": "^1.29.0",
"sass-loader": "^10.1.0",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -744,6 +744,8 @@ namespace ASC.Files.Core.Data
List<DbFile> toUpdate;
var trashId = GlobalFolder.GetFolderTrash<int>(DaoFactory);
using (var tx = FilesDbContext.Database.BeginTransaction())
{
var fromFolders = Query(FilesDbContext.Files)
@ -760,7 +762,7 @@ namespace ASC.Files.Core.Data
{
f.FolderId = toFolderId;
if (GlobalFolder.GetFolderTrash<int>(DaoFactory).Equals(toFolderId))
if (trashId.Equals(toFolderId))
{
f.ModifiedBy = AuthContext.CurrentAccount.ID;
f.ModifiedOn = DateTime.UtcNow;

View File

@ -9,9 +9,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5016",
"build": "webpack --mode production",
"deploy": "mkdirp ../../../build/deploy/products/ASC.Mail/client && cp -r -u dist/* ../../../build/deploy/products/ASC.Mail/client",
"deploy": "shx mkdir -p ../../../build/deploy/products/ASC.Mail/client && shx cp -r dist/* ../../../build/deploy/products/ASC.Mail/client",
"serve": "serve dist -p 5016",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -29,9 +29,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -9,9 +9,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5002",
"build": "webpack --mode production",
"deploy": "mkdirp ../../../build/deploy/products/ASC.People/client && cp -r -u dist/* ../../../build/deploy/products/ASC.People/client",
"deploy": "shx mkdir -p ../../../build/deploy/products/ASC.People/client && shx cp -r dist/* ../../../build/deploy/products/ASC.People/client",
"serve": "serve dist -p 5002",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -29,9 +29,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -9,9 +9,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5015",
"build": "webpack --mode production",
"deploy": "mkdirp ../../../build/deploy/products/ASC.Projects/client && cp -r -u dist/* ../../../build/deploy/products/ASC.Projects/client",
"deploy": "shx mkdir -p ../../../build/deploy/products/ASC.Projects/client && shx cp -r dist/* ../../../build/deploy/products/ASC.Projects/client",
"serve": "serve dist -p 5015",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -29,9 +29,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -8,9 +8,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5001",
"build": "webpack --mode production",
"deploy": "mkdirp ../../build/deploy/studio/client && cp -r -u dist/* ../../build/deploy/studio/client",
"deploy": "shx mkdir -p ../../build/deploy/studio/client && shx cp -r dist/* ../../build/deploy/studio/client",
"serve": "serve dist -p 5001",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -28,9 +28,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -8,9 +8,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5013",
"build": "webpack --mode production",
"deploy": "mkdirp ../../build/deploy/products/ASC.Files/editor && cp -r -u dist/* ../../build/deploy/products/ASC.Files/editor",
"deploy": "shx mkdir -p ../../build/deploy/products/ASC.Files/editor && shx cp -r dist/* ../../build/deploy/products/ASC.Files/editor",
"serve": "serve dist -p 5013",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -28,9 +28,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.3",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

View File

@ -8,9 +8,9 @@
"start": "webpack-cli serve",
"start-prod": "webpack --mode production && serve dist -p 5011",
"build": "webpack --mode production",
"deploy": "mkdirp ../../build/deploy/studio/login && cp -r -u dist/* ../../build/deploy/studio/login",
"deploy": "shx mkdir -p ../../build/deploy/studio/login && shx cp -r dist/* ../../build/deploy/studio/login",
"serve": "serve dist -p 5011",
"clean": "rimraf dist"
"clean": "shx rm -rf dist"
},
"devDependencies": {
"@babel/core": "^7.12.10",
@ -29,9 +29,8 @@
"file-loader": "^6.2.0",
"html-webpack-plugin": "4.5.0",
"json-loader": "^0.5.7",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
"serve": "11.3.2",
"shx": "^0.3.3",
"source-map-loader": "^1.1.2",
"style-loader": "1.2.1",
"terser-webpack-plugin": "^5.1.1",

1264
yarn.lock

File diff suppressed because it is too large Load Diff