Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KPI Reporting Generator
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
scripts
KPI Reporting Generator
Merge requests
!40
Fix: KPI Reporting
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix: KPI Reporting
Issue/3005-kpiReportingBroken
into
main
Overview
0
Commits
2
Pipelines
3
Changes
7
Merged
Sandra Westerhoff
requested to merge
Issue/3005-kpiReportingBroken
into
main
6 months ago
Overview
0
Commits
2
Pipelines
3
Changes
7
Expand
coscine/issues#3005
0
0
Merge request reports
Compare
main
version 1
8851d131
6 months ago
main (base)
and
latest version
latest version
56f415c5
2 commits,
6 months ago
version 1
8851d131
1 commit,
6 months ago
7 files
+
22
−
19
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
src/KpiGenerator/Reportings/ApplicationProfile/ApplicationProfileReporting.cs
+
7
−
5
Options
@@ -24,6 +24,7 @@ public class ApplicationProfileReporting
private
readonly
IStorageService
_gitlabStorageService
;
private
readonly
IStorageService
_localStorageService
;
private
readonly
KpiConfiguration
_kpiConfiguration
;
private
readonly
ReportingConfiguration
_reportingConfiguration
;
public
static
string
AdminToken
{
get
;
set
;
}
=
null
!;
public
AdminApi
AdminApi
{
get
;
init
;
}
@@ -38,7 +39,8 @@ public class ApplicationProfileReporting
ILogger
<
ApplicationProfileReporting
>
logger
,
[
FromKeyedServices
(
"gitlab"
)]
IStorageService
gitlabStorageService
,
[
FromKeyedServices
(
"local"
)]
IStorageService
localStorageService
,
IOptionsMonitor
<
KpiConfiguration
>
kpiConfiguration
IOptionsMonitor
<
KpiConfiguration
>
kpiConfiguration
,
IOptionsMonitor
<
ReportingConfiguration
>
reportingConfiguration
)
{
_mapper
=
mapper
;
@@ -46,15 +48,15 @@ public class ApplicationProfileReporting
_gitlabStorageService
=
gitlabStorageService
;
_localStorageService
=
localStorageService
;
_kpiConfiguration
=
kpiConfiguration
.
CurrentValue
;
_reportingConfiguration
=
reportingConfiguration
.
CurrentValue
;
ReportingFileName
=
_kpiConfiguration
.
ApplicationProfileKpi
.
FileName
;
var
configuration
=
new
Configuration
()
{
BasePath
=
"http://localhost:7206
/coscine"
,
BasePath
=
$"
{
_reportingConfiguration
.
Endpoint
.
TrimEnd
(
'/'
)}
/coscine"
,
ApiKeyPrefix
=
{
{
"Authorization"
,
"Bearer"
}
},
ApiKey
=
{
{
"Authorization"
,
ApiConfigurationUtil
.
GenerateAdminToken
(
ApiConfigurationUtil
.
RetrieveJwtConfiguration
())
}
},
Timeout
=
300000
,
// 5 minutes
ApiKey
=
{
{
"Authorization"
,
_reportingConfiguration
.
ApiKey
}
},
Timeout
=
300000
// 5 minutes
};
AdminApi
=
new
AdminApi
(
configuration
);
Loading