Skip to content

Commit

Permalink
Merge branch '6.0' into backport-6.0/add-system-cache-entities
Browse files Browse the repository at this point in the history
  • Loading branch information
danotorrey authored Feb 5, 2025
2 parents 1074621 + 5104619 commit 38eb4ed
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 27 deletions.
1 change: 1 addition & 0 deletions changelog/6.0.11/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Keep the directory in Git
File renamed without changes.
5 changes: 5 additions & 0 deletions changelog/6.0.11/issue-20465.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type = "f"
message = "Fixed the issue when the streams link in the message table was not working on the streams page."

issues=["20465"]
pulls = ["21338"]
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion data-node/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.graylog</groupId>
<artifactId>graylog-project-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<relativePath>../graylog-project-parent</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>graylog-parent</artifactId>
<groupId>org.graylog</groupId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion full-backend-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.graylog</groupId>
<artifactId>graylog-project-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<relativePath>../graylog-project-parent</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion graylog-plugin-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.graylog</groupId>
<artifactId>graylog-project-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<relativePath>../graylog-project-parent</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion graylog-plugin-parent/graylog-plugin-web-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.graylog.plugins</groupId>
<artifactId>graylog-plugin-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
</parent>

<artifactId>graylog-plugin-web-parent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion graylog-plugin-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.graylog</groupId>
<artifactId>graylog-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
</parent>

<groupId>org.graylog.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion graylog-project-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.graylog</groupId>
<artifactId>graylog-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
</parent>

<artifactId>graylog-project-parent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion graylog-storage-elasticsearch7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.graylog.plugins</groupId>
<artifactId>graylog-plugin-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<relativePath>../graylog-plugin-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion graylog-storage-opensearch2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.graylog.plugins</groupId>
<artifactId>graylog-plugin-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<relativePath>../graylog-plugin-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion graylog2-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.graylog</groupId>
<artifactId>graylog-project-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<relativePath>../graylog-project-parent</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion graylog2-web-interface/manifests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graylog-web-manifests",
"version": "6.0.11-SNAPSHOT",
"version": "6.0.12-SNAPSHOT",
"description": "Manifests needed to reuse vendor & shared bundles in graylog web interface plugins",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion graylog2-web-interface/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graylog-web-interface",
"version": "6.0.11-SNAPSHOT",
"version": "6.0.12-SNAPSHOT",
"description": "Graylog Web Interface",
"author": "torch",
"license": "SSPL-1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graylog-web-plugin",
"version": "6.0.11-SNAPSHOT",
"version": "6.0.12-SNAPSHOT",
"description": "Helper code for streamlining Graylog web interface plugin development",
"main": "index.js",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,23 @@ import type { ElasticsearchQueryString, TimeRange } from 'views/logic/queries/Qu
import ViewGenerator from 'views/logic/views/ViewGenerator';
import type Parameter from 'views/logic/parameters/Parameter';

type Props = {
streamId?: string | string[],
timeRange?: TimeRange,
queryString?: ElasticsearchQueryString,
parameters?: Array<Parameter>,
}

type Deps = Array<Props[keyof Props]> | [];
const useCreateSavedSearch = ({
streamId,
timeRange,
queryString,
parameters,
}:{
streamId?: string | string[],
timeRange?: TimeRange,
queryString?: ElasticsearchQueryString,
parameters?: Array<Parameter>,
}) => useMemo(
}:Props, deps: Deps = []) => useMemo(
() => ViewGenerator({ type: View.Type.Search, streamId, timeRange, queryString, parameters }),
// eslint-disable-next-line react-hooks/exhaustive-deps
[],
deps,
);

export default useCreateSavedSearch;
11 changes: 6 additions & 5 deletions graylog2-web-interface/src/views/pages/StreamSearchPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,28 @@ describe('StreamSearchPage', () => {
queryString: undefined,
streamId: 'stream-id-1',
timeRange: undefined,
}));
}, [streamId]));
});

it('should recreate view when streamId passed from props changes', async () => {
it('should rerender hook when streamId passed from props changes', async () => {
const { rerender } = render(<SimpleStreamSearchPage />);

await waitFor(() => expect(useCreateSavedSearch).toHaveBeenCalledWith({
queryString: undefined,
streamId: 'stream-id-1',
timeRange: undefined,
}));
}, [streamId]));

asMock(useParams).mockReturnValue({ streamId: 'stream-id-2' });
const secondStream = 'stream-id-2';
asMock(useParams).mockReturnValue({ streamId: secondStream });

rerender(<SimpleStreamSearchPage />);

await waitFor(() => expect(useCreateSavedSearch).toHaveBeenLastCalledWith({
queryString: undefined,
streamId: 'stream-id-2',
timeRange: undefined,
}));
}, [secondStream]));
});

describe('loading another view', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const StreamSearchPage = () => {
}

const { timeRange, queryString } = useSearchURLQueryParams();
const viewPromise = useCreateSavedSearch({ streamId, timeRange, queryString });
const viewPromise = useCreateSavedSearch({ streamId, timeRange, queryString }, [streamId]);
const view = useCreateSearch(viewPromise);

const _loadNewView = useCallback(() => loadNewViewForStream(history, streamId), [history, streamId]);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<groupId>org.graylog</groupId>
<artifactId>graylog-parent</artifactId>
<version>6.0.11-SNAPSHOT</version>
<version>6.0.12-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Graylog Parent POM</name>
Expand Down

0 comments on commit 38eb4ed

Please sign in to comment.