Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ClientServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue 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
YAPEX
ClientServer
Commits
785e1e69
Commit
785e1e69
authored
5 years ago
by
Janis Daniel Dähne
Browse files
Options
Downloads
Patches
Plain Diff
- added totalReleases, totalSubmissions, totalTags to dashboard usage
parent
6c3e2e94
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ClientServer/Controllers/dashboard/DashboardController.cs
+34
-6
34 additions, 6 deletions
...ClientServer/Controllers/dashboard/DashboardController.cs
with
34 additions
and
6 deletions
src/ClientServer/Controllers/dashboard/DashboardController.cs
+
34
−
6
View file @
785e1e69
...
...
@@ -222,7 +222,7 @@ namespace ClientServer.Controllers
Jc
.
Serialize
(
new
BasicResponse
(
ResponseCode
.
NotFound
,
"systems settings not found"
)));
return
;
}
var
settingsFromBackend
=
SystemSettingsController
.
_CreateSystemSettingsFromBackend
(
systemSettings
);
await
...
...
@@ -270,10 +270,31 @@ namespace ClientServer.Controllers
int
totalGroupRoles
=
await
_context
.
GroupRoles
.
CountAsync
();
int
totalExercises
=
await
_context
.
Exercises
.
CountAsync
();
int
totalCustomProjects
=
await
_context
.
CustomProjects
.
CountAsync
();
int
runningAssessments
=
await
_context
.
ExerciseReleases
.
CountAsync
(
p
=>
p
.
HasAutomaticAssessmentStarted
&&
p
.
HasAutomaticAssessmentFinished
==
false
);
int
runningAssessments
=
await
_context
.
ExerciseReleases
.
CountAsync
(
p
=>
p
.
HasAutomaticAssessmentStarted
&&
p
.
HasAutomaticAssessmentFinished
==
false
);
int
totalSubmissions
=
await
_context
.
ExerciseReleases
.
Where
(
p
=>
p
.
ExerciseReleaseWithUserAsParticipations
.
Count
>=
5
)
.
SumAsync
(
p
=>
p
.
ExerciseReleaseWithUserAsParticipations
.
Count
);
// int totalSubmissions2 =
// await _context.ExerciseReleases
// .SumAsync(p => p.ExerciseReleaseWithUserAsParticipations.Count);
//or maybe only count where we have >2 / >5 submissions? else it's likely to be a test release
//also excludes releases where we have no submissions
int
totalReleases
=
await
_context
.
ExerciseReleases
.
CountAsync
(
p
=>
p
.
ExerciseReleaseWithUserAsParticipations
.
Count
>=
5
);
// int totalReleases2 = await _context.ExerciseReleases
// .CountAsync();
int
totalTags
=
await
_context
.
Tags
.
CountAsync
();
var
statistic
=
new
LogicalUsageStatistic
()
{
...
...
@@ -284,6 +305,9 @@ namespace ClientServer.Controllers
TotalGroupRoles
=
totalGroupRoles
,
TotalExercises
=
totalExercises
,
TotalCustomProjects
=
totalCustomProjects
,
TotalTags
=
totalTags
,
TotalReleases
=
totalReleases
,
TotalSubmissions
=
totalSubmissions
,
RunningAssessments
=
runningAssessments
,
};
...
...
@@ -419,6 +443,10 @@ namespace ClientServer.Controllers
public
int
TotalExercises
{
get
;
set
;
}
public
int
TotalCustomProjects
{
get
;
set
;
}
public
int
TotalTags
{
get
;
set
;
}
public
int
TotalReleases
{
get
;
set
;
}
public
int
TotalSubmissions
{
get
;
set
;
}
/// <summary>
/// the number of running assessments
/// </summary>
...
...
@@ -461,7 +489,7 @@ namespace ClientServer.Controllers
public
string
DashboardScriptPathRelativeToCurrentDir
{
get
;
set
;
}
public
bool
RunAssessmentsAsync
{
get
;
set
;
}
public
bool
IsInitControllerEnabled
{
get
;
set
;
}
public
bool
EnsureFileUploadDirStructure
{
get
;
set
;
}
public
string
FileUploadDirRelativePath
{
get
;
set
;
}
public
string
MarkdownAssetFilesUploadDirName
{
get
;
set
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment