Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
apis
Admin
Commits
d7166691
Commit
d7166691
authored
2 years ago
by
Sirieam Marie Hunke
Browse files
Options
Downloads
Patches
Plain Diff
Changed to type long
parent
3328e1e1
Branches
Issue/2330-fixNaNQuotainAdmin
No related tags found
1 merge request
!43
Fix: NaN Quota in Admin
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Admin/Controllers/AdminController.cs
+4
-4
4 additions, 4 deletions
src/Admin/Controllers/AdminController.cs
with
4 additions
and
4 deletions
src/Admin/Controllers/AdminController.cs
+
4
−
4
View file @
d7166691
...
...
@@ -198,7 +198,7 @@ namespace Coscine.Api.Admin.Controllers
/// <param name="resourceType">The used resource type.</param>
/// <param name="projectId">The used project.</param>
/// <returns>Allocated quota of the given resource type in the project.</returns>
private
int
CalculateAllocatedForAll
(
ResourceType
resourceType
,
Guid
projectId
)
private
long
CalculateAllocatedForAll
(
ResourceType
resourceType
,
Guid
projectId
)
{
var
resources
=
_resourceModel
.
GetAllWhere
((
resource
)
=>
(
from
projectResource
in
resource
.
ProjectResources
...
...
@@ -220,7 +220,7 @@ namespace Coscine.Api.Admin.Controllers
}
});
return
(
int
)
allocated
;
return
allocated
;
}
/// <summary>
...
...
@@ -229,7 +229,7 @@ namespace Coscine.Api.Admin.Controllers
/// <param name="resourceType">The used resource type.</param>
/// <param name="projectId">The used project.</param>
/// <returns>Used quota of the given resource type in the project.</returns>
private
int
CalculateUsedForAll
(
ResourceType
resourceType
,
Guid
projectId
)
private
long
CalculateUsedForAll
(
ResourceType
resourceType
,
Guid
projectId
)
{
var
resources
=
_resourceModel
.
GetAllWhere
((
resource
)
=>
(
from
projectResource
in
resource
.
ProjectResources
...
...
@@ -252,7 +252,7 @@ namespace Coscine.Api.Admin.Controllers
}
);
return
(
int
)
used
;
return
used
;
}
private
AdminQuotaReturnObject
CreateAdminQuotaReturnObject
(
ProjectQuota
projectQuota
,
Guid
projectId
)
...
...
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