Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UI
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
frontend
apps
UI
Commits
62cfac6f
Commit
62cfac6f
authored
2 years ago
by
Hanna Führ
Committed by
Sandra Westerhoff
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update: Provide meta information gitlab resource
parent
4186a11a
No related branches found
No related tags found
2 merge requests
!143
Release: Sprint/2022 22 :robot:
,
!142
Update: Provide meta information gitlab resource
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/resource/components/resource-page/FilesViewHeader.vue
+47
-1
47 additions, 1 deletion
...les/resource/components/resource-page/FilesViewHeader.vue
with
47 additions
and
1 deletion
src/modules/resource/components/resource-page/FilesViewHeader.vue
+
47
−
1
View file @
62cfac6f
...
...
@@ -152,6 +152,18 @@
<b>
{{ `${$t("page.resource.usageRights")}: ` }}
</b>
{{ resource.usageRights }}
</li>
<li
v-if=
"resource.resourceTypeOption.RepoUrl"
>
<b>
{{ `${$t("resourceType.gitlab.domainLabel")} ` }}
</b>
{{ resource.resourceTypeOption.RepoUrl }}
</li>
<li
v-if=
"resource.resourceTypeOption.ProjectId"
>
<b>
{{ `${$t("resourceType.gitlab.projectLabel")} ` }}
</b>
{{ gitlabInformation.project ? gitlabInformation.project.name : "" }}
</li>
<li
v-if=
"resource.resourceTypeOption.Branch"
>
<b>
{{ `${$t("resourceType.gitlab.referenceLabel")} ` }}
</b>
{{ resource.resourceTypeOption.Branch }}
</li>
</ul>
</b-popover>
</b-row>
...
...
@@ -173,8 +185,12 @@ import type {
ProjectQuotaReturnObject
,
UserObject
,
}
from
"
@coscine/api-client/dist/types/Coscine.Api.Project
"
;
import
type
{
ResourceTypeInformation
}
from
"
@coscine/api-client/dist/types/Coscine.Api.Resources
"
;
import
type
{
Project
,
ResourceTypeInformation
,
}
from
"
@coscine/api-client/dist/types/Coscine.Api.Resources
"
;
import
type
{
VisitedResourceObject
}
from
"
../../types
"
;
import
type
{
GitlabInformation
}
from
"
@/modules/resource/types
"
;
export
default
defineComponent
({
name
:
"
FilesViewHeader
"
,
...
...
@@ -185,6 +201,7 @@ export default defineComponent({
type
:
String
,
},
},
setup
()
{
const
resourceStore
=
useResourceStore
();
const
projectStore
=
useProjectStore
();
...
...
@@ -193,6 +210,18 @@ export default defineComponent({
return
{
resourceStore
,
projectStore
,
userStore
};
},
data
()
{
return
{
gitlabInformation
:
{
domain
:
""
,
accessToken
:
""
,
project
:
null
,
reference
:
null
,
}
as
GitlabInformation
,
gitlabProjects
:
[]
as
Project
[]
|
null
,
};
},
computed
:
{
isOwner
():
boolean
|
undefined
{
return
this
.
projectStore
.
currentUserRoleIsOwner
;
...
...
@@ -247,7 +276,24 @@ export default defineComponent({
return
undefined
;
},
},
async
mounted
()
{
await
this
.
getGitlabProjectName
();
},
methods
:
{
async
getGitlabProjectName
()
{
this
.
gitlabProjects
=
await
this
.
resourceStore
.
getGitlabAllProjects
(
this
.
resource
?.
resourceTypeOption
.
RepoUrl
,
this
.
resource
?.
resourceTypeOption
.
AccessToken
);
if
(
this
.
gitlabProjects
)
{
this
.
gitlabInformation
.
project
=
this
.
gitlabProjects
.
find
(
(
p
)
=>
p
.
id
===
this
.
resource
?.
resourceTypeOption
.
ProjectId
)
??
null
;
}
},
edit
()
{
if
(
this
.
resource
&&
...
...
This diff is collapsed.
Click to expand it.
CoscineBot
@CoscineBot
mentioned in commit
181dd8db
·
2 years ago
mentioned in commit
181dd8db
mentioned in commit 181dd8dbdabb6b921e8fb36a8b0e287ed92b1a44
Toggle commit list
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