Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added user agent to driver object #574

Merged
merged 5 commits into from
Aug 21, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/master-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.3.2
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.3.3
build-docker-legacy:
needs: build-test
runs-on: ubuntu-latest
Expand All @@ -103,7 +103,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.3.2
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.3.3
deploy-gallery:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ USER nginx
EXPOSE $NGINX_PORT

HEALTHCHECK cmd curl --fail "http://localhost:$NGINX_PORT" || exit 1
LABEL version="2.3.2"
LABEL version="2.3.3"
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Depending on the webserver type and version, this could be different directory.
As an example - to copy the files to an nginx webserver using `scp`:

```bash
scp neodash-2.3.2 username@host:/usr/share/nginx/html
scp neodash-2.3.3 username@host:/usr/share/nginx/html
```

NeoDash should now be visible by visiting your (sub)domain in the browser.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neodash",
"version": "2.3.2",
"version": "2.3.3",
"description": "NeoDash - Neo4j Dashboard Builder",
"neo4jDesktop": {
"apiVersion": "^1.2.0"
Expand Down
3 changes: 2 additions & 1 deletion src/application/ApplicationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
setParametersToLoadAfterConnecting,
setReportHelpModalOpen,
} from './ApplicationActions';
import { version } from '../modal/AboutModal';

/**
* Application Thunks (https://redux.js.org/usage/writing-logic-thunks) handle complex state manipulations.
Expand All @@ -57,7 +58,7 @@ import {
export const createConnectionThunk =
(protocol, url, port, database, username, password) => (dispatch: any, getState: any) => {
try {
const driver = createDriver(protocol, url, port, username, password);
const driver = createDriver(protocol, url, port, username, password, { userAgent: `neodash/v${version}` });
// eslint-disable-next-line no-console
console.log('Attempting to connect...');
const validateConnection = (records) => {
Expand Down
4 changes: 3 additions & 1 deletion src/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import NeoDashboardConnectionUpdateHandler from '../component/misc/DashboardConn
import { forceRefreshPage } from '../page/PageActions';
import { getPageNumber } from '../settings/SettingsSelectors';
import { createNotificationThunk } from '../page/PageThunks';
import { version } from '../modal/AboutModal';

const Dashboard = ({
pagenumber,
Expand All @@ -30,7 +31,8 @@ const Dashboard = ({
connection.url,
connection.port,
connection.username,
connection.password
connection.password,
{ userAgent: `neodash/v${version}` }
);
setDriver(newDriver);
}
Expand Down
4 changes: 2 additions & 2 deletions src/modal/AboutModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Button, Dialog, TextLink } from '@neo4j-ndl/react';
import { BookOpenIconOutline, BeakerIconOutline } from '@neo4j-ndl/react/icons';
import { Section, SectionTitle, SectionContent } from './ModalUtils';

export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
const version = '2.3.2';
export const version = '2.3.3';

export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
const downloadDebugFile = () => {
const element = document.createElement('a');
const state = getDebugState();
Expand Down