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

Migrate the monitor page plot to d3 #1826

Merged
merged 8 commits into from
Dec 11, 2023

Conversation

sbelsk
Copy link
Collaborator

@sbelsk sbelsk commented Nov 28, 2023

This PR introduces a d3 template for plotting line graphs of time-series datasets, and converts the monitor page plot from nvd3 to the new template. This change marks the first step of our efforts to migrate to a single plotting/visualization dependency (see #1744). As we migrate more pages to Vue in the future, other plots across the site will also be able to use the new template and expand upon it.

TODO: finalize style and appearance of plot

app/Http/Controllers/MonitorController.php Outdated Show resolved Hide resolved
app/Http/Controllers/MonitorController.php Outdated Show resolved Hide resolved
resources/js/components/Monitor.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
resources/js/components/Monitor.vue Outdated Show resolved Hide resolved
resources/js/components/Monitor.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
* update tooltip text using Vue refs (and refactor its style)
* follow Vue convention for prop name casing
* use Array.forEach function on Monitor page instead of manual for loop
@sbelsk sbelsk marked this pull request as ready for review December 5, 2023 19:11
resources/js/components/Monitor.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
resources/js/components/shared/TimelinePlot.vue Outdated Show resolved Hide resolved
tests/Feature/Monitor.php Outdated Show resolved Hide resolved
@williamjallen williamjallen added this pull request to the merge queue Dec 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2023
@sbelsk sbelsk added this pull request to the merge queue Dec 10, 2023
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2023
According to [the PHPUnit docs for
`assertEquals()`](https://docs.phpunit.de/en/9.6/assertions.html#assertequals),
the first argument to the function should be the expected output, and
the second argument should be the actual value as produced by the test.
Currently, we have multiple places in the codebase where this ordering
of the arguments is not respected. Calling this function with the
arguments swapped can lead to confusion when debugging failed tests, as
PHPUnit's error messages present failed comparisons in terms of an
"expected" and an "actual" value.

The changes in this PR correct the instances where we use the wrong
ordering (except for the file `tests/Feature/Monitor.php` which is being
improved in PR #1826).

There are many other PHPUnit assertion functions that follow this
argument format and are used in our test suites. Future PRs will correct
the cases for those functions where the argument ordering is not
respected as well.

It would also be nice if we could add tools to automatically enforce
this, in order to prevent this from happening in the future and improve
our development experience.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2023
@williamjallen williamjallen added this pull request to the merge queue Dec 11, 2023
@williamjallen
Copy link
Collaborator

#1875 resolved the eslint errors which were blocking this PR, so this should be ready to merge.

Merged via the queue into Kitware:master with commit d0f5372 Dec 11, 2023
2 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Dec 14, 2023
A follow up PR to #1827 and
#1826 that were merged around the
same time, which resulted in this file not being linted.
@sbelsk sbelsk deleted the migrate-monitor-to-d3 branch January 2, 2024 16:21
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.

2 participants