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

TP: adds strikethru for expired certs and red for less than 7 days until expiration #7380

Merged
merged 2 commits into from
Mar 7, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7332](https://github.com/apache/trafficcontrol/pull/7332) *Traffic Ops* Creates new role needed for TR to watch TO resources.
- [#7322](https://github.com/apache/trafficcontrol/issues/7322) *t3c Adds support for anycast on http routed edges.
- [#7367](https://github.com/apache/trafficcontrol/pull/7367) *Traffic Ops* Adds ACME:CREATE, ACME:DELETE, ACME:DELETE, and ACME:READ permissions to operations role.
- [#7380](https://github.com/apache/trafficcontrol/pull/7380) *Traffic Portal* Adds strikethrough (expired), red (7 days until expiration) and yellow (30 days until expiration) visuals to delivery service cert expiration grid rows.

### Changed
- [#7369](https://github.com/apache/trafficcontrol/pull/7369) *Traffic Portal* Adds better labels to routing methods widget on the TP dashboard.
Expand Down
8 changes: 7 additions & 1 deletion traffic_portal/app/src/common/modules/table/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,15 @@ div.dropdown button.menu-item-button {
}
}
.ag-row.expired-cert {
background-color: #fcfcfc;
.ag-cell {
text-decoration: line-through;
}
}
.ag-row.seven-days-until-expired {
background-color: #f8d7da;
}
.ag-row.soon-expired-cert {
.ag-row.thirty-days-until-expired {
background-color: #fff3cd;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ var TableCertExpirationsController = function(certExpirations, $scope, locationU
const now = new Date();
return params.data.expiration < now;
},
'soon-expired-cert': function(params) {
'seven-days-until-expired': function(params) {
const sevenDays = new Date();
sevenDays.setDate(sevenDays.getDate()+7);
return params.data.expiration >= new Date() && params.data.expiration <= sevenDays;
},
'thirty-days-until-expired': function(params) {
const thirtyDays = new Date();
thirtyDays.setDate(thirtyDays.getDate()+30);
return params.data.expiration >= new Date() && params.data.expiration <= thirtyDays;
Expand Down