mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Osdu: Add more logging.
This commit is contained in:
parent
b697ba764c
commit
c7b1fdc134
@ -50,7 +50,7 @@ RiaOsduConnector::RiaOsduConnector( QObject* parent,
|
|||||||
&QOAuth2AuthorizationCodeFlow::authorizeWithBrowser,
|
&QOAuth2AuthorizationCodeFlow::authorizeWithBrowser,
|
||||||
[]( QUrl url )
|
[]( QUrl url )
|
||||||
{
|
{
|
||||||
RiaLogging::info( "Authorize with url: " + url.toString() );
|
RiaLogging::debug( "Authorize with url: " + url.toString() );
|
||||||
QUrlQuery query( url );
|
QUrlQuery query( url );
|
||||||
url.setQuery( query );
|
url.setQuery( query );
|
||||||
QDesktopServices::openUrl( url );
|
QDesktopServices::openUrl( url );
|
||||||
@ -68,8 +68,18 @@ RiaOsduConnector::RiaOsduConnector( QObject* parent,
|
|||||||
|
|
||||||
auto replyHandler = new RiaOsduOAuthHttpServerReplyHandler( port, this );
|
auto replyHandler = new RiaOsduOAuthHttpServerReplyHandler( port, this );
|
||||||
m_osdu->setReplyHandler( replyHandler );
|
m_osdu->setReplyHandler( replyHandler );
|
||||||
|
RiaLogging::debug( "Osdu server callback: " + replyHandler->callback() );
|
||||||
|
|
||||||
connect( m_osdu, SIGNAL( granted() ), this, SLOT( accessGranted() ) );
|
connect( m_osdu, SIGNAL( granted() ), this, SLOT( accessGranted() ) );
|
||||||
|
connect( m_osdu,
|
||||||
|
SIGNAL( error( const QString&, const QString&, const QUrl& ) ),
|
||||||
|
this,
|
||||||
|
SLOT( errorReceived( const QString&, const QString&, const QUrl& ) ) );
|
||||||
|
|
||||||
|
connect( m_osdu,
|
||||||
|
SIGNAL( authorizationCallbackReceived( const QVariantMap& ) ),
|
||||||
|
this,
|
||||||
|
SLOT( authorizationCallbackReceived( const QVariantMap& ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -77,10 +87,31 @@ RiaOsduConnector::RiaOsduConnector( QObject* parent,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiaOsduConnector::accessGranted()
|
void RiaOsduConnector::accessGranted()
|
||||||
{
|
{
|
||||||
|
RiaLogging::debug( "Access granted." );
|
||||||
m_token = m_osdu->token();
|
m_token = m_osdu->token();
|
||||||
emit tokenReady( m_token );
|
emit tokenReady( m_token );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiaOsduConnector::errorReceived( const QString& error, const QString& errorDescription, const QUrl& uri )
|
||||||
|
{
|
||||||
|
RiaLogging::debug( "OSDU Error Received: " + error + ". Description: " + errorDescription );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiaOsduConnector::authorizationCallbackReceived( const QVariantMap& data )
|
||||||
|
{
|
||||||
|
RiaLogging::debug( "Authorization callback received:" );
|
||||||
|
for ( const auto& [key, value] : data.toStdMap() )
|
||||||
|
{
|
||||||
|
RiaLogging::debug( " Key: " + key + " Value: " + value.toString() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -102,6 +102,10 @@ signals:
|
|||||||
void wellLogsFinished( const QString& wellboreId );
|
void wellLogsFinished( const QString& wellboreId );
|
||||||
void tokenReady( const QString& token );
|
void tokenReady( const QString& token );
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void errorReceived( const QString& error, const QString& errorDescription, const QUrl& uri );
|
||||||
|
void authorizationCallbackReceived( const QVariantMap& data );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void requestParquetData( const QString& url, const QString& dataPartitionId, const QString& token );
|
void requestParquetData( const QString& url, const QString& dataPartitionId, const QString& token );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user