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
2 changes: 1 addition & 1 deletion scripts/e2eTestsConfigLON.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</authentication>
</hotrod-connector>
<rest-connector name="rest">
<authentication mechanisms="BASIC DIGEST"/>
<authentication mechanisms="BASIC DIGEST-SHA-256"/>
</rest-connector>
</endpoint>
</endpoints>
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2eTestsConfigNYC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</authentication>
</hotrod-connector>
<rest-connector name="rest">
<authentication mechanisms="BASIC DIGEST"/>
<authentication mechanisms="BASIC DIGEST-SHA-256"/>
</rest-connector>
</endpoint>
</endpoints>
Expand Down
2 changes: 1 addition & 1 deletion scripts/infinispan-local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</authentication>
</hotrod-connector>
<rest-connector name="rest">
<authentication mechanisms="BASIC DIGEST"/>
<authentication mechanisms="BASIC DIGEST-SHA-256"/>
</rest-connector>
</endpoint>
</endpoints>
Expand Down
3 changes: 1 addition & 2 deletions src/app/Caches/Entries/CacheEntries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import {
ToolbarGroup,
ToolbarItem,
ToolbarToggleGroup,
Tooltip,
Truncate
Tooltip
} from '@patternfly/react-core';
import { ActionsColumn, Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
import { FilterIcon, HelpIcon, PlusCircleIcon, SearchIcon } from '@patternfly/react-icons';
Expand Down
15 changes: 14 additions & 1 deletion src/app/Caches/Query/QueryEntries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ButtonVariant,
Card,
CardBody,
Checkbox,
Divider,
EmptyState,
EmptyStateBody,
Expand Down Expand Up @@ -32,6 +33,8 @@ const QueryEntries = (props: { cacheName: string; changeTab: () => void }) => {
const { search, setSearch } = useSearch(props.cacheName);
const { syntaxHighLighterTheme } = useContext(ThemeContext);
const [deleteByQueryOpen, setDeleteByQueryOpen] = useState(false);
const [trim, setTrim] = useState<boolean>(false);

const columnNames = {
value: 'Value'
};
Expand All @@ -44,7 +47,7 @@ const QueryEntries = (props: { cacheName: string; changeTab: () => void }) => {
useInlineStyles={true}
wrapLongLines={true}
>
{displayUtils.formatContentToDisplay(value)}
{trim ? displayUtils.formatContentToDisplayWithTruncate(value) : displayUtils.formatContentToDisplay(value)}
</SyntaxHighlighter>
);
};
Expand Down Expand Up @@ -177,6 +180,16 @@ const QueryEntries = (props: { cacheName: string; changeTab: () => void }) => {
{buildButtons()}
<ToolbarItem variant="pagination">{toolbarPagination('down')}</ToolbarItem>
</ToolbarContent>
<ToolbarContent>
<ToolbarItem>
<Checkbox
labelPosition="start"
label={t('caches.query.truncate-results')}
id="checkbox-trim"
onClick={() => setTrim(!trim)}
/>
</ToolbarItem>
</ToolbarContent>
</Toolbar>
);

Expand Down
1 change: 1 addition & 0 deletions src/app/assets/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@
"stat-count": "Count",
"stat-average": "Average",
"stat-slowest": "Slowest",
"truncate-results": "Truncate results",
"modal-clear-stats": "Permanently clear query metrics?",
"modal-clear-stats-label": "Clear query metrics modal",
"modal-button-clear-stats": "Clear metrics",
Expand Down
14 changes: 11 additions & 3 deletions src/services/authService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,27 @@ export class AuthenticationService {
throw response;
})
.then((json) => {
const jsonLength = Object.keys(json).length;
const jsonKeys = Object.keys(json);
const jsonLength = jsonKeys.length;
if (jsonLength <= 1 || (jsonLength == 2 && json.mode === 'HTTP' && json.ready === 'true')) {
return right(<AuthInfo>{
mode: 'auth_disabled',
ready: true,
digest: false
}) as Either<ActionResponse, AuthInfo>;
}

let digest = false;
for (const key of jsonKeys) {
if (key.startsWith('DIGEST')) {
digest = true;
break;
}
}
console.log(digest);
const authInfo = <AuthInfo>{
mode: json.mode,
ready: json.ready == 'true',
digest: json.DIGEST == 'true'
digest: digest
};

if (authInfo.mode == 'OIDC') {
Expand Down