src/datasource.js
// Test the connection to Solr by querying collection response.
Test the connection to Solr by querying collection response.
Test the connection to Solr by querying collection response .
testDatasource() {
    return this.doRequest({
      url: this.url + '/',
      method: 'GET',
    }).then(response => {
      if (response.status === 200) {
        return {
          status: "success",
          message: "Data source is working",
          title: "Success"
        };
      } else {
        return {
          status: "error",
          message: "Data source is NOT working",
          title: "Error"
        };
      }
    });
  }
testDatasource ( ) { return this . doRequest ( { url : this . url + '/' , method : 'GET' , } ) . then ( response => { if ( response . status === 200 ) { return { status : "success" , message : "Data source is working" , title : "Success" } ; } else { return { status : "error" , message : "Data source is NOT working" , title : "Error" } ; } } ) ; }
Test the connection to Solr by querying collection response.
Test the connection to Solr by querying collection response .