File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ export const coerceOptions = (
88 ...options ,
99 jsonData : {
1010 ...options . jsonData ,
11- timeField : options . jsonData . timeField || 'timestamp' ,
1211 logMessageField : options . jsonData . logMessageField || '' ,
1312 logLevelField : options . jsonData . logLevelField || '' ,
1413 } ,
Original file line number Diff line number Diff line change @@ -93,6 +93,18 @@ export class QuickwitDataSource
9393 * see public/app/features/datasources/state/actions.ts for what needs to be returned here
9494 */
9595 async testDatasource ( ) {
96+ if ( this . index === '' ) {
97+ return {
98+ status : 'error' ,
99+ message : 'Cannot save datasource, `index` is required' ,
100+ } ;
101+ }
102+ if ( this . timeField === '' ) {
103+ return {
104+ status : 'error' ,
105+ message : 'Cannot save datasource, `timeField` is required' ,
106+ } ;
107+ }
96108 return lastValueFrom (
97109 from ( this . getResource ( 'indexes/' + this . index ) ) . pipe (
98110 mergeMap ( ( indexMetadata ) => {
You can’t perform that action at this time.
0 commit comments