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 = (
8
8
...options ,
9
9
jsonData : {
10
10
...options . jsonData ,
11
- timeField : options . jsonData . timeField || 'timestamp' ,
12
11
logMessageField : options . jsonData . logMessageField || '' ,
13
12
logLevelField : options . jsonData . logLevelField || '' ,
14
13
} ,
Original file line number Diff line number Diff line change @@ -93,6 +93,18 @@ export class QuickwitDataSource
93
93
* see public/app/features/datasources/state/actions.ts for what needs to be returned here
94
94
*/
95
95
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
+ }
96
108
return lastValueFrom (
97
109
from ( this . getResource ( 'indexes/' + this . index ) ) . pipe (
98
110
mergeMap ( ( indexMetadata ) => {
You can’t perform that action at this time.
0 commit comments