-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
Pull Request Test Coverage Report for Build 1086
💛 - Coveralls |
count: null, | ||
}; | ||
|
||
const mapDiskToProps = disks => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapDisks or diskStats?
const STATUS_RESULT_ERROR = 'error'; | ||
|
||
const result = { | ||
[STATUS_RESULT_OK]: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can import these constants from dashboard
if (cephOsdUpCount || cephOsdDownCount) { | ||
result[STATUS_RESULT_OK] = cephOsdUpCount; | ||
result[STATUS_RESULT_ERROR] = cephOsdDownCount; | ||
result.count = result[STATUS_RESULT_OK] + result[STATUS_RESULT_ERROR]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather result.count = cephOsdUpCount + cephOsdDownCount
?
|
||
export default [ | ||
{ | ||
component: DiskInventoryUtils, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DiskInventoryUtils is not a component. please delete this file
@@ -0,0 +1,26 @@ | |||
import { get } from 'lodash'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename this file to diskInventoryUtils
. Only component files start with an uppercase.
import { Inventory } from '../Inventory'; | ||
import { default as InventoryFixtures } from '../fixtures/Inventory.fixture'; | ||
|
||
const testInventoryOverview = () => <Inventory {...InventoryFixtures[0].props} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a test for DiskInventoryUtils
but for an Inventory
component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, sorry! Stupid mistake :/
@suomiy Updated the PR please have a look |
import { getCapacityStats } from '../../../selectors'; | ||
import { STATUS_RESULT_OK, STATUS_RESULT_ERROR } from '../../Dashboard/Inventory/utils'; | ||
|
||
const result = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put this inside the function. There is no reason to have it outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack!
<React.Fragment> | ||
<InventoryRow title="Nodes" {...mapNodesToProps(nodes)} /> | ||
<InventoryRow title="Disks" {...diskStatsToProps(disks)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure here, but please be consistent. Can we rename the prop to diskStats
when we have a function diskStatsToProps
? Or the other way around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack!
No description provided.