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
01885160
Commit
01885160
authored
Jan 08, 2020
by
Zack Cuddy
Committed by
Paul Slaughter
Jan 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Geo Name to Header
Move Node URL to body
https://gitlab.com/gitlab-org/gitlab/merge_requests/21876
parent
be8259c5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
11 deletions
+45
-11
ee/app/assets/javascripts/geo_nodes/components/geo_node_header.vue
...sets/javascripts/geo_nodes/components/geo_node_header.vue
+1
-1
ee/app/assets/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main.vue
...onents/node_detail_sections/node_details_section_main.vue
+11
-5
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
+2
-1
ee/changelogs/unreleased/11326_01-node-name-on-card.yml
ee/changelogs/unreleased/11326_01-node-name-on-card.yml
+5
-0
ee/spec/javascripts/geo_nodes/components/geo_node_header_spec.js
.../javascripts/geo_nodes/components/geo_node_header_spec.js
+6
-0
ee/spec/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main_spec.js
...ts/node_detail_sections/node_details_section_main_spec.js
+14
-4
ee/spec/javascripts/geo_nodes/mock_data.js
ee/spec/javascripts/geo_nodes/mock_data.js
+3
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/geo_nodes/components/geo_node_header.vue
View file @
01885160
...
@@ -70,7 +70,7 @@ export default {
...
@@ -70,7 +70,7 @@ export default {
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-8 clearfix"
>
<div
class=
"col-md-8 clearfix"
>
<span
class=
"d-flex align-items-center float-left append-right-10"
>
<span
class=
"d-flex align-items-center float-left append-right-10"
>
<strong
class=
"node-url"
>
{{
node
.
url
}}
</strong>
<strong
>
{{
node
.
name
}}
</strong>
<gl-loading-icon
<gl-loading-icon
v-if=
"nodeDetailsLoading || node.nodeActionActive"
v-if=
"nodeDetailsLoading || node.nodeActionActive"
class=
"node-details-loading prepend-left-10 inline"
class=
"node-details-loading prepend-left-10 inline"
...
...
ee/app/assets/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main.vue
View file @
01885160
...
@@ -48,14 +48,20 @@ export default {
...
@@ -48,14 +48,20 @@ export default {
<
template
>
<
template
>
<div
class=
"row-fluid clearfix py-3 primary-section"
>
<div
class=
"row-fluid clearfix py-3 primary-section"
>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
<div>
<div
class=
"d-flex flex-column"
>
<div
class=
"text-secondary-700 node-detail-title"
>
{{
s__
(
'
GeoNodes|GitLab version
'
)
}}
</div>
<span
class=
"text-secondary-700 js-node-url-title"
>
{{
s__
(
'
GeoNodes|Node URL
'
)
}}
</span>
<div
<span
class=
"mt-1 font-weight-bold js-node-url-value"
>
{{
node
.
url
}}
</span>
</div>
<div
class=
"d-flex flex-column mt-2"
>
<span
class=
"text-secondary-700 js-node-version-title"
>
{{
s__
(
'
GeoNodes|GitLab version
'
)
}}
</span>
<span
:class=
"
{ 'text-danger-500': versionMismatch }"
:class=
"
{ 'text-danger-500': versionMismatch }"
class="mt-1 font-weight-bold
node-detail
-value"
class="mt-1 font-weight-bold
js-node-version
-value"
>
>
{{
nodeVersion
}}
{{
nodeVersion
}}
</
div
>
</
span
>
</div>
</div>
<geo-node-health-status
:status=
"nodeHealthStatus"
/>
<geo-node-health-status
:status=
"nodeHealthStatus"
/>
</div>
</div>
...
...
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
View file @
01885160
...
@@ -41,9 +41,10 @@ export default class GeoNodesStore {
...
@@ -41,9 +41,10 @@ export default class GeoNodesStore {
}
}
static
formatNode
(
rawNode
)
{
static
formatNode
(
rawNode
)
{
const
{
id
,
url
,
primary
,
current
,
enabled
}
=
rawNode
;
const
{
id
,
name
,
url
,
primary
,
current
,
enabled
}
=
rawNode
;
return
{
return
{
id
,
id
,
name
,
url
,
url
,
primary
,
primary
,
current
,
current
,
...
...
ee/changelogs/unreleased/11326_01-node-name-on-card.yml
0 → 100644
View file @
01885160
---
title
:
Show Geo node's name in admin page
merge_request
:
21876
author
:
type
:
changed
ee/spec/javascripts/geo_nodes/components/geo_node_header_spec.js
View file @
01885160
...
@@ -92,4 +92,10 @@ describe('GeoNodeHeader', () => {
...
@@ -92,4 +92,10 @@ describe('GeoNodeHeader', () => {
});
});
});
});
});
});
describe
(
'
template
'
,
()
=>
{
it
(
'
renders node name element
'
,
()
=>
{
expect
(
vm
.
$el
.
innerText
).
toContain
(
vm
.
node
.
name
);
});
});
});
});
ee/spec/javascripts/geo_nodes/components/node_detail_sections/node_details_section_main_spec.js
View file @
01885160
...
@@ -4,6 +4,8 @@ import NodeDetailsSectionMainComponent from 'ee/geo_nodes/components/node_detail
...
@@ -4,6 +4,8 @@ import NodeDetailsSectionMainComponent from 'ee/geo_nodes/components/node_detail
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
{
mockNode
,
mockNodeDetails
}
from
'
ee_spec/geo_nodes/mock_data
'
;
import
{
mockNode
,
mockNodeDetails
}
from
'
ee_spec/geo_nodes/mock_data
'
;
const
MOCK_VERSION_TEXT
=
`
${
mockNodeDetails
.
version
}
(
${
mockNodeDetails
.
revision
}
)`
;
const
createComponent
=
({
const
createComponent
=
({
node
=
Object
.
assign
({},
mockNode
),
node
=
Object
.
assign
({},
mockNode
),
nodeDetails
=
Object
.
assign
({},
mockNodeDetails
),
nodeDetails
=
Object
.
assign
({},
mockNodeDetails
),
...
@@ -47,7 +49,7 @@ describe('NodeDetailsSectionMain', () => {
...
@@ -47,7 +49,7 @@ describe('NodeDetailsSectionMain', () => {
});
});
it
(
'
returns version string
'
,
()
=>
{
it
(
'
returns version string
'
,
()
=>
{
expect
(
vm
.
nodeVersion
).
toBe
(
'
10.4.0-pre (b93c51849b)
'
);
expect
(
vm
.
nodeVersion
).
toBe
(
MOCK_VERSION_TEXT
);
});
});
});
});
...
@@ -74,10 +76,18 @@ describe('NodeDetailsSectionMain', () => {
...
@@ -74,10 +76,18 @@ describe('NodeDetailsSectionMain', () => {
expect
(
vm
.
$el
.
classList
.
contains
(
'
primary-section
'
)).
toBe
(
true
);
expect
(
vm
.
$el
.
classList
.
contains
(
'
primary-section
'
)).
toBe
(
true
);
});
});
it
(
'
renders node url element
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-node-url-title
'
).
innerText
.
trim
()).
toBe
(
'
Node URL
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-node-url-value
'
).
innerText
.
trim
()).
toBe
(
vm
.
node
.
url
);
});
it
(
'
renders node version element
'
,
()
=>
{
it
(
'
renders node version element
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.node-detail-title
'
).
innerText
.
trim
()).
toBe
(
'
GitLab version
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-node-version-title
'
).
innerText
.
trim
()).
toBe
(
expect
(
vm
.
$el
.
querySelector
(
'
.node-detail-value
'
).
innerText
.
trim
()).
toBe
(
'
GitLab version
'
,
'
10.4.0-pre (b93c51849b)
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-node-version-value
'
).
innerText
.
trim
()).
toBe
(
MOCK_VERSION_TEXT
,
);
);
});
});
});
});
...
...
ee/spec/javascripts/geo_nodes/mock_data.js
View file @
01885160
...
@@ -8,6 +8,7 @@ export const NODE_DETAILS_PATH = '/admin/geo/nodes';
...
@@ -8,6 +8,7 @@ export const NODE_DETAILS_PATH = '/admin/geo/nodes';
export
const
mockNodes
=
[
export
const
mockNodes
=
[
{
{
id
:
1
,
id
:
1
,
name
:
'
Test Node 1
'
,
url
:
'
http://127.0.0.1:3001/
'
,
url
:
'
http://127.0.0.1:3001/
'
,
primary
:
true
,
primary
:
true
,
enabled
:
true
,
enabled
:
true
,
...
@@ -26,6 +27,7 @@ export const mockNodes = [
...
@@ -26,6 +27,7 @@ export const mockNodes = [
},
},
{
{
id
:
2
,
id
:
2
,
name
:
'
Test Node 2
'
,
url
:
'
http://127.0.0.1:3002/
'
,
url
:
'
http://127.0.0.1:3002/
'
,
primary
:
false
,
primary
:
false
,
enabled
:
true
,
enabled
:
true
,
...
@@ -47,6 +49,7 @@ export const mockNodes = [
...
@@ -47,6 +49,7 @@ export const mockNodes = [
export
const
mockNode
=
{
export
const
mockNode
=
{
id
:
1
,
id
:
1
,
name
:
'
Test Node
'
,
url
:
'
http://127.0.0.1:3001/
'
,
url
:
'
http://127.0.0.1:3001/
'
,
internalUrl
:
'
http://127.0.0.1:3001/
'
,
internalUrl
:
'
http://127.0.0.1:3001/
'
,
primary
:
true
,
primary
:
true
,
...
...
locale/gitlab.pot
View file @
01885160
...
@@ -8288,6 +8288,9 @@ msgstr ""
...
@@ -8288,6 +8288,9 @@ msgstr ""
msgid "GeoNodes|Node Authentication was successfully repaired."
msgid "GeoNodes|Node Authentication was successfully repaired."
msgstr ""
msgstr ""
msgid "GeoNodes|Node URL"
msgstr ""
msgid "GeoNodes|Node was successfully removed."
msgid "GeoNodes|Node was successfully removed."
msgstr ""
msgstr ""
...
...
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