forked from qt-creator/qt-creator
Axivion: Use more dashboard url instead of server url
Change-Id: I1fbc1dad779e9198206cb8ef4a4029a99af6861f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -345,7 +345,9 @@ void AxivionPluginPrivate::onStartupProjectChanged(Project *project)
|
|||||||
|
|
||||||
static QUrl urlForProject(const QString &projectName)
|
static QUrl urlForProject(const QString &projectName)
|
||||||
{
|
{
|
||||||
return QUrl(settings().server.dashboard).resolved(QString("api/projects/")).resolved(projectName);
|
if (!dd->m_dashboardInfo)
|
||||||
|
return {};
|
||||||
|
return dd->m_dashboardInfo->source.resolved(QString("api/projects/")).resolved(projectName);
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr int httpStatusCodeOk = 200;
|
static constexpr int httpStatusCodeOk = 200;
|
||||||
@@ -582,7 +584,7 @@ static Group authorizationRecipe()
|
|||||||
|
|
||||||
apiTokenStorage->credential = dashboardStorage->credential;
|
apiTokenStorage->credential = dashboardStorage->credential;
|
||||||
apiTokenStorage->url
|
apiTokenStorage->url
|
||||||
= QUrl(settings().server.dashboard).resolved(*dashboardDto.userApiTokenUrl);
|
= dd->m_dashboardInfo->source.resolved(*dashboardDto.userApiTokenUrl);
|
||||||
apiTokenStorage->csrfToken = dashboardDto.csrfToken.toUtf8();
|
apiTokenStorage->csrfToken = dashboardDto.csrfToken.toUtf8();
|
||||||
const Dto::ApiTokenCreationRequestDto requestDto{*passwordStorage, "IdePlugin",
|
const Dto::ApiTokenCreationRequestDto requestDto{*passwordStorage, "IdePlugin",
|
||||||
apiTokenDescription(), 0};
|
apiTokenDescription(), 0};
|
||||||
@@ -790,8 +792,8 @@ void AxivionPluginPrivate::fetchProjectInfo(const QString &projectName)
|
|||||||
handleOpenedDocs();
|
handleOpenedDocs();
|
||||||
};
|
};
|
||||||
|
|
||||||
const QUrl url(settings().server.dashboard);
|
taskTree.setRecipe(
|
||||||
taskTree.setRecipe(fetchDataRecipe<Dto::ProjectInfoDto>(url.resolved(*it), handler));
|
fetchDataRecipe<Dto::ProjectInfoDto>(m_dashboardInfo->source.resolved(*it), handler));
|
||||||
return SetupResult::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user