Skip to content

Commit

Permalink
Merge branch 'devel' into CB-5645-ee-aws-change-the-instruction-in-th…
Browse files Browse the repository at this point in the history
…e-version-update-tab
  • Loading branch information
dariamarutkina authored Oct 24, 2024
2 parents a000e94 + c7af629 commit e3df810
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 29 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ You can see a live demo of CloudBeaver here: https://demo.cloudbeaver.io

## Changelog

### 24.2.3. 2024-10-21
- Important update:
- Connections Templates feature is declared as obsolete and will be removed in future releases.
- General:
- Data editor enhancements: Rows with focused cells are specially marked to make it easier to locate a position in large tables;
- DB2i driver has been updated to version 20.0.7;
- The URL mode for PostgreSQL now supports connecting to multiple databases;
- The issue with displaying BLOB data types in DuckDB has been resolved.

### 24.2.2. 2024-10-07
- Schemas were added to the SQL autocompletion for PostgreSQL, H2, and SQL Server;
- CloudBeaver can now correctly display negative dates for MySQL database;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.jkiss.dbeaver.model.auth.SMAuthInfo;
import org.jkiss.dbeaver.model.auth.SMAuthProvider;
import org.jkiss.dbeaver.model.security.SMAuthProviderCustomConfiguration;
import org.jkiss.dbeaver.utils.MimeTypes;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.IOUtils;

