@rancher/shell 0.1.21 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/assets/styles/global/_button.scss +1 -0
  2. package/assets/translations/en-us.yaml +56 -10
  3. package/assets/translations/zh-hans.yaml +346 -117
  4. package/components/Carousel.vue +25 -9
  5. package/components/HarvesterServiceAddOnConfig.vue +10 -10
  6. package/components/Import.vue +7 -1
  7. package/components/ResourceList/index.vue +34 -14
  8. package/components/ResourceTable.vue +19 -0
  9. package/components/SortableTable/THead.vue +311 -70
  10. package/components/SortableTable/advanced-filtering.js +272 -0
  11. package/components/SortableTable/filtering.js +90 -29
  12. package/components/SortableTable/index.vue +480 -271
  13. package/components/form/MatchExpressions.vue +15 -3
  14. package/components/form/WorkloadPorts.vue +2 -2
  15. package/components/nav/Header.vue +14 -1
  16. package/config/product/settings.js +1 -0
  17. package/config/product/uiplugins.js +1 -0
  18. package/config/uiplugins.js +13 -0
  19. package/creators/app/init +2 -2
  20. package/creators/app/package.json +1 -1
  21. package/creators/pkg/package.json +1 -1
  22. package/detail/cis.cattle.io.clusterscan.vue +6 -2
  23. package/detail/provisioning.cattle.io.cluster.vue +3 -3
  24. package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +0 -1
  25. package/edit/provisioning.cattle.io.cluster/MachinePool.vue +5 -3
  26. package/edit/provisioning.cattle.io.cluster/rke2.vue +25 -24
  27. package/edit/service.vue +1 -1
  28. package/list/node.vue +7 -2
  29. package/mixins/resource-manager.js +5 -0
  30. package/models/cluster.x-k8s.io.machinedeployment.js +8 -0
  31. package/models/management.cattle.io.cluster.js +14 -1
  32. package/nuxt.config.js +113 -108
  33. package/package.json +1 -1
  34. package/pages/c/_cluster/apps/charts/index.vue +1 -1
  35. package/pages/c/_cluster/apps/charts/install.vue +106 -32
  36. package/pages/c/_cluster/settings/performance.vue +11 -0
  37. package/pages/c/_cluster/uiplugins/InstallDialog.vue +16 -2
  38. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +5 -2
  39. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +28 -6
  40. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +1 -1
  41. package/pages/c/_cluster/uiplugins/index.vue +49 -12
  42. package/promptRemove/mixin/roleDeletionCheck.js +15 -1
  43. package/scripts/record-deps.js +3 -3
  44. package/scripts/test-plugins-build.sh +1 -0
  45. package/scripts/typegen.sh +2 -2
  46. package/store/type-map.js +13 -2
  47. package/types/vue-shim.d +20 -0
  48. package/utils/create-yaml.js +30 -6
  49. package/creators/update/yarn-error.log +0 -54
  50. package/rancher-components/BadgeState/BadgeState.spec.ts +0 -12
  51. package/rancher-components/BadgeState/BadgeState.vue +0 -107
  52. package/rancher-components/BadgeState/index.ts +0 -1
  53. package/rancher-components/Banner/Banner.test.ts +0 -13
  54. package/rancher-components/Banner/Banner.vue +0 -163
  55. package/rancher-components/Banner/index.ts +0 -1
  56. package/rancher-components/Card/Card.vue +0 -150
  57. package/rancher-components/Card/index.ts +0 -1
  58. package/rancher-components/Form/Checkbox/Checkbox.test.ts +0 -77
  59. package/rancher-components/Form/Checkbox/Checkbox.vue +0 -395
  60. package/rancher-components/Form/Checkbox/index.ts +0 -1
  61. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +0 -29
  62. package/rancher-components/Form/LabeledInput/LabeledInput.vue +0 -343
  63. package/rancher-components/Form/LabeledInput/index.ts +0 -1
  64. package/rancher-components/Form/Radio/RadioButton.vue +0 -270
  65. package/rancher-components/Form/Radio/RadioGroup.vue +0 -235
  66. package/rancher-components/Form/Radio/index.ts +0 -2
  67. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +0 -168
  68. package/rancher-components/Form/TextArea/index.ts +0 -1
  69. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -107
  70. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -137
  71. package/rancher-components/Form/ToggleSwitch/index.ts +0 -1
  72. package/rancher-components/Form/index.ts +0 -5
  73. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +0 -137
  74. package/rancher-components/LabeledTooltip/index.ts +0 -1
  75. package/rancher-components/components/BadgeState/BadgeState.spec.ts +0 -12
  76. package/rancher-components/components/BadgeState/BadgeState.vue +0 -107
  77. package/rancher-components/components/BadgeState/index.ts +0 -1
  78. package/rancher-components/components/Banner/Banner.test.ts +0 -13
  79. package/rancher-components/components/Banner/Banner.vue +0 -163
  80. package/rancher-components/components/Banner/index.ts +0 -1
  81. package/rancher-components/components/Card/Card.vue +0 -150
  82. package/rancher-components/components/Card/index.ts +0 -1
  83. package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +0 -77
  84. package/rancher-components/components/Form/Checkbox/Checkbox.vue +0 -395
  85. package/rancher-components/components/Form/Checkbox/index.ts +0 -1
  86. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +0 -29
  87. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +0 -343
  88. package/rancher-components/components/Form/LabeledInput/index.ts +0 -1
  89. package/rancher-components/components/Form/Radio/RadioButton.vue +0 -270
  90. package/rancher-components/components/Form/Radio/RadioGroup.vue +0 -235
  91. package/rancher-components/components/Form/Radio/index.ts +0 -2
  92. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +0 -168
  93. package/rancher-components/components/Form/TextArea/index.ts +0 -1
  94. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +0 -107
  95. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +0 -137
  96. package/rancher-components/components/Form/ToggleSwitch/index.ts +0 -1
  97. package/rancher-components/components/Form/index.ts +0 -5
  98. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +0 -137
  99. package/rancher-components/components/LabeledTooltip/index.ts +0 -1
