fleet/frontend/components/TableContainer/DataTable/_styles.scss

451 lines
11 KiB
SCSS
Raw Normal View History

2022-12-06 20:58:32 +00:00
$shadow-width: 40px;
$shadow-transition-width: 10px;
.data-table-block {
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
position: relative;
2021-10-18 17:42:54 +00:00
display: inline-block;
width: 100%;
.data-table {
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
&__wrapper {
position: relative;
border: 1px solid $ui-fleet-black-10;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
border-radius: 6px;
2021-10-18 17:42:54 +00:00
flex-grow: 1;
width: 100%;
2022-12-06 20:58:32 +00:00
// Shadow
background-image:
2022-12-06 20:58:32 +00:00
/* Shadows */ linear-gradient(
to right,
white,
$transparent
),
linear-gradient(to left, white, $transparent),
/* Shadow covers */
linear-gradient(to right, $ui-shadow, white $shadow-transition-width),
linear-gradient(to left, $ui-shadow, white $shadow-transition-width);
background-position: left center, right center, left center, right center;
background-repeat: no-repeat;
background-color: white;
background-size: $shadow-width 100%, $shadow-width 100%, 50% 100%,
50% 100%;
/* Opera doesn't support this in the shorthand */
background-attachment: local, local, scroll, scroll;
// End shadow
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
}
// applied to same element as data-table__table while loading
&__no-rows {
min-height: 272px;
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
&__table {
position: relative;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
width: 100%;
border-collapse: collapse;
2025-09-29 17:10:41 +00:00
color: $ui-fleet-black-75;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
font-size: $x-small;
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
tr {
border-bottom: 1px solid $ui-fleet-black-10;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
&:last-child {
border-bottom: 0;
}
// override styles of checkbox data cells
.form-field--checkbox {
display: flex;
justify-content: center;
margin-bottom: 0;
.fleet-checkbox__label {
padding-left: 0;
}
}
// Cleaner when tabbing
a:focus-visible {
outline-offset: 0;
border-radius: $border-radius-medium;
}
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
thead {
2022-12-06 20:58:32 +00:00
background-color: $ui-off-white-opaque; // opaque needed for horizontal scroll shadow
color: $core-fleet-black;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
text-align: left;
border-bottom: 1px solid $ui-fleet-black-10;
// resize header icons
img {
width: 16px;
height: 16px;
vertical-align: top;
}
// do not resize button icons inside headers
.button {
img {
width: initial;
height: initial;
vertical-align: initial;
}
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
th {
padding: 0 $table-cell-padding;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
white-space: nowrap;
border-left: 1px solid $ui-fleet-black-10;
2023-05-23 21:24:01 +00:00
font-weight: $bold;
font-size: $xx-small;
2025-09-29 17:10:41 +00:00
height: 40px; // Match body row height
&:first-child {
border-top-left-radius: 6px;
border-left: none;
}
&.selection__header,
&.active-selection__checkbox {
width: 16px;
2025-09-29 17:10:41 +00:00
padding: 0 $pad-medium;
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
&:last-child {
border-top-right-radius: 6px;
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
}
&.actions__header,
2025-09-29 17:10:41 +00:00
&.id__header // Same as actions__header on some pages
{
border-left: none;
width: 99px;
}
&.linkToFilteredHosts__header,
&.view-all-hosts__header // Same as linkToFilteredHosts__header on some pages
{
border-left: none;
width: 120px;
}
.column-header {
2025-09-29 17:10:41 +00:00
display: flex;
flex-direction: column; // Filters under header name
2025-09-29 17:10:41 +00:00
min-width: max-content;
font-weight: $bold;
2025-09-29 17:10:41 +00:00
span {
display: flex;
align-items: center;
gap: 3px;
}
}
2025-09-29 17:10:41 +00:00
.header-cell {
font-weight: $bold;
}
// Sort arrows change color on hover
.sortable-header {
.column-header {
.header-cell {
min-height: 32px; // Leave room for outline on keyboard focus
}
}
2025-09-29 17:10:41 +00:00
&:hover {
.header-cell:not(.ascending) {
.ascending-arrow {
border-bottom-color: $ui-fleet-black-50;
}
}
.header-cell.ascending {
.descending-arrow {
border-top-color: $ui-fleet-black-50;
}
}
}
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
}
&.active-selection {
background: none;
z-index: 1;
th {
border: 0;
}
.fleet-checkbox {
opacity: 0;
}
.active-selection__container {
background-color: $ui-off-white;
width: 100% !important; // Too much specificity currently at page-level styling. Revisit after data table CSS update to remove !important.
.active-selection__inner {
justify-content: flex-start;
}
}
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
}
.active-selection {
position: absolute;
top: 0px;
width: 100%;
border: 0;
border-radius: 6px;
&__checkbox {
2025-09-29 17:10:41 +00:00
width: 16px;
}
&__container {
padding: 0 $table-cell-padding;
}
&__inner {
display: flex;
justify-content: space-between;
align-items: center;
p {
margin: 0 $pad-medium 0 0;
font-weight: $regular;
span {
font-weight: $bold;
}
}
button {
margin-right: $pad-medium;
}
}
&__inner-left,
&__inner-right {
display: flex;
align-items: center;
}
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
tbody {
.component__tooltip-wrapper {
margin: 10px 0; // vertical padding multiline text with tooltip
}
.component__tooltip-wrapper__element {
white-space: initial; // wraps long text with tooltip
}
tr,
.single-row {
transition: background-color 150ms ease-out;
&:hover {
background-color: $ui-off-white-opaque; // opaque needed for horizontal scroll shadow
}
&:focus-visible {
2025-09-29 17:10:41 +00:00
outline: 2px solid $core-focused-outline;
background: $ui-off-white;
2025-09-29 17:10:41 +00:00
border-radius: $border-radius;
}
}
.single-row {
&:hover {
cursor: pointer;
}
&:active {
background-color: $ui-vibrant-blue-10-opaque; // opaque needed for horizontal scroll shadow
}
}
.clickable-row {
&:hover {
cursor: pointer;
}
}
Feature - add search and sort to host table (#341) * start adding global search filter * update polyfill setup to use async await for react-table * update browerslist to sensible defaults * get global search functionality woring * more progress on the data table * get label network calls working in hostdatatable * get pagination functionality into the HostDataTable * get search query making network call * get ordering making query * make actual sort order network calls * disable cpu column sorting * seperate get table data from get labels * fix issues with input resetting and got search query working * get sort working * ignore vs code editor settings * improve loading spinner to move inside the table * improve styling * add sorting arrows * remove unused sorting arrow component * add host query params to labels endpoint * fix style for query textarea on label hosts * got new pagination working * set server data as source of truth for table global filter * cleanup logs * clean up pagination styles * fix up paginationa and no host styles * add result count to table * remove logs * tweak header styles * fix to sort order * simplify default sort direction * keep sort order of server api responses and use in host table * clean up logs * Add styles for header cell and pagination * fix tests for ManageHostPage * fix tests for HostContainer * fix lower level action reducer and thunk tests * fix tests for hosts client * fix up some host count styling * added back no hosts start message * fix linting errors * remove unused old pagination code * add back scrollToTop utility on pagination * remove unused code in managehostpage test Co-authored-by: Noah Talerman <noahtal@umich.edu>
2021-02-25 12:05:08 +00:00
td {
height: 40px;
padding: 0 $table-cell-padding;
max-width: 500px;
word-wrap: break-word;
implement user table with new table and hook up create and edit and delete users (#587) * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Add styles for rows in user table and action dropdown cell * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Merge in generateClassTag * Refactor table styles * Add newline to DropdownCell style sheet Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> * update checking for admin through global_role in nav * added defaultGloablRole for creat user modal * remove unused comment * fix broken tests * reenabled search for users tests Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
2021-04-09 10:44:57 +00:00
&.actions__cell,
&.id__cell // Same as actions__cell on some pages
{
display: flex;
justify-content: end; // Aligns actions dropdown to right of table
max-width: 99px;
}
&.linkToFilteredHosts__cell,
&.view-all-hosts__cell // Same as linkToFilteredHosts__cell on some pages
{
text-align: right;
max-width: 140px;
// display: flex causes layout issues on /software/vulnerabilities table
2025-09-29 17:10:41 +00:00
align-items: center;
}
&.selection__cell {
width: 0px;
padding: 0 $pad-medium;
}
.link-cell,
.text-cell {
display: block; // inline-block is not vertically centered
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
implement user table with new table and hook up create and edit and delete users (#587) * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Add styles for rows in user table and action dropdown cell * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Merge in generateClassTag * Refactor table styles * Add newline to DropdownCell style sheet Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> * update checking for admin through global_role in nav * added defaultGloablRole for creat user modal * remove unused comment * fix broken tests * reenabled search for users tests Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
2021-04-09 10:44:57 +00:00
margin: 0;
UI: Merge scheduling functionality into queries page (#12713) ## Addresses #12636 ### See issue for list work done ![Screenshot 2023-07-12 at 6 47 04 PM](https://github.com/fleetdm/fleet/assets/61553566/47e3e5b2-0195-4f54-a377-8e5c03313acf) ![Frame-12-07-2023-06-43-32](https://github.com/fleetdm/fleet/assets/61553566/f72f2d41-609f-4409-8595-5f3e4f06d9bb) ### Notes for review: - Because other work is based on this branch, TODOs / fixes are noted here until the team comes to a strategy for merging all of the work: - Add missing space in the Performance impact column "Undetermined" tooltip text - I'm having trouble confirming that the inherited queries table is working right with the mock hard-coded data, though I did see it working correctly previously. There's an issue with the page reverting to "All teams" when trying to show the inherited table, though it does show the table before re-rendering. - This work is organized clearly by commit, so that might be a manageable way to go through this code. - Since the updated API for this work is not yet complete, this work can be manually tested by either: - Using mock API infrastructure, or - in `ManageQueriesPage.tsx`, comment out the two `useQuery` calls and add appropriate mock data. You can then modify any fields of interest to test their related UI functionality. For example, lines 119 -242 might read: ``` // const { // data: curTeamEnhancedQueries, // error: curTeamQueriesError, // isFetching: isFetchingCurTeamQueries, // refetch: refetchCurTeamQueries, // } = useQuery<IListQueriesResponse, Error, IEnhancedQuery[]>( // [{ scope: "queries", teamId: teamIdForApi }], // () => queriesAPI.loadAll(teamIdForApi), // { // refetchOnWindowFocus: false, // enabled: isRouteOk, // select: (data) => data.queries.map(enhanceQuery), // } // ); // // If a team is selected, fetch inherited global queries as well // const { // data: globalEnhancedQueries, // error: globalQueriesError, // isFetching: isFetchingGlobalQueries, // refetch: refetchGlobalQueries, // } = useQuery<IListQueriesResponse, Error, IEnhancedQuery[]>( // [{ scope: "queries", teamId: -1 }], // () => queriesAPI.loadAll(), // { // refetchOnWindowFocus: false, // enabled: isRouteOk && isAnyTeamSelected, // select: (data) => data.queries.map(enhanceQuery), // } // ); const [ curTeamEnhancedQueries, curTeamQueriesError, isFetchingCurTeamQueries, refetchCurTeamQueries, ] = useMemo(() => { return [ [ { created_at: "2023-06-08T15:31:35Z", updated_at: "2023-06-08T15:31:35Z", id: 2, name: "test", description: "", query: "SELECT * FROM osquery_info;", team_id: 43, platform: "darwin", min_osquery_version: "", automations_enabled: true, logging: "snapshot", saved: true, // interval: 300, interval: 0, observer_can_run: false, author_id: 1, author_name: "Jacob", author_email: "jacob@fleetdm.com", packs: [], stats: { // system_time_p50: 1, // system_time_p95: null, // user_time_p50: 1, // user_time_p95: null, // total_executions: 1, }, performance: "Undetermined", platforms: ["darwin"], }, ] as IEnhancedQuery[], undefined, false, () => { console.log("got the new queries"); }, ]; }, []); const [ globalEnhancedQueries, globalQueriesError, isFetchingGlobalQueries, refetchGlobalQueries, ] = useMemo(() => { return [ [ { created_at: "2023-06-08T15:31:35Z", updated_at: "2023-06-08T15:31:35Z", id: 200, name: "test", description: "", query: "SELECT * FROM osquery_info;", team_id: null, platform: "darwin", min_osquery_version: "", automations_enabled: true, logging: "snapshot", saved: true, // interval: 300, interval: 0, observer_can_run: false, author_id: 1, author_name: "Jacob", author_email: "jacob@fleetdm.com", packs: [], stats: { // system_time_p50: 1, // system_time_p95: null, // user_time_p50: 1, // user_time_p95: null, // total_executions: 1, }, performance: "Undetermined", platforms: ["darwin"], }, ] as IEnhancedQuery[], undefined, false, () => { console.log("got the new inherited queries"); }, ]; }, []); ``` - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-07-13 19:11:11 +00:00
.__react_component_tooltip {
white-space: normal;
}
implement user table with new table and hook up create and edit and delete users (#587) * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Add styles for rows in user table and action dropdown cell * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Merge in generateClassTag * Refactor table styles * Add newline to DropdownCell style sheet Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> * update checking for admin through global_role in nav * added defaultGloablRole for creat user modal * remove unused comment * fix broken tests * reenabled search for users tests Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
2021-04-09 10:44:57 +00:00
}
2025-09-29 17:10:41 +00:00
// Caution: LinkCell depends on this to have animation only under text and not icons etc
.link-cell {
2025-09-29 17:10:41 +00:00
display: inline-block; // Underline only words
overflow: visible;
@include link;
2025-09-29 17:10:41 +00:00
&:not(.link-cell--tooltip-truncate) {
@include animated-bottom-border;
}
&.link-cell--tooltip-truncate {
min-width: 100%; // Take up as much of cell as possible
2025-09-29 17:10:41 +00:00
.data-table__tooltip-truncated-text-container {
position: relative;
@include bottom-border;
}
2025-09-29 17:10:41 +00:00
&:hover,
&:focus {
margin-bottom: 0; // Undo margin-bottom of animated bottom border
.data-table__tooltip-truncated-text::after,
.data-table__tooltip-truncated-text::after {
transform: scaleX(1);
}
}
}
&:hover {
.data-table__tooltip-truncated-text-container {
@include animated-bottom-border;
margin-bottom: 0; // Undo margin-bottom of animated bottom border
2025-09-29 17:10:41 +00:00
&:hover {
margin-bottom: 0; // Undo margin-bottom of animated bottom border
}
&::after {
transform: scaleX(
1
); // This gets the animation on the text only when hovering over the whole link-cell
}
}
}
> div {
display: flex;
align-items: center;
gap: $pad-small;
white-space: nowrap;
text-overflow: ellipsis;
}
.truncated-tooltip {
font-weight: $regular;
}
}
// css to properly style link-cell with tooltip
.link-cell-tooltip-wrapper {
overflow: visible; // fixes tooltip overflow cut off by cell
white-space: nowrap; // single line
margin: 0; // padding applied to .link-cell for larger clickable area
.component__tooltip-wrapper {
&__element {
display: block;
white-space: nowrap; // single line
text-overflow: ellipsis; // truncates text
overflow: hidden;
// TODO this naming is now confusing, as this .link-cell is not the outermost layer of
// the cell it's a NameCell
.link-cell {
2023-11-07 21:15:49 +00:00
padding: 0;
}
}
&__tip-text {
cursor: auto;
}
}
}
.w400 {
max-width: 352px; // 400px - 48px padding
min-width: 100%;
text-align: left;
}
.w250 {
max-width: 202px; // 250px - 48px padding
min-width: 100%;
text-align: left;
}
.w150 {
max-width: 102px; // 250px - 48px padding
min-width: 100%;
text-align: left;
implement user table with new table and hook up create and edit and delete users (#587) * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Add styles for rows in user table and action dropdown cell * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Merge in generateClassTag * Refactor table styles * Add newline to DropdownCell style sheet Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> * update checking for admin through global_role in nav * added defaultGloablRole for creat user modal * remove unused comment * fix broken tests * reenabled search for users tests Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
2021-04-09 10:44:57 +00:00
}
.italic-cell {
font-style: italic;
UI: Merge scheduling functionality into queries page (#12713) ## Addresses #12636 ### See issue for list work done ![Screenshot 2023-07-12 at 6 47 04 PM](https://github.com/fleetdm/fleet/assets/61553566/47e3e5b2-0195-4f54-a377-8e5c03313acf) ![Frame-12-07-2023-06-43-32](https://github.com/fleetdm/fleet/assets/61553566/f72f2d41-609f-4409-8595-5f3e4f06d9bb) ### Notes for review: - Because other work is based on this branch, TODOs / fixes are noted here until the team comes to a strategy for merging all of the work: - Add missing space in the Performance impact column "Undetermined" tooltip text - I'm having trouble confirming that the inherited queries table is working right with the mock hard-coded data, though I did see it working correctly previously. There's an issue with the page reverting to "All teams" when trying to show the inherited table, though it does show the table before re-rendering. - This work is organized clearly by commit, so that might be a manageable way to go through this code. - Since the updated API for this work is not yet complete, this work can be manually tested by either: - Using mock API infrastructure, or - in `ManageQueriesPage.tsx`, comment out the two `useQuery` calls and add appropriate mock data. You can then modify any fields of interest to test their related UI functionality. For example, lines 119 -242 might read: ``` // const { // data: curTeamEnhancedQueries, // error: curTeamQueriesError, // isFetching: isFetchingCurTeamQueries, // refetch: refetchCurTeamQueries, // } = useQuery<IListQueriesResponse, Error, IEnhancedQuery[]>( // [{ scope: "queries", teamId: teamIdForApi }], // () => queriesAPI.loadAll(teamIdForApi), // { // refetchOnWindowFocus: false, // enabled: isRouteOk, // select: (data) => data.queries.map(enhanceQuery), // } // ); // // If a team is selected, fetch inherited global queries as well // const { // data: globalEnhancedQueries, // error: globalQueriesError, // isFetching: isFetchingGlobalQueries, // refetch: refetchGlobalQueries, // } = useQuery<IListQueriesResponse, Error, IEnhancedQuery[]>( // [{ scope: "queries", teamId: -1 }], // () => queriesAPI.loadAll(), // { // refetchOnWindowFocus: false, // enabled: isRouteOk && isAnyTeamSelected, // select: (data) => data.queries.map(enhanceQuery), // } // ); const [ curTeamEnhancedQueries, curTeamQueriesError, isFetchingCurTeamQueries, refetchCurTeamQueries, ] = useMemo(() => { return [ [ { created_at: "2023-06-08T15:31:35Z", updated_at: "2023-06-08T15:31:35Z", id: 2, name: "test", description: "", query: "SELECT * FROM osquery_info;", team_id: 43, platform: "darwin", min_osquery_version: "", automations_enabled: true, logging: "snapshot", saved: true, // interval: 300, interval: 0, observer_can_run: false, author_id: 1, author_name: "Jacob", author_email: "jacob@fleetdm.com", packs: [], stats: { // system_time_p50: 1, // system_time_p95: null, // user_time_p50: 1, // user_time_p95: null, // total_executions: 1, }, performance: "Undetermined", platforms: ["darwin"], }, ] as IEnhancedQuery[], undefined, false, () => { console.log("got the new queries"); }, ]; }, []); const [ globalEnhancedQueries, globalQueriesError, isFetchingGlobalQueries, refetchGlobalQueries, ] = useMemo(() => { return [ [ { created_at: "2023-06-08T15:31:35Z", updated_at: "2023-06-08T15:31:35Z", id: 200, name: "test", description: "", query: "SELECT * FROM osquery_info;", team_id: null, platform: "darwin", min_osquery_version: "", automations_enabled: true, logging: "snapshot", saved: true, // interval: 300, interval: 0, observer_can_run: false, author_id: 1, author_name: "Jacob", author_email: "jacob@fleetdm.com", packs: [], stats: { // system_time_p50: 1, // system_time_p95: null, // user_time_p50: 1, // user_time_p95: null, // total_executions: 1, }, performance: "Undetermined", platforms: ["darwin"], }, ] as IEnhancedQuery[], undefined, false, () => { console.log("got the new inherited queries"); }, ]; }, []); ``` - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-07-13 19:11:11 +00:00
.__react_component_tooltip {
font-style: normal;
}
}
.grey-cell {
color: $ui-fleet-black-50;
}
}
2022-12-06 20:58:32 +00:00
.disable-highlight:hover {
background-color: initial;
}
}
2021-10-18 17:42:54 +00:00
}
2021-10-18 17:42:54 +00:00
.loading-overlay {
display: flex;
flex-grow: 1;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(255, 255, 255, 0.8);
z-index: 1;
}
&__footer {
display: flex;
align-items: center;
height: 50px; // Match pagination height as pagination is optionally rendered
}
&__table-help-text {
font-size: $x-small;
display: flex;
align-items: center;
}
}