Expand Down Expand Up @@ -225,6 +226,7 @@ private void patchStaticContentIfNeeded(HttpServletRequest request, HttpServletR

// Disable cache for index.html
response.setHeader(HttpHeader.CACHE_CONTROL.toString(), "no-cache, no-store, must-revalidate");
response.setHeader(HttpHeader.CONTENT_TYPE.toString(), MimeTypes.TEXT_HTML);
response.setHeader(HttpHeader.EXPIRES.toString(), "0");
response.getOutputStream().write(ByteBuffer.wrap(indexBytes));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@
import org.jkiss.utils.CommonUtils;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;

class WebSQLQueryDataReceiver implements DBDDataReceiver {
Expand Down Expand Up @@ -170,8 +167,9 @@ public void fetchEnd(@NotNull DBCSession session, @NotNull DBCResultSet resultSe

webResultSet.setSingleEntity(isSingleEntity);

DBDRowIdentifier rowIdentifier = resultsInfo.getDefaultRowIdentifier();
webResultSet.setHasRowIdentifier(rowIdentifier != null && rowIdentifier.isValidIdentifier());
Set<DBDRowIdentifier> rowIdentifiers = resultsInfo.getRowIdentifiers();
boolean hasRowIdentifier = rowIdentifiers.stream().allMatch(DBDRowIdentifier::isValidIdentifier);
webResultSet.setHasRowIdentifier(!rowIdentifiers.isEmpty() && hasRowIdentifier);
}

private void convertComplexValuesToRelationalView(DBCSession session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import type { ILoadableState } from '@cloudbeaver/core-utils';

import type { IRouteParams } from './IRouteParams.js';

export enum AdministrationItemType {
Expand Down Expand Up @@ -84,6 +86,7 @@ export interface IAdministrationItemOptions {
replace?: IAdministrationItemReplaceOptions;
defaultSub?: string;
defaultParam?: string;
getLoader?: () => ILoadableState[] | ILoadableState;
getDrawerComponent: () => AdministrationItemDrawerComponent;
getContentComponent: () => AdministrationItemContentComponent;
onLoad?: AdministrationItemEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
display: flex;
}

.remove,
.select {
margin: 0 2px;
}

.container:hover .remove {
opacity: 1;
}
Expand Down Expand Up @@ -106,7 +111,6 @@
.button,
.propertyValueSelector {
composes: theme-form-element-radius from global;
margin: 2px;
overflow: hidden;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ import {
type StyleRegistry,
ToolsActionStyles,
ToolsPanelStyles,
useAutoLoad,
useS,
} from '@cloudbeaver/core-blocks';
import { useService } from '@cloudbeaver/core-di';
import { OptionsPanelService, TabList, TabListStyles, TabsState, TabStyles } from '@cloudbeaver/core-ui';
import type { ILoadableState } from '@cloudbeaver/core-utils';
import { CaptureView } from '@cloudbeaver/core-view';

import { AdministrationCaptureViewContext } from './AdministrationCaptureViewContext.js';
Expand Down Expand Up @@ -95,6 +97,9 @@ export const Administration = observer<React.PropsWithChildren<Props>>(function
const OptionsPanel = optionsPanelService.getPanelComponent();
const visibleItems = administrationItemService.getActiveItems(configurationWizard);
const onlyActiveItem = administrationItemService.items.find(filterOnlyActive(configurationWizard));
const loaders = administrationItemService.items.reduce<ILoadableState[]>((acc, item) => [...acc, item.getLoader?.() || []].flat(), []);

useAutoLoad(Administration, loaders);

useLayoutEffect(() => {
contentRef.current?.scrollTo({ top: 0, left: 0 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import {
Button,
Cell,
Clickable,
Container,
Filter,
getComputed,
Expand Down Expand Up @@ -150,13 +151,15 @@ export const ConfigurationsList = observer<Props>(function ConfigurationsList({
const title = `${configuration.displayName}\n${configuration.description || ''}`;
return (
<Link key={configuration.id} title={title} wrapper onClick={() => login(false, provider, configuration)}>
<Cell
className={s(style, { cell: true })}
before={icon ? <IconOrImage className={s(style, { iconOrImage: true })} icon={icon} /> : undefined}
description={configuration.description}
>
{configuration.displayName}
</Cell>
<Clickable as="div">
<Cell
className={s(style, { cell: true })}
before={icon ? <IconOrImage className={s(style, { iconOrImage: true })} icon={icon} /> : undefined}
description={configuration.description}
>
{configuration.displayName}
</Cell>
</Clickable>
</Link>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class DataGridContextMenuCellEditingService {
onClick(context) {
const source = context.data.model.source as unknown as ResultSetDataSource;
const editor = source.getAction(context.data.resultIndex, ResultSetEditAction);
editor.duplicateRow(context.data.key.row);
editor.duplicateRow(context.data.key);
},
});
this.dataGridContextMenuService.add(this.getMenuEditingToken(), {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,17 @@
border-bottom-color: var(--theme-positive) !important;
}

:global(.rdg-cell:first-child) {
border-left: 2px solid rgba(0, 0, 0, 0) !important;
}

:global(.rdg-cell-custom-highlighted-row) {
background: var(--data-grid-selected-row-color) !important;

&:global(.rdg-cell:first-child) {
border-left: 2px solid var(--data-grid-index-cell-border-color) !important;
&:global(.rdg-cell:first-child::before) {
position: absolute;
content: '';
top: 0;
left: 0;
width: 2px;
height: 100%;
background-color: var(--data-grid-index-cell-border-color);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,32 +206,32 @@ export class ResultSetEditAction extends DatabaseEditAction<IResultSetElementKey
}

duplicate(...keys: IResultSetElementKey[]): void {
const rows: IResultSetRowKey[] = [];
const result: IResultSetElementKey[] = [];
const rowKeys = new Set<string>();

for (const key of keys) {
const serialized = ResultSetDataKeysUtils.serialize(key.row);

if (!rowKeys.has(serialized)) {
rows.push(key.row);
result.push(key);
rowKeys.add(serialized);
}
}

this.duplicateRow(...rows);
this.duplicateRow(...result);
}

duplicateRow(...rows: IResultSetRowKey[]): void {
for (const row of rows) {
let value = this.data.getRowValue(row);
duplicateRow(...keys: IResultSetElementKey[]): void {
for (const key of keys) {
let value = this.data.getRowValue(key.row);

const editedValue = this.editorData.get(ResultSetDataKeysUtils.serialize(row));
const editedValue = this.editorData.get(ResultSetDataKeysUtils.serialize(key.row));

if (editedValue) {
value = editedValue.update;
}

this.addRow(row, JSON.parse(JSON.stringify(value)));
this.addRow(key.row, JSON.parse(JSON.stringify(value)), key.column);
}
}

Expand Down

0 comments on commit e3df810

Please sign in to comment.