Skip to content
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

UI : node average metrics #3078

Merged
merged 6 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
- Improve error handling when providing invalid CA minion in Bootstrap
configuration file
(PR [#3065](https://github.com/scality/metalk8s/pull/3065))

- [#2925](https://github.com/scality/metalk8s/issues/2925) - Compare node metrics with average from MetalK8s UI
(PR [#3078](https://github.com/scality/metalk8s/pull/3078))

- [#3067](https://github.com/scality/metalk8s/issues/3067) - Check for conflicting
services already started on the machine before doing all the installation
Expand Down
1,138 changes: 564 additions & 574 deletions ui/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"uuid": "3.3.2",
"vega": "^5.17.3",
"vega-embed": "^6.0.0",
"vega-lite": "^4.0.0-beta.10",
"vega-lite": "^4.17.0",
"yup": "0.26.10"
},
"scripts": {
Expand Down
43 changes: 43 additions & 0 deletions ui/src/components/LinechartSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,46 @@ export const yAxisInOut = [
axis: { title: null },
},
];

export const getTooltipConfig = (fields) => {
const tooltipConfigBase = {
transform: [{ pivot: 'type', value: 'y', groupby: ['date'] }],
mark: 'rule',
encoding: {
opacity: {
condition: { value: 1, selection: 'hover' },
value: 0,
},
tooltip: [
{
field: 'date',
type: 'temporal',
axis: {
format: '%d/%m %H:%M',
ticks: true,
tickCount: 4,
labelAngle: -50,
labelColor: '#B5B5B5',
},
title: 'Date',
},
],
color: { legend: null },
},
selection: {
hover: {
type: 'single',
fields: ['date'],
nearest: true,
on: 'mouseover',
empty: 'none',
clear: 'mouseout',
},
},
};

const newFields = [...tooltipConfigBase.encoding.tooltip, ...fields];
const newConfig = Object.assign({}, tooltipConfigBase);
newConfig.encoding.tooltip = newFields;
return newConfig;
};
6 changes: 3 additions & 3 deletions ui/src/components/style/CommonLayoutStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ export const RowGraphContainer = styled.div`
`;

export const GraphTitle = styled.div`
font-size: ${fontSize.small};
font-size: ${fontSize.base};
font-weight: ${fontWeight.bold};
color: ${(props) => props.theme.brand.textSecondary};
padding: ${padding.small} 0 0 ${padding.larger};
color: ${(props) => props.theme.brand.textPrimary};
padding: ${padding.base} 0 0 ${padding.larger};
`;

export const GraphWrapper = styled.div`
Expand Down
Loading