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
2e21443b
Commit
2e21443b
authored
Jun 05, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed design detail pages not opening
parent
5c0b1f18
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
22 additions
and
22 deletions
+22
-22
ee/app/assets/javascripts/design_management/components/list/item.vue
...ts/javascripts/design_management/components/list/item.vue
+1
-1
ee/app/assets/javascripts/design_management/components/toolbar/index.vue
...avascripts/design_management/components/toolbar/index.vue
+1
-1
ee/app/assets/javascripts/design_management/components/toolbar/pagination.vue
...ripts/design_management/components/toolbar/pagination.vue
+2
-2
ee/app/assets/javascripts/design_management/components/toolbar/pagination_button.vue
...esign_management/components/toolbar/pagination_button.vue
+1
-1
ee/app/assets/javascripts/design_management/graphql.js
ee/app/assets/javascripts/design_management/graphql.js
+2
-3
ee/app/assets/javascripts/design_management/pages/design/index.vue
...sets/javascripts/design_management/pages/design/index.vue
+1
-1
ee/app/assets/javascripts/design_management/queries/getDesign.graphql
...s/javascripts/design_management/queries/getDesign.graphql
+1
-1
ee/app/assets/javascripts/design_management/router.js
ee/app/assets/javascripts/design_management/router.js
+3
-2
ee/spec/frontend/design_management/components/toolbar/__snapshots__/pagination_spec.js.snap
.../components/toolbar/__snapshots__/pagination_spec.js.snap
+2
-2
ee/spec/frontend/design_management/components/toolbar/index_spec.js
...ontend/design_management/components/toolbar/index_spec.js
+1
-1
ee/spec/frontend/design_management/components/toolbar/pagination_button_spec.js
...n_management/components/toolbar/pagination_button_spec.js
+3
-3
ee/spec/frontend/design_management/components/toolbar/pagination_spec.js
...d/design_management/components/toolbar/pagination_spec.js
+2
-2
ee/spec/frontend/design_management/pages/design/index_spec.js
...pec/frontend/design_management/pages/design/index_spec.js
+1
-1
ee/spec/frontend/design_management/router_spec.js
ee/spec/frontend/design_management/router_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/design_management/components/list/item.vue
View file @
2e21443b
...
@@ -42,7 +42,7 @@ export default {
...
@@ -42,7 +42,7 @@ export default {
<
template
>
<
template
>
<router-link
<router-link
:to=
"
{ name: 'design', params: { id } }"
:to=
"
{ name: 'design', params: { id
: name
} }"
class="card cursor-pointer text-plain js-design-list-item"
class="card cursor-pointer text-plain js-design-list-item"
>
>
<div
class=
"card-body p-0"
>
<div
class=
"card-body p-0"
>
...
...
ee/app/assets/javascripts/design_management/components/toolbar/index.vue
View file @
2e21443b
...
@@ -14,7 +14,7 @@ export default {
...
@@ -14,7 +14,7 @@ export default {
mixins
:
[
timeagoMixin
],
mixins
:
[
timeagoMixin
],
props
:
{
props
:
{
id
:
{
id
:
{
type
:
Number
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
isLoading
:
{
isLoading
:
{
...
...
ee/app/assets/javascripts/design_management/components/toolbar/pagination.vue
View file @
2e21443b
...
@@ -12,7 +12,7 @@ export default {
...
@@ -12,7 +12,7 @@ export default {
mixins
:
[
allDesignsMixin
],
mixins
:
[
allDesignsMixin
],
props
:
{
props
:
{
id
:
{
id
:
{
type
:
Number
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
},
},
...
@@ -21,7 +21,7 @@ export default {
...
@@ -21,7 +21,7 @@ export default {
return
this
.
designs
.
length
;
return
this
.
designs
.
length
;
},
},
currentIndex
()
{
currentIndex
()
{
return
this
.
designs
.
findIndex
(
design
=>
parseInt
(
design
.
id
,
10
)
===
this
.
id
);
return
this
.
designs
.
findIndex
(
design
=>
design
.
filename
===
this
.
id
);
},
},
paginationText
()
{
paginationText
()
{
return
sprintf
(
s__
(
'
DesignManagement|%{current_design} of %{designs_count}
'
),
{
return
sprintf
(
s__
(
'
DesignManagement|%{current_design} of %{designs_count}
'
),
{
...
...
ee/app/assets/javascripts/design_management/components/toolbar/pagination_button.vue
View file @
2e21443b
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
designLink
()
{
designLink
()
{
if
(
!
this
.
design
)
return
{};
if
(
!
this
.
design
)
return
{};
return
{
name
:
'
design
'
,
params
:
{
id
:
this
.
design
.
id
}
};
return
{
name
:
'
design
'
,
params
:
{
id
:
this
.
design
.
filename
}
};
},
},
},
},
};
};
...
...
ee/app/assets/javascripts/design_management/graphql.js
View file @
2e21443b
...
@@ -15,9 +15,8 @@ const defaultClient = createDefaultClient({
...
@@ -15,9 +15,8 @@ const defaultClient = createDefaultClient({
variables
:
{
fullPath
:
projectPath
,
iid
:
issueIid
},
variables
:
{
fullPath
:
projectPath
,
iid
:
issueIid
},
});
});
return
result
.
project
.
issue
.
designs
.
designs
.
edges
.
find
(
return
result
.
project
.
issue
.
designs
.
designs
.
edges
.
find
(({
node
})
=>
node
.
filename
===
id
)
({
node
})
=>
parseInt
(
node
.
id
,
10
)
===
id
,
.
node
;
).
node
;
},
},
},
},
});
});
...
...
ee/app/assets/javascripts/design_management/pages/design/index.vue
View file @
2e21443b
...
@@ -12,7 +12,7 @@ export default {
...
@@ -12,7 +12,7 @@ export default {
},
},
props
:
{
props
:
{
id
:
{
id
:
{
type
:
Number
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
},
},
...
...
ee/app/assets/javascripts/design_management/queries/getDesign.graphql
View file @
2e21443b
query
getDesign
(
$id
:
ID
!)
{
query
getDesign
(
$id
:
String
!)
{
design
(
id
:
$id
)
@client
{
design
(
id
:
$id
)
@client
{
image
image
filename
filename
...
...
ee/app/assets/javascripts/design_management/router.js
View file @
2e21443b
import
$
from
'
jquery
'
;
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
VueRouter
from
'
vue-router
'
;
import
VueRouter
from
'
vue-router
'
;
import
Home
from
'
./pages/index.vue
'
;
import
Home
from
'
./pages/index.vue
'
;
...
@@ -39,9 +40,9 @@ const router = new VueRouter({
...
@@ -39,9 +40,9 @@ const router = new VueRouter({
from
,
from
,
next
,
next
,
)
{
)
{
if
(
id
>
0
)
next
();
if
(
_
.
isString
(
id
)
)
next
();
},
},
props
:
({
params
:
{
id
}
})
=>
({
id
:
parseInt
(
id
,
10
)
}),
props
:
({
params
:
{
id
}
})
=>
({
id
}),
},
},
],
],
},
},
...
...
ee/spec/frontend/design_management/components/toolbar/__snapshots__/pagination_spec.js.snap
View file @
2e21443b
...
@@ -7,20 +7,20 @@ exports[`Design management pagination component renders pagination buttons 1`] =
...
@@ -7,20 +7,20 @@ exports[`Design management pagination component renders pagination buttons 1`] =
class="d-flex align-items-center"
class="d-flex align-items-center"
>
>
2
of 2
0
of 2
<div
<div
class="btn-group ml-3"
class="btn-group ml-3"
>
>
<paginationbutton-stub
<paginationbutton-stub
class="js-previous-design"
class="js-previous-design"
design="[object Object]"
iconname="angle-left"
iconname="angle-left"
title="Go to previous design"
title="Go to previous design"
/>
/>
<paginationbutton-stub
<paginationbutton-stub
class="js-next-design"
class="js-next-design"
design="[object Object]"
iconname="angle-right"
iconname="angle-right"
title="Go to next design"
title="Go to next design"
/>
/>
...
...
ee/spec/frontend/design_management/components/toolbar/index_spec.js
View file @
2e21443b
...
@@ -21,7 +21,7 @@ describe('Design management toolbar component', () => {
...
@@ -21,7 +21,7 @@ describe('Design management toolbar component', () => {
vm
=
shallowMount
(
Toolbar
,
{
vm
=
shallowMount
(
Toolbar
,
{
propsData
:
{
propsData
:
{
id
:
1
,
id
:
'
1
'
,
isLoading
,
isLoading
,
name
:
'
test.jpg
'
,
name
:
'
test.jpg
'
,
updatedAt
:
updatedAt
.
toString
(),
updatedAt
:
updatedAt
.
toString
(),
...
...
ee/spec/frontend/design_management/components/toolbar/pagination_button_spec.js
View file @
2e21443b
...
@@ -26,7 +26,7 @@ describe('Design management pagination button component', () => {
...
@@ -26,7 +26,7 @@ describe('Design management pagination button component', () => {
});
});
it
(
'
renders router-link
'
,
()
=>
{
it
(
'
renders router-link
'
,
()
=>
{
createComponent
({
id
:
2
});
createComponent
({
id
:
'
2
'
});
expect
(
vm
.
element
).
toMatchSnapshot
();
expect
(
vm
.
element
).
toMatchSnapshot
();
});
});
...
@@ -39,11 +39,11 @@ describe('Design management pagination button component', () => {
...
@@ -39,11 +39,11 @@ describe('Design management pagination button component', () => {
});
});
it
(
'
returns design link
'
,
()
=>
{
it
(
'
returns design link
'
,
()
=>
{
createComponent
({
id
:
2
});
createComponent
({
id
:
'
2
'
,
filename
:
'
test
'
});
expect
(
vm
.
vm
.
designLink
).
toEqual
({
expect
(
vm
.
vm
.
designLink
).
toEqual
({
name
:
'
design
'
,
name
:
'
design
'
,
params
:
{
id
:
2
},
params
:
{
id
:
'
test
'
},
});
});
});
});
});
});
...
...
ee/spec/frontend/design_management/components/toolbar/pagination_spec.js
View file @
2e21443b
...
@@ -7,7 +7,7 @@ describe('Design management pagination component', () => {
...
@@ -7,7 +7,7 @@ describe('Design management pagination component', () => {
function
createComponent
()
{
function
createComponent
()
{
vm
=
shallowMount
(
Pagination
,
{
vm
=
shallowMount
(
Pagination
,
{
propsData
:
{
propsData
:
{
id
:
2
,
id
:
'
2
'
,
},
},
});
});
}
}
...
@@ -26,7 +26,7 @@ describe('Design management pagination component', () => {
...
@@ -26,7 +26,7 @@ describe('Design management pagination component', () => {
it
(
'
renders pagination buttons
'
,
()
=>
{
it
(
'
renders pagination buttons
'
,
()
=>
{
vm
.
setData
({
vm
.
setData
({
designs
:
[{
id
:
1
},
{
id
:
2
}],
designs
:
[{
id
:
'
1
'
},
{
id
:
'
2
'
}],
});
});
expect
(
vm
.
element
).
toMatchSnapshot
();
expect
(
vm
.
element
).
toMatchSnapshot
();
...
...
ee/spec/frontend/design_management/pages/design/index_spec.js
View file @
2e21443b
...
@@ -14,7 +14,7 @@ describe('Design management design index page', () => {
...
@@ -14,7 +14,7 @@ describe('Design management design index page', () => {
};
};
vm
=
shallowMount
(
DesignIndex
,
{
vm
=
shallowMount
(
DesignIndex
,
{
propsData
:
{
id
:
1
},
propsData
:
{
id
:
'
1
'
},
mocks
:
{
$apollo
},
mocks
:
{
$apollo
},
});
});
}
}
...
...
ee/spec/frontend/design_management/router_spec.js
View file @
2e21443b
...
@@ -65,7 +65,7 @@ describe('Design management router', () => {
...
@@ -65,7 +65,7 @@ describe('Design management router', () => {
const
detail
=
vm
.
find
(
DesignDetail
);
const
detail
=
vm
.
find
(
DesignDetail
);
expect
(
detail
.
exists
()).
toBe
(
true
);
expect
(
detail
.
exists
()).
toBe
(
true
);
expect
(
detail
.
props
(
'
id
'
)).
toEqual
(
1
);
expect
(
detail
.
props
(
'
id
'
)).
toEqual
(
'
1
'
);
});
});
});
});
});
});
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