Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metadata
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
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab 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
Metadata
Commits
0b1741a7
Commit
0b1741a7
authored
2 years ago
by
Petar Hristov
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into 'master'
Release: Sprint/2022 15
See merge request
!59
parents
7a298fce
ec5e5eac
No related branches found
No related tags found
1 merge request
!59
Release: Sprint/2022 15 :robot:
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
src/Metadata/Controllers/MetadataController.cs
+21
-1
21 additions, 1 deletion
src/Metadata/Controllers/MetadataController.cs
src/Metadata/Metadata.csproj
+4
-3
4 additions, 3 deletions
src/Metadata/Metadata.csproj
with
26 additions
and
5 deletions
README.md
+
1
−
1
View file @
0b1741a7
This diff is collapsed.
Click to expand it.
src/Metadata/Controllers/MetadataController.cs
+
21
−
1
View file @
0b1741a7
...
...
@@ -4,7 +4,9 @@ using Coscine.Api.Metadata.ParameterObjects;
using
Coscine.Api.Metadata.Util
;
using
Coscine.ApiCommons
;
using
Coscine.Configuration
;
using
Coscine.Database.DataModel
;
using
Coscine.Database.Models
;
using
Coscine.Logging
;
using
Coscine.Metadata
;
using
GitLabApiClient
;
using
GitLabApiClient.Models.Branches.Requests
;
...
...
@@ -12,6 +14,7 @@ using GitLabApiClient.Models.Commits.Requests.CreateCommitRequest;
using
GitLabApiClient.Models.MergeRequests.Requests
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Logging
;
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -34,6 +37,7 @@ namespace Coscine.Api.Metadata.Controllers
private
readonly
Authenticator
_authenticator
;
private
readonly
Emitter
_emitter
;
private
readonly
IConfiguration
_configuration
;
private
readonly
CoscineLogger
_coscineLogger
;
private
readonly
ResourceModel
_resourceModel
;
private
readonly
RdfStoreConnector
_rdfStoreConnector
;
...
...
@@ -46,9 +50,10 @@ namespace Coscine.Api.Metadata.Controllers
/// <summary>
/// MetadataController constructor specifying an authenticator and a ResourceModel.
/// </summary>
public
MetadataController
()
public
MetadataController
(
ILogger
<
MetadataController
>
logger
)
{
_configuration
=
Program
.
Configuration
;
_coscineLogger
=
new
CoscineLogger
(
logger
);
_authenticator
=
new
Authenticator
(
this
,
_configuration
);
_resourceModel
=
new
ResourceModel
();
_rdfStoreConnector
=
new
RdfStoreConnector
(
_configuration
.
GetStringAndWait
(
"coscine/local/virtuoso/additional/url"
));
...
...
@@ -261,7 +266,22 @@ namespace Coscine.Api.Metadata.Controllers
MergeRequestURL
=
newMergeRequest
.
WebUrl
});
LogAnalyticsApplicationProfileRequest
(
user
,
applicationProfile
.
Name
,
newMergeRequest
.
WebUrl
);
return
NoContent
();
}
private
void
LogAnalyticsApplicationProfileRequest
(
User
user
,
string
applicationProfileName
,
string
mergeRequestUrl
)
{
_coscineLogger
.
AnalyticsLog
(
new
AnalyticsLogObject
{
Type
=
"Action"
,
Operation
=
"Merge Request Application Profile"
,
UserId
=
user
.
Id
.
ToString
(),
ApplicationsProfile
=
applicationProfileName
,
ExternalInfo
=
mergeRequestUrl
});
}
}
}
This diff is collapsed.
Click to expand it.
src/Metadata/Metadata.csproj
+
4
−
3
View file @
0b1741a7
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>Coscine.Api.Metadata</RootNamespace>
...
...
@@ -10,16 +10,17 @@
<PropertyGroup>
<Authors>RWTH Aachen University</Authors>
<Company>IT Center, RWTH Aachen University</Company>
<Copyright>202
1
IT Center, RWTH Aachen University</Copyright>
<Copyright>202
2
IT Center, RWTH Aachen University</Copyright>
<Description>Metadata is a part of the Coscine group.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://git.rwth-aachen.de/coscine/backend/apis/Metadata</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Coscine.Action" Version="
2
.*-*" />
<PackageReference Include="Coscine.Action" Version="
3
.*-*" />
<PackageReference Include="Coscine.ApiCommons" Version="2.*-*" />
<PackageReference Include="Coscine.Metadata" Version="2.*-*" />
<PackageReference Include="Coscine.Logging" Version="2.*-*" />
<PackageReference Include="GitLabApiClient" Version="1.8.1-beta.5" />
</ItemGroup>
</Project>
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