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
238f2081
Commit
238f2081
authored
Jan 23, 2018
by
Kushal Pandya
Committed by
Kushal Pandya
Jan 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `numberToHumanSize` for memory unit conversion
parent
f99be399
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ee/app/assets/javascripts/geo_nodes/components/geo_node_details.vue
...ets/javascripts/geo_nodes/components/geo_node_details.vue
+2
-2
spec/javascripts/geo_nodes/components/geo_node_details_spec.js
...javascripts/geo_nodes/components/geo_node_details_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/geo_nodes/components/geo_node_details.vue
View file @
238f2081
...
...
@@ -2,7 +2,7 @@
/* eslint-disable vue/no-side-effects-in-computed-properties */
import
{
s__
,
__
}
from
'
~/locale
'
;
import
{
parseSeconds
,
stringifyTime
}
from
'
~/lib/utils/pretty_time
'
;
import
{
bytesToMiB
}
from
'
~/lib/utils/number_utils
'
;
import
{
numberToHumanSize
}
from
'
~/lib/utils/number_utils
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
VALUE_TYPE
,
CUSTOM_TYPE
}
from
'
../constants
'
;
...
...
@@ -100,7 +100,7 @@
return
`
${
this
.
nodeDetails
.
version
}
(
${
this
.
nodeDetails
.
revision
}
)`
;
},
replicationSlotWAL
()
{
return
`
${
bytesToMiB
(
this
.
nodeDetails
.
replicationSlotWAL
)}
MB`
;
return
numberToHumanSize
(
this
.
nodeDetails
.
replicationSlotWAL
)
;
},
dbReplicationLag
()
{
// Replication lag can be nil if the secondary isn't actually streaming
...
...
spec/javascripts/geo_nodes/components/geo_node_details_spec.js
View file @
238f2081
...
...
@@ -85,7 +85,7 @@ describe('GeoNodeDetailsComponent', () => {
describe
(
'
replicationSlotWAL
'
,
()
=>
{
it
(
'
returns replication slot WAL in Megabytes
'
,
()
=>
{
expect
(
vm
.
replicationSlotWAL
).
toBe
(
'
0 M
B
'
);
expect
(
vm
.
replicationSlotWAL
).
toBe
(
'
479.37 Mi
B
'
);
});
});
...
...
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