Skip to content

Commit

Permalink
Merge branch 'devel' into CB-3446-line-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
dariamarutkina authored Oct 24, 2024
2 parents 6eb0ba6 + 6dbcfe4 commit 2c18c67
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,14 @@ public DBSObjectFilter getFilter() throws DBWebException {
if (!(node instanceof DBNDatabaseNode dbNode)) {
throw new DBWebException("Invalid navigator node type: " + node.getClass().getName());
}
DBSObjectFilter filter = dbNode.getNodeFilter(dbNode.getItemsMeta(), true);
return filter == null || filter.isEmpty() || !filter.isEnabled() ? null : filter;
try {
DBSObjectFilter filter = dbNode.getNodeFilter(
DBNUtils.getValidItemsMeta(session.getProgressMonitor(), dbNode),
true);
return filter == null || filter.isEmpty() || !filter.isEnabled() ? null : filter;
} catch (DBException e) {
throw new DBWebException(e);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import io.cloudbeaver.BaseWebProjectImpl;
import io.cloudbeaver.DBWebException;
import io.cloudbeaver.WebProjectImpl;
import io.cloudbeaver.WebServiceUtils;
import io.cloudbeaver.model.WebCommandContext;
import io.cloudbeaver.model.WebConnectionInfo;
Expand All @@ -43,6 +42,8 @@
import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
import org.jkiss.dbeaver.model.exec.DBCExecutionContextDefaults;
import org.jkiss.dbeaver.model.navigator.*;
import org.jkiss.dbeaver.model.navigator.meta.DBXTreeItem;
import org.jkiss.dbeaver.model.rm.RMControllerProvider;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.rm.RMProjectPermission;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
Expand Down Expand Up @@ -229,8 +230,11 @@ public boolean setNavigatorNodeFilter(
}
filter.setEnabled(true);
if (node instanceof DBNDatabaseNode dbNode) {
dbNode.setNodeFilter(dbNode.getItemsMeta(), filter, true);
if (hasNodeEditPermission(webSession, node, ((WebProjectImpl) node.getOwnerProject()).getRMProject())) {
DBXTreeItem itemsMeta = DBNUtils.getValidItemsMeta(webSession.getProgressMonitor(), dbNode);
dbNode.setNodeFilter(itemsMeta, filter, true);
if (node.getOwnerProject() instanceof RMControllerProvider rmControllerProvider &&
hasNodeEditPermission(webSession, node, rmControllerProvider.getRMProject())
) {
// Save settings
dbNode.getDataSourceContainer().persistConfiguration();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ public boolean isShowValues() {

@Override
public SQLCompletionProposalBase createProposal(@NotNull SQLCompletionRequest request, @NotNull String displayString, @NotNull String replacementString, int cursorPosition, @Nullable DBPImage image, @NotNull DBPKeywordType proposalType, @Nullable String description, @Nullable DBPNamedObject object, @NotNull Map<String, Object> params) {
return new SQLCompletionProposalBase(this, request.getWordDetector(), displayString, replacementString, cursorPosition, image, proposalType, description, object, params);
return new SQLCompletionProposalBase(request, displayString, replacementString, cursorPosition, image, proposalType, description, object, params);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
box-sizing: border-box;
padding-top: 4px;
min-height: 24px;
word-break: break-word;

&.invalid {
color: var(--theme-negative);
Expand Down

0 comments on commit 2c18c67

Please sign in to comment.