Merge branch 'devel' into refactor-connections-administration

This commit is contained in:
Wroud
2020-09-07 13:14:01 +03:00
4 changed files with 5 additions and 7 deletions
@@ -14,6 +14,7 @@
"lint-fix": "eslint ./src/ --ext .ts,.tsx --fix"
},
"peerDependencies": {
"@cloudbeaver/core-authentication": "^0.1.0",
"@cloudbeaver/core-blocks": "^0.1.0",
"@cloudbeaver/core-di": "^0.1.0",
"@cloudbeaver/core-localization": "^0.1.0",
@@ -6,6 +6,7 @@
* you may not use this file except in compliance with the License.
*/
import { UsersResource } from '@cloudbeaver/core-authentication';
import { injectable } from '@cloudbeaver/core-di';
import { NotificationService } from '@cloudbeaver/core-events';
import { IExecutor, Executor, IContextProvider } from '@cloudbeaver/core-executor';
@@ -24,6 +25,7 @@ export class ServerConfigurationService {
private administrationScreenService: AdministrationScreenService,
private graphQLService: GraphQLService,
private notificationService: NotificationService,
private usersResource: UsersResource
) {
this.state = this.administrationScreenService.getItemState<IServerConfigurationPageState>('welcome', () => ({
serverConfig: {
@@ -89,6 +91,7 @@ export class ServerConfigurationService {
try {
await this.graphQLService.gql.setDefaultNavigatorSettings({ settings: this.state.navigatorConfig });
await this.graphQLService.gql.configureServer({ configuration: this.state.serverConfig });
this.usersResource.refreshAll();
} catch (exception) {
this.notificationService.logException(exception, 'Can\'t save server configuration');
@@ -193,13 +193,6 @@ export class UsersResource extends CachedMapResource<string, AdminUserInfo> {
return this.data;
}
private isConnectionsLoaded(key: ResourceKey<string>) {
if (isResourceKeyList(key)) {
return this.get(key).every(user => !!user?.grantedConnections);
}
return !!this.get(key)?.grantedConnections;
}
private isActiveUser(userId: string) {
return this.authInfoService.userInfo?.userId === userId;
}
+1
View File
@@ -3,6 +3,7 @@
1. install ```yarn``` globaly
2. execute ```yarn``` in this folder
3. execute ```lerna bootstrap```
3. execute ```lerna run build --stream --scope=@cloudbeaver/product-default```
4. open ```packages/product-default/lib/index.html``` or run ```npx serve packages/product-default/lib```
## Build