mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Merge pull request #2216 from dforsi/fix/api-host
Improve indication of API server address
This commit is contained in:
commit
568b2446f1
@ -44,7 +44,7 @@ void WebAPIServer::start()
|
|||||||
if (!m_listener)
|
if (!m_listener)
|
||||||
{
|
{
|
||||||
m_listener = new qtwebapp::HttpListener(m_settings, m_requestMapper, qApp);
|
m_listener = new qtwebapp::HttpListener(m_settings, m_requestMapper, qApp);
|
||||||
qInfo("WebAPIServer::start: starting web API server at http://%s:%d", qPrintable(m_settings.host), m_settings.port);
|
qInfo("WebAPIServer::start: starting web API server at http://%s:%d", qPrintable(m_settings.host.isEmpty() ? "0.0.0.0" : m_settings.host), m_settings.port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ void WebAPIServer::stop()
|
|||||||
{
|
{
|
||||||
delete m_listener;
|
delete m_listener;
|
||||||
m_listener = 0;
|
m_listener = 0;
|
||||||
qInfo("WebAPIServer::stop: stopped web API server at http://%s:%d", qPrintable(m_settings.host), m_settings.port);
|
qInfo("WebAPIServer::stop: stopped web API server at http://%s:%d", qPrintable(m_settings.host.isEmpty() ? "0.0.0.0" : m_settings.host), m_settings.port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ AboutDialog::AboutDialog(const QString& apiHost, int apiPort, const MainSettings
|
|||||||
ui->dspBits->setText(QString("DSP Rx %1 bits Tx %2 bits").arg(SDR_RX_SAMP_SZ).arg(SDR_TX_SAMP_SZ));
|
ui->dspBits->setText(QString("DSP Rx %1 bits Tx %2 bits").arg(SDR_RX_SAMP_SZ).arg(SDR_TX_SAMP_SZ));
|
||||||
ui->pid->setText(QString("PID: %1").arg(qApp->applicationPid()));
|
ui->pid->setText(QString("PID: %1").arg(qApp->applicationPid()));
|
||||||
QString apiUrl = QString("http://%1:%2/").arg(apiHost).arg(apiPort);
|
QString apiUrl = QString("http://%1:%2/").arg(apiHost).arg(apiPort);
|
||||||
ui->restApiUrl->setText(QString("REST API documentation: <a href=\"%1\">%2</a>").arg(apiUrl).arg(apiUrl));
|
ui->restApiUrl->setText(QString("REST API server and documentation: <a href=\"%1\">%2</a>").arg(apiUrl).arg(apiUrl));
|
||||||
ui->restApiUrl->setOpenExternalLinks(true);
|
ui->restApiUrl->setOpenExternalLinks(true);
|
||||||
ui->settingsFile->setText(QString("Settings: %1").arg(mainSettings.getFileLocation()));
|
ui->settingsFile->setText(QString("Settings: %1").arg(mainSettings.getFileLocation()));
|
||||||
}
|
}
|
||||||
|
@ -3096,7 +3096,7 @@ void MainWindow::loadDefaultPreset(const QString& pluginId, SerializableInterfac
|
|||||||
|
|
||||||
void MainWindow::on_action_About_triggered()
|
void MainWindow::on_action_About_triggered()
|
||||||
{
|
{
|
||||||
AboutDialog dlg(m_apiHost.isEmpty() ? "127.0.0.1" : m_apiHost, m_apiPort, m_mainCore->m_settings, this);
|
AboutDialog dlg(m_apiHost.isEmpty() ? "0.0.0.0" : m_apiHost, m_apiPort, m_mainCore->m_settings, this);
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user