@@ -17,6 +17,8 @@ import sorting from './sorting';
17
17
  import paging from './paging';
18
18
  import grouping from './grouping';
19
19
  import actions from './actions';
20
+ import AdvancedFiltering from './advanced-filtering';
21
+ import LabeledSelect from '@shell/components/form/LabeledSelect';
20
22
  // Uncomment for table performance debugging
21
23
  // import tableDebug from './debug';
22
24
 
@@ -53,7 +55,7 @@ export const COLUMN_BREAKPOINTS = {
53
55
  export default {
54
56
  name: 'SortableTable',
55
57
  components: {
56
- THead, Checkbox, AsyncButton, ActionDropdown
58
+ THead, Checkbox, AsyncButton, ActionDropdown, LabeledSelect
57
59
  },
58
60
  mixins: [
59
61
  filtering,
@@ -62,6 +64,7 @@ export default {
62
64
  grouping,
63
65
  selection,
64
66
  actions,
67
+ AdvancedFiltering,
65
68
  // For table performance debugging - uncomment and uncomment the corresponding import
66
69
  // tableDebug,
67
70
  ],
@@ -294,17 +297,17 @@ export default {
294
297
  componentTestid: {
295
298
  type: String,
296
299
  default: 'sortable-table'
297
- }
300
+ },
298
301
  },
299
302
 
300
303
  data() {
301
304
  return {
302
- currentPhase: ASYNC_BUTTON_STATES.WAITING,
303
- expanded: {},
304
- searchQuery: '',
305
- eventualSearchQuery: '',
306
- actionOfInterest: null,
307
- loadingDelay: false,
305
+ currentPhase: ASYNC_BUTTON_STATES.WAITING,
306
+ expanded: {},
307
+ searchQuery: '',
308
+ eventualSearchQuery: '',
309
+ actionOfInterest: null,
310
+ loadingDelay: false,
308
311
  };
309
312
  },
310
313
 
@@ -466,6 +469,13 @@ export default {
466
469
  }
467
470
  }
468
471
 
472
+ // handle cols visibility and filtering if there is advanced filtering
473
+ if (this.hasAdvancedFiltering) {
474
+ const cols = this.handleColsVisibilyAndFiltering(out);
475
+
476
+ return cols;
477
+ }
478
+
469
479
  return out;
470
480
  },
471
481
 
