Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d04ba49
Commit
0d04ba49
authored
Nov 16, 2021
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dependency list location text
- truncate it if it is too long Changelog: changed EE: true
parent
36253cf0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
11 deletions
+21
-11
ee/app/assets/javascripts/dependencies/components/dependencies_table.vue
...avascripts/dependencies/components/dependencies_table.vue
+4
-0
ee/app/assets/javascripts/dependencies/components/dependency_location.vue
...vascripts/dependencies/components/dependency_location.vue
+11
-5
ee/app/assets/stylesheets/pages/threat_management.scss
ee/app/assets/stylesheets/pages/threat_management.scss
+5
-5
ee/spec/frontend/dependencies/components/dependencies_table_spec.js
...ontend/dependencies/components/dependencies_table_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/dependencies/components/dependencies_table.vue
View file @
0d04ba49
...
@@ -27,6 +27,10 @@ const tdClass = (value, key, item) => {
...
@@ -27,6 +27,10 @@ const tdClass = (value, key, item) => {
classes
.
push
(
'
text-right
'
);
classes
.
push
(
'
text-right
'
);
}
}
if
(
key
===
'
location
'
)
{
classes
.
push
(
'
gl-md-max-w-15p
'
);
}
return
classes
;
return
classes
;
};
};
...
...
ee/app/assets/javascripts/dependencies/components/dependency_location.vue
View file @
0d04ba49
<
script
>
<
script
>
import
{
GlIcon
,
Gl
Link
,
GlPopover
,
GlInterspers
e
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
Gl
Intersperse
,
GlLink
,
GlPopover
,
GlTruncat
e
}
from
'
@gitlab/ui
'
;
import
{
n__
}
from
'
~/locale
'
;
import
{
n__
}
from
'
~/locale
'
;
import
DependencyPathViewer
from
'
./dependency_path_viewer.vue
'
;
import
DependencyPathViewer
from
'
./dependency_path_viewer.vue
'
;
...
@@ -10,9 +10,10 @@ export default {
...
@@ -10,9 +10,10 @@ export default {
components
:
{
components
:
{
DependencyPathViewer
,
DependencyPathViewer
,
GlIcon
,
GlIcon
,
GlIntersperse
,
GlLink
,
GlLink
,
GlPopover
,
GlPopover
,
Gl
Interspers
e
,
Gl
Truncat
e
,
},
},
props
:
{
props
:
{
location
:
{
location
:
{
...
@@ -50,9 +51,14 @@ export default {
...
@@ -50,9 +51,14 @@ export default {
<gl-intersperse
separator=
" / "
class=
"gl-text-gray-500"
>
<gl-intersperse
separator=
" / "
class=
"gl-text-gray-500"
>
<!-- We need to put an extra span to avoid separator between path & top level label -->
<!-- We need to put an extra span to avoid separator between path & top level label -->
<span>
<span>
<gl-link
:href=
"location.blob_path"
>
<gl-link
class=
"gl-display-inline-block gl-lg-display-block!"
:href=
"location.blob_path"
>
<gl-icon
name=
"doc-text"
class=
"gl-vertical-align-middle!"
/>
<gl-icon
name=
"doc-text"
/>
{{
location
.
path
}}
<gl-truncate
class=
"gl-lg-max-w-80p gl-display-none gl-lg-display-inline-flex"
:text=
"location.path"
with-tooltip
/>
<span
class=
"gl-lg-display-none"
>
{{
location
.
path
}}
</span>
</gl-link>
</gl-link>
<span
v-if=
"isTopLevelDependency"
>
{{
s__
(
'
Dependencies|(top level)
'
)
}}
</span>
<span
v-if=
"isTopLevelDependency"
>
{{
s__
(
'
Dependencies|(top level)
'
)
}}
</span>
</span>
</span>
...
...
ee/app/assets/stylesheets/pages/threat_management.scss
View file @
0d04ba49
...
@@ -2,14 +2,14 @@
...
@@ -2,14 +2,14 @@
align-items
:
flex-start
;
align-items
:
flex-start
;
}
}
.gl-md-max-w-
30
p
{
.gl-md-max-w-
15
p
{
@media
(
min-width
:
$breakpoint-md
)
{
@media
(
min-width
:
$breakpoint-md
)
{
max-width
:
30%
;
max-width
:
$gl-spacing-scale-15
;
}
}
}
}
.gl-
md-w-5
0p
{
.gl-
lg-max-w-8
0p
{
@media
(
min-width
:
$breakpoint-
md
)
{
@media
(
min-width
:
$breakpoint-
lg
)
{
width
:
5
0%
;
max-width
:
8
0%
;
}
}
}
}
ee/spec/frontend/dependencies/components/dependencies_table_spec.js
View file @
0d04ba49
...
@@ -44,7 +44,7 @@ describe('DependenciesTable component', () => {
...
@@ -44,7 +44,7 @@ describe('DependenciesTable component', () => {
const
locationLink
=
locationCell
.
find
(
GlLink
);
const
locationLink
=
locationCell
.
find
(
GlLink
);
expect
(
locationLink
.
attributes
().
href
).
toBe
(
dependency
.
location
.
blob_path
);
expect
(
locationLink
.
attributes
().
href
).
toBe
(
dependency
.
location
.
blob_path
);
expect
(
locationLink
.
text
()).
to
Be
(
dependency
.
location
.
path
);
expect
(
locationLink
.
text
()).
to
Contain
(
dependency
.
location
.
path
);
const
licenseLinks
=
licenseCell
.
find
(
DependencyLicenseLinks
);
const
licenseLinks
=
licenseCell
.
find
(
DependencyLicenseLinks
);
expect
(
licenseLinks
.
exists
()).
toBe
(
true
);
expect
(
licenseLinks
.
exists
()).
toBe
(
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment