Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ReadOnlyModeFilter implements WebFilter {
Pattern.compile("/api/clusters/(?<clusterName>[^/]++)");

private static final Set<Pattern> SAFE_ENDPOINTS = Set.of(
Pattern.compile("/api/clusters/[^/]+/topics/[^/]+/(smartfilters)$")
Pattern.compile("/api/clusters/[^/]+/topics/[^/]+/(smartfilters|analysis)$")
);

private final ClustersStorage clustersStorage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public class InternalBrokerConfig {
private final boolean isReadOnly;
private final List<ConfigEntry.ConfigSynonym> synonyms;

public static InternalBrokerConfig from(ConfigEntry configEntry) {
public static InternalBrokerConfig from(ConfigEntry configEntry, boolean readOnlyCluster) {
InternalBrokerConfig.InternalBrokerConfigBuilder builder = InternalBrokerConfig.builder()
.name(configEntry.name())
.value(configEntry.value())
.source(configEntry.source())
.isReadOnly(configEntry.isReadOnly())
.isReadOnly(readOnlyCluster || configEntry.isReadOnly())
.isSensitive(configEntry.isSensitive())
.synonyms(configEntry.synonyms());
return builder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private Flux<InternalBrokerConfig> getBrokersConfig(KafkaCluster cluster, Intege
}
return loadBrokersConfig(cluster, brokerId)
.map(list -> list.stream()
.map(InternalBrokerConfig::from)
.map(configEntry -> InternalBrokerConfig.from(configEntry, cluster.isReadOnly()))
.collect(Collectors.toList()))
.flatMapMany(Flux::fromIterable);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ const InputCellViewMode: FC<InputCellViewModeProps> = ({
);

return (
<S.ValueWrapper $isDynamic={isDynamic}>
<S.Value title={title}>{displayValue}</S.Value>
<S.ValueWrapper>
<S.Value $isDynamic={isDynamic} title={title}>
{displayValue}
</S.Value>
<Tooltip
value={
<Button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import styled from 'styled-components';

export const ValueWrapper = styled.div<{ $isDynamic?: boolean }>`
export const ValueWrapper = styled.div`
display: flex;
justify-content: space-between;
font-weight: ${({ $isDynamic }) => ($isDynamic ? 600 : 400)};
font-weight: 400;
button {
margin: 0 10px;
}
`;

export const Value = styled.span`
export const Value = styled.span<{ $isDynamic?: boolean }>`
line-height: 24px;
margin-right: 10px;
text-overflow: ellipsis;
max-width: 400px;
overflow: hidden;
white-space: nowrap;
font-weight: ${({ $isDynamic }) => ($isDynamic ? 600 : 400)};
`;

export const ButtonsWrapper = styled.div`
Expand Down
Loading