@@ -545,7 +555,7 @@ export default {
545
555
  group.rows.push(rowData);
546
556
 
547
557
  this.columns.forEach((c) => {
548
- const value = c.delayLoading ? undefined : this.valueFor(row, c);
558
+ const value = c.delayLoading ? undefined : this.valueFor(row, c, c.isLabel);
549
559
  let component;
550
560
  let formatted = value;
551
561
  let needRef = false;
@@ -700,11 +710,19 @@ export default {
700
710
  return ucFirst(col.name);
701
711
  },
702
712
 
703
- valueFor(row, col) {
713
+ valueFor(row, col, isLabel) {
704
714
  if (typeof col.value === 'function') {
705
715
  return col.value(row);
706
716
  }
707
717
 
718
+ if (isLabel) {
719
+ if (row.metadata?.labels && row.metadata?.labels[col.label]) {
720
+ return row.metadata?.labels[col.label];
721
+ }
722
+
723
+ return '';
724
+ }
725
+
708
726
  // Use to debug table columns using expensive value getters
709
727
  // console.warn(`Performance: Table valueFor: ${ col.name } ${ col.value }`); // eslint-disable-line no-console
710
728
 
@@ -834,7 +852,11 @@ export default {
834
852
  <div ref="container">
835
853
  <div :class="{'titled': $slots.title && $slots.title.length}" class="sortable-table-header">
836
854
  <slot name="title" />
837
- <div v-if="showHeaderRow" class="fixed-header-actions" :class="{button: !!$slots['header-button']}">
855
+ <div
856
+ v-if="showHeaderRow"
857
+ class="fixed-header-actions"
858
+ :class="{button: !!$slots['header-button'], 'advanced-filtering': hasAdvancedFiltering}"
859
+ >
838
860
  <div :class="bulkActionsClass" class="bulk">
839
861
  <slot name="header-left">
840
862
  <template v-if="tableActions">
@@ -890,21 +912,77 @@ export default {
890
912
  </template>
891
913
  </slot>
892
914
  </div>
893
- <div v-if="isTooManyItemsToAutoUpdate || $slots['header-middle'] && $slots['header-middle'].length" class="middle">
915
+ <div v-if="!hasAdvancedFiltering && ($slots['header-middle'] && $slots['header-middle'].length)" class="middle">
894
916
  <slot name="header-middle" />
917
+ </div>
918
+
919
+ <div v-if="search || hasAdvancedFiltering || isTooManyItemsToAutoUpdate || ($slots['header-right'] && $slots['header-right'].length)" class="search row">
920
+ <ul v-if="hasAdvancedFiltering" class="advanced-filters-applied">
921
+ <li
922
+ v-for="(filter, i) in advancedFilteringValues"
923
+ :key="i"
924
+ >
925
+ <span class="label">{{ `"${filter.value}" ${ t('sortableTable.in') } ${filter.label}` }}</span>
926
+ <span class="cross" @click="clearAdvancedFilter(i)">&#10005;</span>
927
+ <div class="bg"></div>
928
+ </li>
929
+ </ul>
930
+ <slot name="header-right" />
895
931
  <AsyncButton
896
932
  v-if="isTooManyItemsToAutoUpdate"
897
933
  v-tooltip="t('performance.manualRefresh.buttonTooltip')"
934
+ class="manual-refresh"
898
935
  mode="refresh"
899
936
  :current-phase="currentPhase"
900
937
  @click="debouncedRefreshTableData"
901
938
  />
902
- </div>
903
-
904
- <div v-if="search || ($slots['header-right'] && $slots['header-right'].length)" class="search row">
905
- <slot name="header-right" />
939
+ <div v-if="hasAdvancedFiltering" ref="advanced-filter-group" class="advanced-filter-group">
940
+ <button class="btn role-primary" @click="advancedFilteringVisibility = !advancedFilteringVisibility;">
941
+ {{ t('sortableTable.addFilter') }}
942
+ </button>
943
+ <div v-show="advancedFilteringVisibility" class="advanced-filter-container">
944
+ <input
945
+ ref="advancedSearchQuery"
946
+ v-model="advFilterSearchTerm"
947
+ type="search"
948
+ class="advanced-search-box"
949
+ :placeholder="t('sortableTable.filterFor')"
950
+ >
951
+ <div class="middle-block">
952
+ <span>{{ t('sortableTable.in') }}</span>
953
+ <LabeledSelect
954
+ v-model="advFilterSelectedProp"
955
+ class="filter-select"
956
+ :clearable="true"
957
+ :options="advFilterSelectOptions"
958
+ :disabled="false"
959
+ :searchable="false"
960
+ mode="edit"
961
+ :multiple="false"
962
+ :taggable="false"
963
+ :placeholder="t('sortableTable.selectCol')"
964
+ @selecting="(col) => advFilterSelectedLabel = col.label"
965
+ />
966
+ </div>
967
+ <div class="bottom-block">
968
+ <button
969
+ class="btn role-secondary"
970
+ :disabled="!advancedFilteringValues.length"
971
+ @click="clearAllAdvancedFilters"
972
+ >
973
+ {{ t('sortableTable.resetFilters') }}
974
+ </button>
975
+ <button
976
+ class="btn role-primary"
977
+ @click="addAdvancedFilter"
978
+ >
979
+ {{ t('sortableTable.add') }}
980
+ </button>
981
+ </div>
982
+ </div>
983
+ </div>
906
984
  <input
907
- v-if="search"
985
+ v-else-if="search"
908
986
  ref="searchQuery"
909
987
  v-model="eventualSearchQuery"
910
988
  type="search"
@@ -920,7 +998,12 @@ export default {
920
998
  v-if="showHeaders"
921
999
  :label-for="labelFor"
922
1000
  :columns="columns"
1001
+ :group="group"
1002
+ :group-options="advGroupOptions"
1003
+ :has-advanced-filtering="hasAdvancedFiltering"
1004
+ :adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
923
1005
  :table-actions="tableActions"
1006
+ :table-cols-options="columnOptions"
924
1007
  :row-actions="rowActions"
925
1008
  :sub-expand-column="subExpandColumn"
926
1009
  :row-actions-width="rowActionsWidth"
@@ -933,6 +1016,9 @@ export default {
933
1016
  :no-results="noResults"
934
1017
  @on-toggle-all="onToggleAll"
935
1018
  @on-sort-change="changeSort"
1019
+ @col-visibility-change="changeColVisibility"
1020
+ @group-value-change="(val) => $emit('group-value-change', val)"
1021
+ @update-cols-options="updateColsOptions"
936
1022
  />
937
1023
 
938
1024
  <!-- Don't display anything if we're loading and the delay has yet to pass -->
@@ -968,24 +1054,24 @@ export default {
968
1054
  </tr>
969
1055
  </slot>
970
1056
  </tbody>
971
- <tbody v-for="group in displayRows" v-else :key="group.key" :class="{ group: groupBy }">
972
- <slot v-if="groupBy" name="group-row" :group="group" :fullColspan="fullColspan">
1057
+ <tbody v-for="groupedRows in displayRows" v-else :key="groupedRows.key" :class="{ group: groupBy }">
1058
+ <slot v-if="groupBy" name="group-row" :group="groupedRows" :fullColspan="fullColspan">
973
1059
  <tr class="group-row">
974
1060
  <td :colspan="fullColspan">
975
- <slot name="group-by" :group="group.grp">
1061
+ <slot name="group-by" :group="groupedRows.grp">
976
1062
  <div v-trim-whitespace class="group-tab">
977
- {{ group.ref }}
1063
+ {{ groupedRows.ref }}
978
1064
  </div>
979
1065
  </slot>
980
1066
  </td>
981
1067
  </tr>
982
1068
  </slot>
983
- <template v-for="(row, i) in group.rows">
1069
+ <template v-for="(row, i) in groupedRows.rows">
984
1070
  <slot name="main-row" :row="row.row">
985
1071
  <slot :name="'main-row:' + (row.row.mainRowKey || i)" :full-colspan="fullColspan">
986
1072
  <!-- The data-cant-run-bulk-action-of-interest attribute is being used instead of :class because
987
- because our selection.js invokes toggleClass and :class clobbers what was added by toggleClass if
988
- the value of :class changes. -->
1073
+ because our selection.js invokes toggleClass and :class clobbers what was added by toggleClass if
1074
+ the value of :class changes. -->
989
1075
  <tr
990
1076
  :key="row.key"
991
1077
  class="main-row"
@@ -1023,6 +1109,7 @@ export default {
1023
1109
  :rowKey="row.key"
1024
1110
  >
1025
1111
  <td
1112
+ v-show="!hasAdvancedFiltering || (hasAdvancedFiltering && col.col.isColVisible)"
1026
1113
  :key="col.col.name"
1027
1114
  :data-title="col.col.label"
1028
1115
  :data-testid="`sortable-cell-${ i }-${ j }`"
@@ -1098,6 +1185,8 @@ export default {
1098
1185
  :full-colspan="fullColspan"
1099
1186
  :row="row.row"
1100
1187
  :sub-matches="subMatches"
1188
+ :onRowMouseEnter="onRowMouseEnter"
1189
+ :onRowMouseLeave="onRowMouseLeave"
1101
1190
  >
1102
1191
  <tr
1103
1192
  v-if="row.row.stateDescription"
@@ -1165,7 +1254,118 @@ export default {
1165
1254
  </div>
1166
1255
  </template>
1167
1256
 
1168
- <style lang="scss" scoped>
1257
+ <style lang="scss" scoped>
1258
+
1259
+ .manual-refresh {
1260
+ height: 40px;
1261
+ }
1262
+ .advanced-filter-group {
1263
+ position: relative;
1264
+ margin-left: 10px;
1265
+ .advanced-filter-container {
1266
+ position: absolute;
1267
+ top: 38px;
1268
+ right: 0;
1269
+ width: 300px;
1270
+ border: 1px solid var(--primary);
1271
+ background-color: var(--body-bg);
1272
+ padding: 20px;
1273
+ z-index: 2;
1274
+
1275
+ .middle-block {
1276
+ display: flex;
1277
+ align-items: center;
1278
+ margin-top: 20px;
1279
+
1280
+ span {
1281
+ margin-right: 20px;
1282
+ }
1283
+
1284
+ button {
1285
+ margin-left: 20px;
1286
+ }
1287
+ }
1288
+
1289
+ .bottom-block {
1290
+ display: flex;
1291
+ align-items: center;
1292
+ margin-top: 40px;
1293
+ justify-content: space-between;
1294
+ }
1295
+ }
1296
+ }
1297
+
1298
+ .advanced-filters-applied {
1299
+ display: inline-flex;
1300
+ margin: 0;
1301
+ padding: 0;
1302
+ list-style: none;
1303
+ max-width: 100%;
1304
+ flex-wrap: wrap;
1305
+ justify-content: flex-end;
1306
+
1307
+ li {
1308
+ margin: 0 20px 10px 0;
1309
+ padding: 2px 5px;
1310
+ border: 1px solid;
1311
+ display: flex;
1312
+ align-items: center;
1313
+ position: relative;
1314
+
1315
+ &:nth-child(4n+1) {
1316
+ border-color: var(--success);
1317
+
1318
+ .bg {
1319
+ background-color: var(--success);
1320
+ }
1321
+ }
1322
+
1323
+ &:nth-child(4n+2) {
1324
+ border-color: var(--warning);
1325
+
1326
+ .bg {
1327
+ background-color: var(--warning);
1328
+ }
1329
+ }
1330
+
1331
+ &:nth-child(4n+3) {
1332
+ border-color: var(--info);
1333
+
1334
+ .bg {
1335
+ background-color: var(--info);
1336
+ }
1337
+ }
1338
+
1339
+ &:nth-child(4n+4) {
1340
+ border-color: var(--error);
1341
+
1342
+ .bg {
1343
+ background-color: var(--error);
1344
+ }
1345
+ }
1346
+
1347
+ .bg {
1348
+ position: absolute;
1349
+ top: 0;
1350
+ left: 0;
1351
+ width: 100%;
1352
+ height: 100%;
1353
+ opacity: 0.2;
1354
+ z-index: -1;
1355
+ }
1356
+
1357
+ .label {
1358
+ margin-right: 10px;
1359
+ font-size: 11px;
1360
+ }
1361
+ .cross {
1362
+ font-size: 12px;
1363
+ font-weight: bold;
1364
+ cursor: pointer;
1365
+ }
1366
+ }
1367
+ }
1368
+
1169
1369
  // Remove colors from multi-action buttons in the table
1170
1370
  td {
1171
1371
  .actions.role-multi-action {
@@ -1215,332 +1415,341 @@ export default {
1215
1415
 
1216
1416
  .search-box {
1217
1417
  height: 40px;
1418
+ margin-left: 10px;
1419
+ min-width: 180px;
1218
1420
  }
1219
- </style>
1220
-
1221
- <style lang="scss">
1222
- //
1223
- // Important: Almost all selectors in here need to be ">"-ed together so they
1224
- // apply only to the current table, not one nested inside another table.
1225
- //
1226
-
1227
- $group-row-height: 40px;
1228
- $group-separation: 40px;
1229
- $divider-height: 1px;
1230
-
1231
- $separator: 20;
1232
- $remove: 100;
1233
- $spacing: 10px;
1234
-
1235
- .sortable-table {
1236
- border-collapse: collapse;
1237
- min-width: 400px;
1238
- border-radius: 5px 5px 0 0;
1239
- outline: 1px solid var(--border);
1240
- overflow: hidden;
1241
- background: var(--sortable-table-bg);
1242
- border-radius: 4px;
1243
-
1244
- &.overflow-x {
1245
- overflow-x: visible;
1246
- }
1247
- &.overflow-y {
1248
- overflow-y: visible;
1249
- }
1421
+ </style>
1250
1422
 
1251
- td {
1252
- padding: 8px 5px;
1253
- border: 0;
1423
+ <style lang="scss">
1424
+ //
1425
+ // Important: Almost all selectors in here need to be ">"-ed together so they
1426
+ // apply only to the current table, not one nested inside another table.
1427
+ //
1254
1428
 
1255
- &:first-child {
1256
- padding-left: 10px;
1257
- }
1429
+ $group-row-height: 40px;
1430
+ $group-separation: 40px;
1431
+ $divider-height: 1px;
1258
1432
 
1259
- &:last-child {
1260
- padding-right: 10px;
1261
- }
1433
+ $separator: 20;
1434
+ $remove: 100;
1435
+ $spacing: 10px;
1262
1436
 
1263
- &.row-check {
1264
- padding-top: 12px;
1265
- }
1437
+ .filter-select .vs__selected-options .vs__selected {
1438
+ text-align: left;
1266
1439
  }
1267
1440
 
1268
- tbody {
1269
- tr {
1270
- border-bottom: 1px solid var(--sortable-table-top-divider);
1271
- background-color: var(--sortable-table-row-bg);
1272
-
1273
- &.main-row.has-sub-row {
1274
- border-bottom: 0;
1275
- }
1441
+ .sortable-table {
1442
+ border-collapse: collapse;
1443
+ min-width: 400px;
1444
+ border-radius: 5px 5px 0 0;
1445
+ outline: 1px solid var(--border);
1446
+ overflow: hidden;
1447
+ background: var(--sortable-table-bg);
1448
+ border-radius: 4px;
1449
+
1450
+ &.overflow-x {
1451
+ overflow-x: visible;
1452
+ }
1453
+ &.overflow-y {
1454
+ overflow-y: visible;
1455
+ }
1276
1456
 
1277
- // if a main-row is hovered also hover it's sibling sub row. note - the reverse is handled in selection.js
1278
- &.main-row:not(.row-selected):hover + .sub-row {
1279
- background-color: var(--sortable-table-hover-bg);
1280
- }
1457
+ td {
1458
+ padding: 8px 5px;
1459
+ border: 0;
1281
1460
 
1282
- &:last-of-type {
1283
- border-bottom: 0;
1461
+ &:first-child {
1462
+ padding-left: 10px;
1284
1463
  }
1285
1464
 
1286
- &:hover, &.sub-row-hovered {
1287
- background-color: var(--sortable-table-hover-bg);
1465
+ &:last-child {
1466
+ padding-right: 10px;
1288
1467
  }
1289
1468
 
1290
- &.state-description > td {
1291
- font-size: 13px;
1292
- padding-top: 0;
1293
- overflow-wrap: anywhere;
1469
+ &.row-check {
1470
+ padding-top: 12px;
1294
1471
  }
1295
1472
  }
1296
1473
 
1297
- tr.active-row {
1298
- color: var(--sortable-table-header-bg);
1299
- }
1474
+ tbody {
1475
+ tr {
1476
+ border-bottom: 1px solid var(--sortable-table-top-divider);
1477
+ background-color: var(--sortable-table-row-bg);
1300
1478
 
1301
- tr.row-selected {
1302
- background: var(--sortable-table-selected-bg);
1303
- }
1479
+ &.main-row.has-sub-row {
1480
+ border-bottom: 0;
1481
+ }
1304
1482
 
1305
- .no-rows {
1306
- td {
1307
- padding: 30px 0;
1308
- text-align: center;
1483
+ // if a main-row is hovered also hover it's sibling sub row. note - the reverse is handled in selection.js
1484
+ &.main-row:not(.row-selected):hover + .sub-row {
1485
+ background-color: var(--sortable-table-hover-bg);
1486
+ }
1487
+
1488
+ &:last-of-type {
1489
+ border-bottom: 0;
1490
+ }
1491
+
1492
+ &:hover, &.sub-row-hovered {
1493
+ background-color: var(--sortable-table-hover-bg);
1494
+ }
1495
+
1496
+ &.state-description > td {
1497
+ font-size: 13px;
1498
+ padding-top: 0;
1499
+ overflow-wrap: anywhere;
1500
+ }
1309
1501
  }
1310
- }
1311
1502
 
1312
- .no-rows, .no-results {
1313
- &:hover {
1314
- background-color: var(--body-bg);
1503
+ tr.active-row {
1504
+ color: var(--sortable-table-header-bg);
1315
1505
  }
1316
- }
1317
1506
 
1318
- &.group {
1319
- &:before {
1320
- content: "";
1321
- display: block;
1322
- height: 20px;
1323
- background-color: transparent;
1507
+ tr.row-selected {
1508
+ background: var(--sortable-table-selected-bg);
1324
1509
  }
1325
- }
1326
1510
 
1327
- tr.group-row {
1328
- background-color: initial;
1511
+ .no-rows {
1512
+ td {
1513
+ padding: 30px 0;
1514
+ text-align: center;
1515
+ }
1516
+ }
1329
1517
 
1330
- &:first-child {
1331
- border-bottom: 2px solid var(--sortable-table-row-bg);
1518
+ .no-rows, .no-results {
1519
+ &:hover {
1520
+ background-color: var(--body-bg);
1521
+ }
1332
1522
  }
1333
1523
 
1334
- &:not(:first-child) {
1335
- margin-top: 20px;
1524
+ &.group {
1525
+ &:before {
1526
+ content: "";
1527
+ display: block;
1528
+ height: 20px;
1529
+ background-color: transparent;
1530
+ }
1336
1531
  }
1337
1532
 
1338
- td {
1339
- padding: 0;
1533
+ tr.group-row {
1534
+ background-color: initial;
1340
1535
 
1341
- &:first-of-type {
1342
- border-left: 1px solid var(--sortable-table-accent-bg);
1536
+ &:first-child {
1537
+ border-bottom: 2px solid var(--sortable-table-row-bg);
1343
1538
  }
1344
- }
1345
1539
 
1346
- .group-tab {
1347
- @include clearfix;
1348
- height: $group-row-height;
1349
- line-height: $group-row-height;
1350
- padding: 0 10px;
1351
- border-radius: 4px 4px 0px 0px;
1352
- background-color: var(--sortable-table-row-bg);
1353
- position: relative;
1354
- top: 1px;
1355
- display: inline-block;
1356
- z-index: z-index('tableGroup');
1357
- min-width: $group-row-height * 1.8;
1358
-
1359
- > SPAN {
1360
- color: var(--sortable-table-group-label);
1540
+ &:not(:first-child) {
1541
+ margin-top: 20px;
1361
1542
  }
1362
- }
1363
1543
 
1364
- .group-tab:after {
1365
- height: $group-row-height;
1366
- width: 70px;
1367
- border-radius: 5px 5px 0px 0px;
1368
- background-color: var(--sortable-table-row-bg);
1369
- content: "";
1370
- position: absolute;
1371
- right: -15px;
1372
- top: 0px;
1373
- transform: skewX(40deg);
1374
- z-index: -1;
1544
+ td {
1545
+ padding: 0;
1546
+
1547
+ &:first-of-type {
1548
+ border-left: 1px solid var(--sortable-table-accent-bg);
1549
+ }
1550
+ }
1551
+
1552
+ .group-tab {
1553
+ @include clearfix;
1554
+ height: $group-row-height;
1555
+ line-height: $group-row-height;
1556
+ padding: 0 10px;
1557
+ border-radius: 4px 4px 0px 0px;
1558
+ background-color: var(--sortable-table-row-bg);
1559
+ position: relative;
1560
+ top: 1px;
1561
+ display: inline-block;
1562
+ z-index: z-index('tableGroup');
1563
+ min-width: $group-row-height * 1.8;
1564
+
1565
+ > SPAN {
1566
+ color: var(--sortable-table-group-label);
1567
+ }
1568
+ }
1569
+
1570
+ .group-tab:after {
1571
+ height: $group-row-height;
1572
+ width: 70px;
1573
+ border-radius: 5px 5px 0px 0px;
1574
+ background-color: var(--sortable-table-row-bg);
1575
+ content: "";
1576
+ position: absolute;
1577
+ right: -15px;
1578
+ top: 0px;
1579
+ transform: skewX(40deg);
1580
+ z-index: -1;
1581
+ }
1375
1582
  }
1376
1583
  }
1377
1584
  }
1378
- }
1379
1585
 
1380
- .for-inputs{
1381
- & TABLE.sortable-table {
1382
- width: 100%;
1383
- border-collapse: collapse;
1384
- margin-bottom: $spacing;
1586
+ .for-inputs{
1587
+ & TABLE.sortable-table {
1588
+ width: 100%;
1589
+ border-collapse: collapse;
1590
+ margin-bottom: $spacing;
1385
1591
 
1386
- >TBODY>TR>TD, >THEAD>TR>TH {
1387
- padding-right: $spacing;
1388
- padding-bottom: $spacing;
1592
+ >TBODY>TR>TD, >THEAD>TR>TH {
1593
+ padding-right: $spacing;
1594
+ padding-bottom: $spacing;
1389
1595
 
1390
- &:last-of-type {
1391
- padding-right: 0;
1596
+ &:last-of-type {
1597
+ padding-right: 0;
1598
+ }
1392
1599
  }
1393
- }
1394
1600
 
1395
- >TBODY>TR:first-of-type>TD {
1396
- padding-top: $spacing;
1397
- }
1601
+ >TBODY>TR:first-of-type>TD {
1602
+ padding-top: $spacing;
1603
+ }
1398
1604
 
1399
- >TBODY>TR:last-of-type>TD {
1400
- padding-bottom: 0;
1605
+ >TBODY>TR:last-of-type>TD {
1606
+ padding-bottom: 0;
1607
+ }
1401
1608
  }
1402
- }
1403
1609
 
1404
- &.edit, &.create, &.clone {
1405
- TABLE.sortable-table>THEAD>TR>TH {
1406
- border-color: transparent;
1610
+ &.edit, &.create, &.clone {
1611
+ TABLE.sortable-table>THEAD>TR>TH {
1612
+ border-color: transparent;
1613
+ }
1407
1614
  }
1408
1615
  }
1409
- }
1410
1616
 
1411
- .sortable-table-header {
1412
- position: relative;
1413
- z-index: z-index('fixedTableHeader');
1617
+ .sortable-table-header {
1618
+ position: relative;
1619
+ z-index: z-index('fixedTableHeader');
1414
1620
 
1415
- &.titled {
1416
- display: flex;
1417
- align-items: center;
1418
- }
1419
- }
1420
- .fixed-header-actions.button{
1421
- grid-template-columns: [bulk] auto [middle] min-content [search] minmax(min-content, 350px);
1422
- }
1423
-
1424
- .fixed-header-actions {
1425
- padding: 0 0 20px 0;
1426
- width: 100%;
1427
- z-index: z-index('fixedTableHeader');
1428
- background: transparent;
1429
- display: grid;
1430
- grid-template-columns: [bulk] auto [middle] min-content [search] minmax(min-content, 200px);
1431
- grid-column-gap: 10px;
1432
-
1433
- .bulk {
1434
- grid-area: bulk;
1435
- margin-top: 1px;
1436
-
1437
- $gap: 10px;
1438
-
1439
- & > BUTTON {
1440
- display: none; // Handled dynamically
1621
+ &.titled {
1622
+ display: flex;
1623
+ align-items: center;
1441
1624
  }
1625
+ }
1626
+ .fixed-header-actions.button{
1627
+ grid-template-columns: [bulk] auto [middle] min-content [search] minmax(min-content, 350px);
1628
+ }
1442
1629
 
1443
- & > BUTTON:not(:last-of-type) {
1444
- margin-right: $gap;
1630
+ .fixed-header-actions {
1631
+ padding: 0 0 20px 0;
1632
+ width: 100%;
1633
+ z-index: z-index('fixedTableHeader');
1634
+ background: transparent;
1635
+ display: grid;
1636
+ grid-template-columns: [bulk] auto [middle] min-content [search] minmax(min-content, 200px);
1637
+ grid-column-gap: 10px;
1638
+
1639
+ &.advanced-filtering {
1640
+ grid-template-columns: [bulk] auto [middle] minmax(min-content, auto) [search] minmax(min-content, auto);
1445
1641
  }
1446
1642
 
1447
- .action-availability {
1448
- display: none; // Handled dynamically
1449
- margin-left: $gap;
1450
- vertical-align: middle;
1451
- margin-top: 2px;
1452
- }
1643
+ .bulk {
1644
+ grid-area: bulk;
1453
1645
 
1454
- .dropdown-button {
1455
- $disabled-color: var(--disabled-text);
1456
- $disabled-cursor: not-allowed;
1457
- li.disabled {
1458
- color: $disabled-color;
1459
- cursor: $disabled-cursor;
1646
+ $gap: 10px;
1460
1647
 
1461
- &:hover {
1648
+ & > BUTTON {
1649
+ display: none; // Handled dynamically
1650
+ }
1651
+
1652
+ & > BUTTON:not(:last-of-type) {
1653
+ margin-right: $gap;
1654
+ }
1655
+
1656
+ .action-availability {
1657
+ display: none; // Handled dynamically
1658
+ margin-left: $gap;
1659
+ vertical-align: middle;
1660
+ margin-top: 2px;
1661
+ }
1662
+
1663
+ .dropdown-button {
1664
+ $disabled-color: var(--disabled-text);
1665
+ $disabled-cursor: not-allowed;
1666
+ li.disabled {
1462
1667
  color: $disabled-color;
1463
- background-color: unset;
1464
1668
  cursor: $disabled-cursor;
1669
+
1670
+ &:hover {
1671
+ color: $disabled-color;
1672
+ background-color: unset;
1673
+ cursor: $disabled-cursor;
1674
+ }
1465
1675
  }
1466
1676
  }
1467
- }
1468
1677
 
1469
- .bulk-action {
1470
- .icon {
1471
- vertical-align: -10%;
1678
+ .bulk-action {
1679
+ .icon {
1680
+ vertical-align: -10%;
1681
+ }
1472
1682
  }
1473
1683
  }
1474
- }
1475
1684
 
1476
- .middle {
1477
- grid-area: middle;
1478
- white-space: nowrap;
1685
+ .middle {
1686
+ grid-area: middle;
1687
+ white-space: nowrap;
1479
1688
 
1480
- .icon.icon-backup.animate {
1481
- animation-name: spin;
1482
- animation-duration: 1000ms;
1483
- animation-iteration-count: infinite;
1484
- animation-timing-function: linear;
1485
- }
1486
-
1487
- @keyframes spin {
1488
- from {
1489
- transform:rotate(0deg);
1689
+ .icon.icon-backup.animate {
1690
+ animation-name: spin;
1691
+ animation-duration: 1000ms;
1692
+ animation-iteration-count: infinite;
1693
+ animation-timing-function: linear;
1490
1694
  }
1491
- to {
1492
- transform:rotate(360deg);
1695
+
1696
+ @keyframes spin {
1697
+ from {
1698
+ transform:rotate(0deg);
1699
+ }
1700
+ to {
1701
+ transform:rotate(360deg);
1702
+ }
1493
1703
  }
1494
1704
  }
1495
- }
1496
1705
 
1497
- .search {
1498
- grid-area: search;
1499
- text-align: right;
1500
- justify-content: flex-end;
1501
- }
1706
+ .search {
1707
+ grid-area: search;
1708
+ text-align: right;
1709
+ justify-content: flex-end;
1710
+ }
1502
1711
 
1503
- .bulk-actions-dropdown {
1504
- display: none; // Handled dynamically
1712
+ .bulk-actions-dropdown {
1713
+ display: none; // Handled dynamically
1505
1714
 
1506
- .dropdown-button {
1507
- background-color: var(--primary);
1715
+ .dropdown-button {
1716
+ background-color: var(--primary);
1508
1717
 
1509
- &:hover {
1510
- background-color: var(--primary-hover-bg);
1511
- color: var(--primary-hover-text);
1512
- }
1718
+ &:hover {
1719
+ background-color: var(--primary-hover-bg);
1720
+ color: var(--primary-hover-text);
1721
+ }
1513
1722
 
1514
- > *, .icon-chevron-down {
1515
- color: var(--primary-text);
1516
- }
1723
+ > *, .icon-chevron-down {
1724
+ color: var(--primary-text);
1725
+ }
1517
1726
 
1518
- .button-divider {
1519
- border-color: var(--primary-text);
1520
- }
1727
+ .button-divider {
1728
+ border-color: var(--primary-text);
1729
+ }
1521
1730
 
1522
- &.disabled {
1523
- border-color: var(--disabled-bg);
1731
+ &.disabled {
1732
+ border-color: var(--disabled-bg);
1524
1733
 
1525
- .icon-chevron-down {
1526
- color: var(--disabled-text) !important;
1527
- }
1734
+ .icon-chevron-down {
1735
+ color: var(--disabled-text) !important;
1736
+ }
1528
1737
 
1529
- .button-divider {
1530
- border-color: var(--disabled-text);
1738
+ .button-divider {
1739
+ border-color: var(--disabled-text);
1740
+ }
1531
1741
  }
1532
1742
  }
1533
1743
  }
1534
1744
  }
1535
- }
1536
1745
 
1537
- .paging {
1538
- margin-top: 10px;
1539
- text-align: center;
1746
+ .paging {
1747
+ margin-top: 10px;
1748
+ text-align: center;
1540
1749
 
1541
- SPAN {
1542
- display: inline-block;
1543
- min-width: 200px;
1750
+ SPAN {
1751
+ display: inline-block;
1752
+ min-width: 200px;
1753
+ }
1544
1754
  }
1545
- }
1546
- </style>
1755
+ </style>