New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added top consumer to ceph storage plugin #2040
Added top consumer to ceph storage plugin #2040
Conversation
cloudbehl
commented
Jul 16, 2019
•
edited
edited
b6594c0
to
39d66d8
Compare
display: flex; | ||
margin: 0.6em 0em; | ||
} | ||
.ceph-top-consumer-card__dropdown-item { |
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.
add empty line between classes
import * as _ from 'lodash'; | ||
import { ChartLineIcon } from '@patternfly/react-icons'; | ||
import { | ||
ChartGroup, |
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.
alpha (+ all other imports)
return dt.toString().substring(16, 21); | ||
}; | ||
|
||
export const getGraphVectorStats: GetStats = (response, metricType, unit) => { |
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 should use getInstantVectorStats
from graph/utils
. You also dont need to specify GetStats
as it is already in graph/utils
too
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.
@rawagner can't use the getInstantVectorStats as it is for a single value doesn't work when multiple values are being returned.
Also the same for GetStats as in my case multiple PrometheusResponse are being returned and that is returning only one.
|
||
export const getMetricType = (resource, metricType) => _.get(resource, ['metric', metricType], ''); | ||
|
||
export const formatToShortTime = (timestamp: Date): string => { |
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 should use twentyFourHourTime
from utils/datetime
to be consistent with rest of the console
<DashboardCard> | ||
<DashboardCardHeader> | ||
<DashboardCardTitle>Top Consumers</DashboardCardTitle> | ||
<div className="ceph-top-consumer-card__dropdown"> |
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.
height of the card header is inconsistent with others. Take a look at these styles https://github.com/openshift/console/pull/1722/files#diff-163991d4c119db922a729100ce2bea7fR91
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.
sorry, those dropdowns are actually not in header as yours are.
@andybraren @matthewcarleton any help on how to include these dropdowns into PF4 Card Header and keep header height consistent ?
See the difference between Capacity and Top Consumers header
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.
Hey @rawagner I believe you can use the actions area for the card header provided. That should fix the spacing isssues. If not we may need to investigate further if there is unnecessary spacing added to other elements in there.
87d0251
to
4ee5fc5
Compare
b05d010
to
76ac8ee
Compare
/test e2e-aws-console |
/test e2e-aws-console |
/test e2e-aws |
/lgtm |
/lgtm |
Signed-off-by: Ankush Behl <cloudbehl@gmail.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cloudbehl, rawagner The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |