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

feat: create ng-ovh-chart component #11356

Merged
merged 1 commit into from
May 23, 2024

Conversation

lizardK
Copy link
Contributor

@lizardK lizardK commented Apr 3, 2024

Question Answer
Branch? master
Bug fix? no
New feature? no
Breaking change? yes
Tickets MANAGER-14137
License BSD 3-Clause
  • Try to keep pull requests small so they can be easily reviewed.
  • Commits are signed-off
  • Only FR translations have been updated
  • Branch is up-to-date with target branch
  • Lint has passed locally
  • Standalone app was ran and tested locally
  • Ticket reference is mentioned in linked commits (internal only)
  • Breaking change is mentioned in relevant commits

Description

Create ng-ovh-chart component based on chart.js latest version.

Related

Copy link
Contributor

github-actions bot commented Apr 3, 2024

yarn.lock changes

Click to toggle table visibility
Name Status Previous Current
@kurkle/color ADDED - 0.3.2
angular-chart.js REMOVED 1.1.1 -
c8 ADDED - 9.1.0
chart.js UPDATED 2.9.4 4.4.2
chartjs-adapter-date-fns ADDED - 3.0.0
chartjs-color REMOVED 2.4.1 -
chartjs-color-string REMOVED 0.6.0 -
chartjs-plugin-zoom UPDATED 0.6.6 2.0.1

@github-actions github-actions bot added the has conflicts Has conflicts to resolve before merging label Apr 4, 2024
@github-actions github-actions bot removed the has conflicts Has conflicts to resolve before merging label Apr 16, 2024
) {
this.options.scales.yAxes[0].scaleLabel.labelString = label;
}
this.options.scales.y.title.text = label;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.options.scales.y.title.text = label;
if(!this.options.scales.y.title) {
his.options.scales.y.title = { display: true };
}
this.options.scales.y.title.text = label;

netInterface.device ? netInterface.device : netInterface.name,
);

this.kpiInterfaces = devices.networkInterfaces;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.kpiInterfaces = devices.networkInterfaces;
this.kpiInterfaces = devices.networkInterfaces
.filter((netInterface) => netInterface.gateway != null)
.map((netInterface) =>
netInterface.device ? netInterface.device : netInterface.name,
);

This chart doesn't work if you apply this change. Because the this.kpiInterfaces should be an array not an array of object

for const filteredDown = inStats.filter(
(d) => this.kpiInterfaces.indexOf(d.tags.interface) > -1,
);

and same for upload

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ghyenne
ghyenne previously approved these changes Apr 24, 2024
qpavy
qpavy previously approved these changes Apr 24, 2024
jperchoc
jperchoc previously approved these changes Apr 25, 2024
anooparveti
anooparveti previously approved these changes Apr 29, 2024
@github-actions github-actions bot added the has conflicts Has conflicts to resolve before merging label Apr 29, 2024
Signed-off-by: cyril.biencourt <cyril.biencourt@corp.ovh.com>
@lizardK lizardK dismissed stale reviews from anooparveti, jperchoc, qpavy, and ghyenne via 94d57bc May 13, 2024 15:44
@github-actions github-actions bot removed the has conflicts Has conflicts to resolve before merging label May 13, 2024
Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
8.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@ghyenne ghyenne changed the base branch from master to release/components-w22 May 23, 2024 15:59
@ghyenne ghyenne merged commit dde7809 into release/components-w22 May 23, 2024
14 of 15 checks passed
@ghyenne ghyenne deleted the feat/refacto-charts branch May 23, 2024 15:59
@ghyenne ghyenne mentioned this pull request May 23, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants