-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update menu, add /api, update tests
- Loading branch information
Showing
7 changed files
with
152 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { NextResponse } from 'next/server' | ||
import packageInfo from '@/package.json' | ||
|
||
import { fetchData } from '@/lib/clickhouse' | ||
|
||
export const dynamic = 'force-dynamic' | ||
|
||
export async function GET() { | ||
try { | ||
const clickhouse = await fetchData('SELECT version()') | ||
return NextResponse.json({ | ||
ui: packageInfo.version, | ||
clickhouse, | ||
}) | ||
} catch { | ||
return NextResponse.json( | ||
{ | ||
ui: packageInfo.version, | ||
clickhouse: false, | ||
}, | ||
{ status: 500 } | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,7 @@ | ||
import { NextResponse } from 'next/server' | ||
import packageInfo from '@/package.json' | ||
|
||
import { fetchData } from '@/lib/clickhouse' | ||
|
||
export const dynamic = 'force-dynamic' | ||
|
||
export async function GET() { | ||
try { | ||
const clickhouse = await fetchData('SELECT version()') | ||
return NextResponse.json({ | ||
ui: packageInfo.version, | ||
clickhouse, | ||
}) | ||
} catch { | ||
return NextResponse.json( | ||
{ | ||
ui: packageInfo.version, | ||
clikckhouse: false, | ||
}, | ||
{ status: 500 } | ||
) | ||
} | ||
return NextResponse.json({ ok: true }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
describe('Navigation', () => { | ||
it('should navigate to the running queries page', () => { | ||
cy.visitAndValidate('/overview', 'a[href*="running-queries"]', '/running-queries', 'Running Queries') | ||
it('should navigate to the /tables page', () => { | ||
cy.visitAndValidate('/overview', 'a[href*="running-queries"]', '/tables', 'Tables') | ||
}) | ||
|
||
it('should navigate to the settings page', () => { | ||
it('should navigate to the /settings page', () => { | ||
cy.visitAndValidate('/overview', 'a[href*="settings"]', '/settings', 'Settings') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters