Skip to content

Commit 689df7d

Browse files
committed
Small changes in styling + include LingoDB version
1 parent 5534dd4 commit 689df7d

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

.github/workflows/build-interface.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,20 @@ jobs:
3535
- name: Install dependencies
3636
run: yarn install
3737
working-directory: frontend
38+
- name: Read LingoDB Commit
39+
id: get-lingodb-commit
40+
run: |
41+
echo "lingodb_short_commit=$(git rev-parse --short "$(cat lingodb-commit)" )" >> $GITHUB_OUTPUT
42+
echo "lingodb_commit=$(cat lingodb-commit)" >> $GITHUB_OUTPUT
3843
- name: Build WebInterface Frontend
39-
run: env REACT_APP_API_URL="" env BUILD_PATH="../../../docker-build/frontend" yarn workspace @lingodb/interface build
44+
run: env REACT_APP_LINGODB_COMMIT="${{ steps.get-lingodb-commit.outputs.lingodb_short_commit }}" env REACT_APP_API_URL="" env BUILD_PATH="../../../docker-build/frontend" yarn workspace @lingodb/interface build
4045
working-directory: frontend
4146
- name: Authenticate GitHub CLI
4247
run: echo "${{ secrets.LINGODB_TOKEN }}" | gh auth login --with-token
43-
- name: Read LingoDB Commit
44-
id: get-lingodb-commit
45-
run: echo "lingodb_commit=$(cat lingodb-commit.txt)" >> $GITHUB_OUTPUT
4648
- name: Trigger build of lingodb binaries
4749
id: trigger-build
4850
run: |
49-
gh api repos/${{ env.LINGODB_REPOSITORY }}/actions/workflows/release-for-webinterface.yml/dispatches -F ref="main" -F inputs[ref]="b0d8f7a6f5be75a1b545ac54764473048f36b5d7"
51+
gh api repos/${{ env.LINGODB_REPOSITORY }}/actions/workflows/release-for-webinterface.yml/dispatches -F ref="main" -F inputs[ref]="${{ steps.get-lingodb-commit.outputs.lingodb_commit }}"
5052
5153
- name: Wait for a few seconds
5254
run: sleep 5

backend/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
allow_headers=["*"],
2929
)
3030

31-
memory_limit = 10 * 1024 * 1024 * 1024
31+
memory_limit =(int) (3.3 * 1024 * 1024 * 1024)
3232
resource.setrlimit(resource.RLIMIT_AS, (memory_limit, memory_limit))
3333

3434

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
REACT_APP_API_URL="http://127.0.0.1:8000"
1+
REACT_APP_API_URL="http://127.0.0.1:8000"
2+
REACT_APP_LINGODB_COMMIT="eee8c78"

frontend/packages/interface/src/App.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const QuerySelection = ({db, cb}) => {
8383
const f = availableQueries.filter((q) => q.query === eventKey)
8484
cb(f[0].content)
8585
}
86-
return (<DropdownButton id="dropdown-basic-button" title="Select Query" onSelect={handleSelect}>
86+
return (<DropdownButton as={ButtonGroup} id="dropdown-basic-button" title="Select Query" onSelect={handleSelect}>
8787
{availableQueries.map(q => (
8888
<Dropdown.Item eventKey={q.query}>{q.query}</Dropdown.Item>
8989
))}
@@ -109,7 +109,7 @@ const DropdownCheckbox = ({label, options, onChange}) => {
109109
};
110110

111111
return (
112-
<DropdownButton title={label} variant="secondary">
112+
<DropdownButton as={ButtonGroup} title={label} variant="secondary">
113113
<Form>
114114
<FormGroup>
115115
{options.map((option, index) => (
@@ -167,6 +167,7 @@ function App() {
167167
}
168168
}
169169
const host = process.env.REACT_APP_API_URL
170+
const lingodb_commit=process.env.REACT_APP_LINGODB_COMMIT
170171
const fetchQueryPlan = async () => {
171172
try {
172173
setQueryPlanLoading(true)
@@ -300,9 +301,8 @@ function App() {
300301
<h2>SQL WebInterface</h2>
301302
<Alert variant="warning">
302303
<b>Note!</b> This webinterface is for demo purposes only, and especially not suited for benchmarking.
303-
It runs with 4 threads on a very old, low-end server (i7-3770 CPU, 32 GB), and LingoDB executes queries
304-
with additional verifications.
305-
Furthermore, every request is processed by executing one of LingoDB's command line tools which first
304+
It runs with 4 threads on a small virtual machine (4 GiB RAM, 4 virtual cores), and LingoDB executes queries
305+
with additional verifications. Furthermore, every request is processed by executing one of LingoDB's command line tools which first
306306
loads the data set into memory, increasing the observable latency significantly.
307307
</Alert>
308308
<Editor
@@ -314,12 +314,10 @@ function App() {
314314
/>
315315
<div style={{textAlign: "center"}}>
316316
<ButtonGroup>
317-
<div id="rounded">
318317
<Button variant="primary" onClick={handleExecute}>
319318
<FontAwesomeIcon icon={faPlay}></FontAwesomeIcon> Execute Query
320319
</Button>
321-
</div>
322-
<DropdownButton id="dropdown-basic-button" title={selectedDB.label} onSelect={handleSelectDB}>
320+
<DropdownButton as={ButtonGroup} id="dropdown-basic-button" title={selectedDB.label} onSelect={handleSelectDB}>
323321
<Dropdown.Item eventKey="tpch-1">TPC-H (SF1)</Dropdown.Item>
324322
<Dropdown.Item eventKey="tpcds-1">TPC-DS (SF1)</Dropdown.Item>
325323
<Dropdown.Item eventKey="job">JOB</Dropdown.Item>
@@ -328,6 +326,9 @@ function App() {
328326
<QuerySelection db={selectedDB.value} cb={(content) => setQuery(content)}></QuerySelection>
329327
<DropdownCheckbox label="Options" options={[{label: 'Real Cardinalities', value: 'real-cards'}]}
330328
onChange={handleOptionsChange}/>
329+
<a href={`https://github.com/lingo-db/lingo-db/commit/${lingodb_commit}`} rel="noreferrer" target="_blank" className="btn btn-outline-primary">
330+
LingoDB@{lingodb_commit}
331+
</a>
331332
</ButtonGroup>
332333
</div>
333334
{showResults &&

0 commit comments

Comments
 (0)