Axivion: Load projectInfo with taken from DashboardInfo

Task tree variant.

Change-Id: Ie42573f78caa180ad9669e63bab8a6b920515927
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jarek Kobus
2024-01-24 00:06:55 +01:00
parent 2beaba4627
commit 428898e6ba

View File

@@ -384,7 +384,13 @@ void AxivionPluginPrivate::fetchProjectInfo(const QString &projectName)
return;
}
const QUrl url = urlForProject(projectName);
const auto onTaskTreeSetup = [this, projectName](TaskTree &taskTree) {
if (!m_dashboardInfo)
return SetupResult::StopWithError;
const auto it = m_dashboardInfo->projectUrls.constFind(projectName);
if (it == m_dashboardInfo->projectUrls.constEnd())
return SetupResult::StopWithError;
const auto handler = [this](const Dto::ProjectInfoDto &data) {
m_currentProjectInfo = data;
@@ -400,7 +406,16 @@ void AxivionPluginPrivate::fetchProjectInfo(const QString &projectName)
}
};
m_taskTreeRunner.start(fetchDataRecipe<Dto::ProjectInfoDto>(url, handler));
const QUrl url(settings().server.dashboard);
taskTree.setRecipe(fetchDataRecipe<Dto::ProjectInfoDto>(url.resolved(*it), handler));
return SetupResult::Continue;
};
const Group root {
dashboardInfoRecipe(),
TaskTreeTask(onTaskTreeSetup)
};
m_taskTreeRunner.start(root);
}
void AxivionPluginPrivate::fetchIssueTableLayout(const QString &prefix)