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
7e55ac02
Commit
7e55ac02
authored
Jul 26, 2018
by
Winnie Hellmann
Committed by
Phil Hughes
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix timing in geo_nodes/components/app_spec.js
parent
8f693d3c
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
184 additions
and
132 deletions
+184
-132
ee/app/assets/javascripts/geo_nodes/components/app.vue
ee/app/assets/javascripts/geo_nodes/components/app.vue
+9
-22
ee/spec/javascripts/geo_nodes/components/app_spec.js
ee/spec/javascripts/geo_nodes/components/app_spec.js
+175
-110
No files found.
ee/app/assets/javascripts/geo_nodes/components/app.vue
View file @
7e55ac02
...
@@ -83,7 +83,7 @@ export default {
...
@@ -83,7 +83,7 @@ export default {
});
});
},
},
fetchGeoNodes
()
{
fetchGeoNodes
()
{
this
.
service
return
this
.
service
.
getGeoNodes
()
.
getGeoNodes
()
.
then
(
res
=>
res
.
data
)
.
then
(
res
=>
res
.
data
)
.
then
(
nodes
=>
{
.
then
(
nodes
=>
{
...
@@ -92,9 +92,7 @@ export default {
...
@@ -92,9 +92,7 @@ export default {
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
isLoading
=
false
;
this
.
isLoading
=
false
;
Flash
(
Flash
(
s__
(
'
GeoNodes|Something went wrong while fetching nodes
'
));
s__
(
'
GeoNodes|Something went wrong while fetching nodes
'
),
);
});
});
},
},
fetchNodeDetails
(
node
)
{
fetchNodeDetails
(
node
)
{
...
@@ -109,10 +107,7 @@ export default {
...
@@ -109,10 +107,7 @@ export default {
primaryRevision
:
primaryNodeVersion
.
revision
,
primaryRevision
:
primaryNodeVersion
.
revision
,
});
});
this
.
store
.
setNodeDetails
(
nodeId
,
updatedNodeDetails
);
this
.
store
.
setNodeDetails
(
nodeId
,
updatedNodeDetails
);
eventHub
.
$emit
(
eventHub
.
$emit
(
'
nodeDetailsLoaded
'
,
this
.
store
.
getNodeDetails
(
nodeId
));
'
nodeDetailsLoaded
'
,
this
.
store
.
getNodeDetails
(
nodeId
),
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
if
(
err
.
response
&&
err
.
response
.
data
)
{
if
(
err
.
response
&&
err
.
response
.
data
)
{
...
@@ -124,10 +119,7 @@ export default {
...
@@ -124,10 +119,7 @@ export default {
sync_status_unavailable
:
true
,
sync_status_unavailable
:
true
,
storage_shards_match
:
null
,
storage_shards_match
:
null
,
});
});
eventHub
.
$emit
(
eventHub
.
$emit
(
'
nodeDetailsLoaded
'
,
this
.
store
.
getNodeDetails
(
nodeId
));
'
nodeDetailsLoaded
'
,
this
.
store
.
getNodeDetails
(
nodeId
),
);
}
else
{
}
else
{
eventHub
.
$emit
(
'
nodeDetailsLoadFailed
'
,
nodeId
,
err
);
eventHub
.
$emit
(
'
nodeDetailsLoadFailed
'
,
nodeId
,
err
);
}
}
...
@@ -135,14 +127,11 @@ export default {
...
@@ -135,14 +127,11 @@ export default {
},
},
repairNode
(
targetNode
)
{
repairNode
(
targetNode
)
{
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
service
return
this
.
service
.
repairNode
(
targetNode
)
.
repairNode
(
targetNode
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
setNodeActionStatus
(
targetNode
,
false
);
this
.
setNodeActionStatus
(
targetNode
,
false
);
Flash
(
Flash
(
s__
(
'
GeoNodes|Node Authentication was successfully repaired.
'
),
'
notice
'
);
s__
(
'
GeoNodes|Node Authentication was successfully repaired.
'
),
'
notice
'
,
);
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
setNodeActionStatus
(
targetNode
,
false
);
this
.
setNodeActionStatus
(
targetNode
,
false
);
...
@@ -151,7 +140,7 @@ export default {
...
@@ -151,7 +140,7 @@ export default {
},
},
toggleNode
(
targetNode
)
{
toggleNode
(
targetNode
)
{
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
service
return
this
.
service
.
toggleNode
(
targetNode
)
.
toggleNode
(
targetNode
)
.
then
(
res
=>
res
.
data
)
.
then
(
res
=>
res
.
data
)
.
then
(
node
=>
{
.
then
(
node
=>
{
...
@@ -162,14 +151,12 @@ export default {
...
@@ -162,14 +151,12 @@ export default {
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
setNodeActionStatus
(
targetNode
,
false
);
this
.
setNodeActionStatus
(
targetNode
,
false
);
Flash
(
Flash
(
s__
(
'
GeoNodes|Something went wrong while changing node status
'
));
s__
(
'
GeoNodes|Something went wrong while changing node status
'
),
);
});
});
},
},
removeNode
(
targetNode
)
{
removeNode
(
targetNode
)
{
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
setNodeActionStatus
(
targetNode
,
true
);
this
.
service
return
this
.
service
.
removeNode
(
targetNode
)
.
removeNode
(
targetNode
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
store
.
removeNode
(
targetNode
);
this
.
store
.
removeNode
(
targetNode
);
...
...
ee/spec/javascripts/geo_nodes/components/app_spec.js
View file @
7e55ac02
This diff is collapsed.
Click to expand it.
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