Skip to content

Commit 4c11e99

Browse files
authored
Merge pull request #123 from fractal-analytics-platform/v0.3
Minor fixes in v0.3
2 parents d0c2c48 + a1e73f2 commit 4c11e99

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

src/lib/components/workflow/common/FormStructure.svelte

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
export let entryId = undefined
1414
export let isListEntry = false
1515
export let entryIndex = undefined
16+
// Set a random guid to the entry
17+
let entryEscapedName = 'entry-' + entryName
18+
// Generate a random string
1619
1720
// TODO: This is a temporary solution to the problem of having multiple entries with the same name
1821
if (entryId === undefined) {
@@ -100,11 +103,11 @@
100103
<div class="accordion">
101104
<div class="accordion-item">
102105
<div class="accordion-header">
103-
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#{entryId}">
106+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#{entryEscapedName}">
104107
{!isListEntry? entryName : ''} (obj)
105108
</button>
106109
</div>
107-
<div id="{entryId}" class="accordion-collapse collapse">
110+
<div id="{entryEscapedName}" class="accordion-collapse collapse">
108111
<div class="accordion-body p-2">
109112
{#each Object.entries(entry) as [key, value]}
110113
<svelte:self entry={value} entryName={key} on:entryUpdated={handleEntryUpdate} on:entryInserted={handleNewEntryInserted}/>
@@ -132,11 +135,11 @@
132135
<div class="accordion">
133136
<div class="accordion-item">
134137
<div class="accordion-header">
135-
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#{entryName}">
138+
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#{entryEscapedName}">
136139
{!isListEntry ? entryName : ''} (list)
137140
</button>
138141
</div>
139-
<div id="{entryName}" class="accordion-collapse collapse">
142+
<div id="{entryEscapedName}" class="accordion-collapse collapse">
140143
<div class="accordion-body p-2">
141144
{#each entry as listItem, index}
142145
<svelte:self isListEntry={true} entry={listItem} entryIndex={index} entryId={entryName + '-' + index + '-' + 'list-item' } entryName={entryName + '-' + index + '-' + 'list-item' } on:entryUpdated={handleEntryUpdate} on:entryInserted={handleNewEntryInserted} />

src/routes/projects/[id]/datasets/[datasetId]/+page.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,30 @@
33
import { page } from '$app/stores'
44
import { enhance } from '$app/forms'
55
import { getDataset, updateDataset, deleteDatasetResource, createDatasetResource } from '$lib/api/v1/project/project_api'
6+
import { loadProjectContext } from '$lib/components/projects/controller'
7+
import { contextProject } from '$lib/stores/projectStores'
68
import ConfirmActionButton from '$lib/components/common/ConfirmActionButton.svelte'
79
import StandardErrorAlert from '$lib/components/common/StandardErrorAlert.svelte'
810
911
let projectId = $page.params.id
1012
let datasetId = $page.params.datasetId
1113
14+
let project = undefined
1215
let dataset = undefined
1316
let updateDatasetSuccess = false
1417
let createResourceSuccess = false
1518
19+
20+
contextProject.subscribe((context) => {
21+
project = context.project
22+
})
23+
1624
onMount(async () => {
1725
dataset = await getDataset(projectId, datasetId)
1826
.catch(error => {
1927
console.error(error)
2028
})
29+
await loadProjectContext(projectId)
2130
})
2231
2332
async function handleDatasetUpdate({ form, data, cancel }) {
@@ -94,7 +103,7 @@
94103
<a href="/projects">Projects</a>
95104
</li>
96105
<li class="breadcrumb-item" aria-current="page">
97-
<a href="/projects/{projectId}">Project</a>
106+
<a href="/projects/{projectId}">{project?.name}</a>
98107
</li>
99108
<li class="breadcrumb-item" aria-current="page">Datasets</li>
100109
{#if dataset}

src/routes/projects/[id]/jobs/+page.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,25 @@
5252
let workflowQueryFilter = $page.url.searchParams.get('workflow')
5353
if (workflowQueryFilter) {
5454
tableHandler.filter(workflowQueryFilter, 'workflow_id', check.isEqualTo)
55+
workflowFilter = Number.parseInt(workflowQueryFilter)
5556
}
5657
5758
let inputDatasetQueryFilter = $page.url.searchParams.get('input_dataset')
5859
if (inputDatasetQueryFilter) {
5960
tableHandler.filter(inputDatasetQueryFilter, 'input_dataset_id', check.isEqualTo)
61+
inputDatasetFilter = Number.parseInt(inputDatasetQueryFilter)
6062
}
6163
6264
let outputDatasetQueryFilter = $page.url.searchParams.get('output_dataset')
6365
if (outputDatasetQueryFilter) {
6466
tableHandler.filter(outputDatasetQueryFilter, 'output_dataset_id', check.isEqualTo)
67+
outputDatasetFilter = Number.parseInt(outputDatasetQueryFilter)
6568
}
6669
6770
let statusQueryFilter = $page.url.searchParams.get('status')
6871
if (statusQueryFilter) {
6972
tableHandler.filter(statusQueryFilter, 'status', check.isEqualTo)
73+
statusFilter = statusQueryFilter
7074
}
7175
7276
})

src/routes/projects/[id]/workflows/[workflowId]/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
</li>
211211
{#if $page.params.id}
212212
<li class="breadcrumb-item" aria-current="page">
213-
<a href="/projects/{$page.params.id}">{$page.params.id}</a>
213+
<a href="/projects/{$page.params.id}">{project?.name}</a>
214214
</li>
215215
{/if}
216216
<li class="breadcrumb-item">
@@ -224,6 +224,7 @@
224224
</ol>
225225
</nav>
226226
<div>
227+
<a href="/projects/{project?.id}/jobs?workflow={workflow?.id}" class="btn btn-light"><i class="bi-journal-code"></i> List jobs</a>
227228
<button class="btn btn-light" on:click|preventDefault={handleExportWorkflow}><i class="bi-box-arrow-up"></i></button>
228229
<a id="downloadWorkflowButton" class="d-none">Download workflow link</a>
229230
<button class="btn btn-light" data-bs-toggle="modal" data-bs-target="#editWorkflowModal"><i class="bi-gear-wide-connected"></i></button>

tests/data/example_server_startup/fresh_startup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ JWT_EXPIRE_SECONDS=84600
2020

2121
rm test.db
2222
rm -r /tmp/FRACTAL_TASKS_DIR
23+
rm -r artifacts
2324

2425
# Create an empty db
2526
fractalctl set-db

0 commit comments

Comments
 (0)