File tree Expand file tree Collapse file tree 5 files changed +38
-15
lines changed
Expand file tree Collapse file tree 5 files changed +38
-15
lines changed Original file line number Diff line number Diff line change 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-
196202const simulateDispatchNode = async () => {
197203 queryInProgress .value = true
198204
Original file line number Diff line number Diff line change 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." ,
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { DatabaseApplicationType } from '@baserow/modules/database/applicationTy
22import {
33 DuplicateTableJobType ,
44 SyncDataSyncTableJobType ,
5+ FileImportJobType ,
56} from '@baserow/modules/database/jobTypes'
67import {
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 ) )
You can’t perform that action at this time.
0 commit comments