Skip to content

Commit 03df3bf

Browse files
#RI-2509-fix linter errors
1 parent 2d25aec commit 03df3bf

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

redisinsight/api/src/modules/workbench/dto/create-command-execution.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
22
import {
3-
IsBoolean, IsEnum, IsNotEmpty, IsNotEmptyObject, IsOptional, IsString, ValidateNested,
3+
IsEnum, IsNotEmpty, IsNotEmptyObject, IsOptional, IsString, ValidateNested,
44
} from 'class-validator';
55
import { Type } from 'class-transformer';
66
import { ClusterSingleNodeOptions } from 'src/modules/cli/dto/cli.dto';

redisinsight/api/src/modules/workbench/providers/command-execution.provider.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@ export class CommandExecutionProvider {
3131
*/
3232
async createMany(commandExecutions: Partial<CommandExecution>[]): Promise<CommandExecution[]> {
3333
// todo: limit by 30 max to insert
34-
let notStoredIndexes = {}
34+
const notStoredIndexes = {};
3535
let entities = await Promise.all(commandExecutions.map(async (commandExecution, idx) => {
3636
const entity = plainToClass(CommandExecutionEntity, commandExecution);
3737

3838
// Do not store command execution result that exceeded limitation
39-
// if (JSON.stringify(entity.result).length > WORKBENCH_CONFIG.maxResultSize) {
40-
if (JSON.stringify(entity.result).length > 1000) {
39+
if (JSON.stringify(entity.result).length > WORKBENCH_CONFIG.maxResultSize) {
4140
notStoredIndexes[idx] = true;
4241
entity.result = JSON.stringify([
4342
{
@@ -65,7 +64,6 @@ export class CommandExecutionProvider {
6564
},
6665
)),
6766
);
68-
this.logger.log(response[0].isNotStored)
6967
// cleanup history and ignore error if any
7068
try {
7169
await this.cleanupDatabaseHistory(entities[0].databaseId);

redisinsight/api/src/modules/workbench/workbench.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import { PluginCommandsWhitelistProvider } from 'src/modules/workbench/providers
2020
import { PluginsController } from 'src/modules/workbench/plugins.controller';
2121
import { PluginStateProvider } from 'src/modules/workbench/providers/plugin-state.provider';
2222
import { PluginStateEntity } from 'src/modules/workbench/entities/plugin-state.entity';
23-
import { WorkbenchAnalyticsService } from './services/workbench-analytics/workbench-analytics.service';
2423
import config from 'src/utils/config';
24+
import { WorkbenchAnalyticsService } from './services/workbench-analytics/workbench-analytics.service';
2525

2626
const COMMANDS_CONFIGS = config.get('commands');
2727

@@ -52,7 +52,7 @@ const COMMANDS_CONFIGS = config.get('commands');
5252
provide: CommandsService,
5353
useFactory: () => new CommandsService(
5454
COMMANDS_CONFIGS.map(({ name, url }) => new CommandsJsonProvider(name, url)),
55-
)
55+
),
5656
},
5757
PluginsService,
5858
PluginCommandsWhitelistProvider,

0 commit comments

Comments
 (0)