You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ocket8888 (via GitHub)" <gi...@apache.org> on 2023/04/24 22:14:25 UTC
[GitHub] [trafficcontrol] ocket8888 opened a new pull request, #7462: Template linting for TPv2
ocket8888 opened a new pull request, #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462
This adds some linting rules for templates in TPv2. Right now, it's spitting out a bunch of warnings, which might be disabled entirely in the future (each one has an accompanying rationale in the configuration file). It also makes the code compliant with the linting rules. The biggest change is just that all buttons now must have an explicit `type` attribute - even when using the implicit default `submit` type. That helps catch buttons that *shouldn't* be `submit` type, but also buttons incorrectly used as links etc.
<hr/>
## Which Traffic Control components are affected by this PR?
- Traffic Portal (experimental v2)
## What is the best way to verify this PR?
Make sure the code passes the new linting rules (albeit with warnings)
## PR submission checklist
- [x] This PR has tests
- [x] This PR doesn't need documentation
- [x] This PR doesn't need a CHANGELOG.md entry
- [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] rimashah25 commented on a diff in pull request #7462: Template linting for TPv2
Posted by "rimashah25 (via GitHub)" <gi...@apache.org>.
rimashah25 commented on code in PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462#discussion_r1181892108
##########
experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.html:
##########
@@ -189,7 +189,7 @@
</div>
</fieldset>
<div class="buttons">
Review Comment:
submit button isn't working.
##########
experimental/traffic-portal/src/app/core/servers/phys-loc/table/phys-loc-table.component.html:
##########
@@ -26,4 +26,4 @@
</tp-generic-table>
</mat-card>
Review Comment:
there isn't a link on physical location page to create division.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #7462: Template linting for TPv2
Posted by "ocket8888 (via GitHub)" <gi...@apache.org>.
ocket8888 commented on code in PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462#discussion_r1182764065
##########
experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.html:
##########
@@ -189,7 +189,7 @@
</div>
</fieldset>
<div class="buttons">
Review Comment:
Submit button _"works"_ just fine, problem is the controller has no handler for editing servers. It only creates them; which is a bug not caused by this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] rimashah25 merged pull request #7462: Template linting for TPv2
Posted by "rimashah25 (via GitHub)" <gi...@apache.org>.
rimashah25 merged PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] rimashah25 commented on a diff in pull request #7462: Template linting for TPv2
Posted by "rimashah25 (via GitHub)" <gi...@apache.org>.
rimashah25 commented on code in PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462#discussion_r1176724090
##########
experimental/traffic-portal/src/app/login/reset-password-dialog/reset-password-dialog.component.html:
##########
@@ -21,6 +21,6 @@ <h1 mat-dialog-title>Reset Password</h1>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-raised-button color="warn" type="button" mat-dialog-close>Cancel</button>
- <button mat-raised-button color="primary">Submit</button>
+ <button mat-raised-button color="primary" type="submit">Submit</button>
Review Comment:
Why extra space?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] rimashah25 commented on a diff in pull request #7462: Template linting for TPv2
Posted by "rimashah25 (via GitHub)" <gi...@apache.org>.
rimashah25 commented on code in PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462#discussion_r1183879060
##########
experimental/traffic-portal/src/app/core/servers/server-details/server-details.component.html:
##########
@@ -189,7 +189,7 @@
</div>
</fieldset>
<div class="buttons">
Review Comment:
Ok, creating an [issue](https://github.com/apache/trafficcontrol/issues/7485) for the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] codecov[bot] commented on pull request #7462: Template linting for TPv2
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462#issuecomment-1520903043
## [Codecov](https://codecov.io/gh/apache/trafficcontrol/pull/7462?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#7462](https://codecov.io/gh/apache/trafficcontrol/pull/7462?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9da10a4) into [master](https://codecov.io/gh/apache/trafficcontrol/commit/664c2d57483bc426cf59b067b76c38820dd8fc8e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (664c2d5) will **increase** coverage by `31.92%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #7462 +/- ##
=============================================
+ Coverage 29.23% 61.16% +31.92%
Complexity 98 98
=============================================
Files 782 303 -479
Lines 81860 11586 -70274
Branches 784 786 +2
=============================================
- Hits 23932 7086 -16846
+ Misses 55871 4154 -51717
+ Partials 2057 346 -1711
```
| Flag | Coverage Δ | |
|---|---|---|
| golib_unit | `?` | |
| grove_unit | `?` | |
| t3c_unit | `?` | |
| traffic_monitor_unit | `?` | |
| traffic_ops_unit | `?` | |
| traffic_portal_v2 | `64.49% <100.00%> (+0.04%)` | :arrow_up: |
| traffic_stats_unit | `?` | |
| unit_tests | `64.49% <100.00%> (+38.29%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/trafficcontrol/pull/7462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../src/app/core/currentuser/currentuser.component.ts](https://codecov.io/gh/apache/trafficcontrol/pull/7462?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXhwZXJpbWVudGFsL3RyYWZmaWMtcG9ydGFsL3NyYy9hcHAvY29yZS9jdXJyZW50dXNlci9jdXJyZW50dXNlci5jb21wb25lbnQudHM=) | `96.92% <100.00%> (+0.25%)` | :arrow_up: |
... and [480 files with indirect coverage changes](https://codecov.io/gh/apache/trafficcontrol/pull/7462/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #7462: Template linting for TPv2
Posted by "ocket8888 (via GitHub)" <gi...@apache.org>.
ocket8888 commented on code in PR #7462:
URL: https://github.com/apache/trafficcontrol/pull/7462#discussion_r1176767807
##########
experimental/traffic-portal/src/app/login/reset-password-dialog/reset-password-dialog.component.html:
##########
@@ -21,6 +21,6 @@ <h1 mat-dialog-title>Reset Password</h1>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-raised-button color="warn" type="button" mat-dialog-close>Cancel</button>
- <button mat-raised-button color="primary">Submit</button>
+ <button mat-raised-button color="primary" type="submit">Submit</button>
Review Comment:
mistake
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org