Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Entwicklungsportal - ARCHIVED
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
FIT-Connect
Entwicklungsportal - ARCHIVED
Commits
d2ca284e
Commit
d2ca284e
authored
2 years ago
by
Mark Kane
Browse files
Options
Downloads
Patches
Plain Diff
Conf: add .editorconfig (
planning#401
)
parent
e8845009
No related branches found
Branches containing commit
No related tags found
1 merge request
!24
Fix: get status from tags (planning#401)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.editorconfig
+10
-0
10 additions, 0 deletions
.editorconfig
pages/resources/[serviceName].tsx
+9
-9
9 additions, 9 deletions
pages/resources/[serviceName].tsx
with
19 additions
and
9 deletions
.editorconfig
0 → 100644
+
10
−
0
View file @
d2ca284e
# http://editorconfig.org
root
=
true
[*.{json, yaml, yml, md, mdx, js, jsx}]
end_of_line
=
lf
indent_size
=
2
indent_style
=
space
charset
=
utf-8
trim_trailing_whitespace
=
true
insert_final_newline
=
true
This diff is collapsed.
Click to expand it.
pages/resources/[serviceName].tsx
+
9
−
9
View file @
d2ca284e
...
...
@@ -4,24 +4,24 @@ import { fetchServices, fetchService, Filter, ServiceType, Tag } from '@/lib/con
import
{
removeFromObjRecursive
,
replaceEmailsRecursive
}
from
'
@/lib/utils
'
import
{
documentToHtmlString
}
from
'
@contentful/rich-text-html-renderer
'
import
{
IconChevronLeft
}
from
'
@tabler/icons
'
import
filterData
from
'
@/lib/assets/data/currentFilter.json
'
;
import
filterData
from
'
@/lib/assets/data/currentFilter.json
'
function
getServiceTag
(
service
:
ServiceType
):
Tag
{
const
ONLY_STATUS_TAG
=
0
;
const
statusTag
=
service
.
tags
?.
filter
((
tag
:
Tag
)
=>
tag
.
fields
?.
name
.
startsWith
(
'
status
'
))[
ONLY_STATUS_TAG
]
;
const
ONLY_STATUS_TAG
=
0
const
statusTag
=
service
.
tags
?.
filter
((
tag
:
Tag
)
=>
tag
.
fields
?.
name
.
startsWith
(
'
status
'
))[
ONLY_STATUS_TAG
]
return
statusTag
;
return
statusTag
}
function
getTagLabelValue
(
tag
:
Tag
):
string
{
const
ONLY_MATCHING_FILTER
=
0
;
const
TAG_LABEL_EXPRESSION
=
1
;
const
STATUS_FILTER_DEFINITION
=
1
;
const
ONLY_MATCHING_FILTER
=
0
const
TAG_LABEL_EXPRESSION
=
1
const
STATUS_FILTER_DEFINITION
=
1
const
tagLabelParts
=
tag
?.
fields
?.
name
.
split
(
'
:
'
)
;
const
tagLabelParts
=
tag
?.
fields
?.
name
.
split
(
'
:
'
)
const
statusFilter
=
tag
?
filterData
.
filter
[
STATUS_FILTER_DEFINITION
].
options
.
filter
((
option
:
Filter
)
=>
option
.
id
===
tagLabelParts
[
TAG_LABEL_EXPRESSION
])
:
null
return
statusFilter
?
statusFilter
[
ONLY_MATCHING_FILTER
].
label
:
'
Unbekannt
'
;
return
statusFilter
?
statusFilter
[
ONLY_MATCHING_FILTER
].
label
:
'
Unbekannt
'
}
...
...
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