Skip to content

Commit 8e9a0de

Browse files
jrmipicklepete
andauthored
Wab post release minor bug fixes (baserow#4283)
* Fix missing early return when data source is missing * Fix missing file_import job type in frontend registry * Restore trigger waiting message * Tweak the margin-bottom if the first alert. If there's an alert below it, the combination of bottom+top is too much. --------- Co-authored-by: peter_baserow <peter@baserow.io>
1 parent d237b07 commit 8e9a0de

File tree

5 files changed

+38
-15
lines changed

5 files changed

+38
-15
lines changed

web-frontend/modules/automation/components/form/SimulateDispatchNodeForm.vue

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,34 @@
1010
{{ buttonLabel }}
1111
</Button>
1212

13-
<Alert v-if="cantBeTestedReason" type="info-neutral">
13+
<Alert
14+
v-if="cantBeTestedReason"
15+
type="info-neutral"
16+
class="margin-bottom-0"
17+
>
1418
<p>{{ cantBeTestedReason }}</p>
1519
</Alert>
1620

17-
<Alert v-else-if="showTestNodeDescription" type="info-neutral">
18-
<p>{{ $t('simulateDispatch.testNodeDescription') }}</p>
21+
<Alert
22+
v-if="isLoading"
23+
:type="nodeType.isTrigger ? 'warning' : 'info-neutral'"
24+
>
25+
<p>
26+
{{
27+
nodeType.isTrigger
28+
? $t('simulateDispatch.triggerNodeAwaitingEvent')
29+
: $t('simulateDispatch.simulationInProgress')
30+
}}
31+
</p>
1932
</Alert>
20-
21-
<Alert v-else-if="isLoading" type="info-neutral">
22-
<p>{{ $t('simulateDispatch.triggerNodeAwaitingEvent') }}</p>
33+
<Alert v-else-if="!hasSampleData" type="info-neutral">
34+
<p>
35+
{{ $t('simulateDispatch.testNodeDescription') }}
36+
</p>
2337
</Alert>
2438

2539
<div
26-
v-if="hasSampleData && !isSimulating"
40+
v-if="hasSampleData && !isLoading"
2741
:class="{
2842
'simulate-dispatch-node__sample-data--error': isErrorSample,
2943
}"
@@ -185,14 +199,6 @@ const buttonLabel = computed(() => {
185199
: app.i18n.t('simulateDispatch.buttonLabelTest')
186200
})
187201
188-
const showTestNodeDescription = computed(() => {
189-
if (Boolean(cantBeTestedReason.value) || hasSampleData.value) {
190-
return false
191-
}
192-
193-
return true
194-
})
195-
196202
const simulateDispatchNode = async () => {
197203
queryInProgress.value = true
198204

web-frontend/modules/automation/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"simulateDispatch": {
184184
"sampleDataLabel": "Output",
185185
"triggerNodeAwaitingEvent": "The node is waiting. Please manually trigger the event to populate the payload and complete the test.",
186+
"simulationInProgress": "Node test is in progress...",
186187
"errorNodeNotConfigured": "The node must be configured before it can be tested.",
187188
"errorPreviousNodeNotConfigured": "The previous node \"{node}\" must be configured.",
188189
"errorPreviousNodesNotTested": "The previous node \"{node}\" must be tested first.",

web-frontend/modules/builder/elementTypes.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,10 @@ export class ElementType extends Registerable {
904904
element: mainElement,
905905
})
906906

907+
if (!mainDataSource) {
908+
return null
909+
}
910+
907911
const mainDataSourceType = this.app.$registry.get(
908912
'service',
909913
mainDataSource.type

web-frontend/modules/database/jobTypes.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,13 @@ export class SyncDataSyncTableJobType extends JobType {
7070
return 'syncDataSyncTable'
7171
}
7272
}
73+
74+
export class FileImportJobType extends JobType {
75+
static getType() {
76+
return 'file_import'
77+
}
78+
79+
getName() {
80+
return 'fileImport'
81+
}
82+
}

web-frontend/modules/database/plugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { DatabaseApplicationType } from '@baserow/modules/database/applicationTy
22
import {
33
DuplicateTableJobType,
44
SyncDataSyncTableJobType,
5+
FileImportJobType,
56
} from '@baserow/modules/database/jobTypes'
67
import {
78
GridViewType,
@@ -411,6 +412,7 @@ export default (context) => {
411412

412413
app.$registry.register('job', new DuplicateTableJobType(context))
413414
app.$registry.register('job', new SyncDataSyncTableJobType(context))
415+
app.$registry.register('job', new FileImportJobType(context))
414416

415417
app.$registry.register('view', new GridViewType(context))
416418
app.$registry.register('view', new GalleryViewType(context))

0 commit comments

Comments
 (0)