Skip to content

Commit

Permalink
Merge pull request #3692 from dlabrecq/tag-mapping-wizard-expand-table
Browse files Browse the repository at this point in the history
Tag mapping expandable table
  • Loading branch information
dlabrecq authored Mar 10, 2024
2 parents 6cdfd5c + d888681 commit e257c1d
Show file tree
Hide file tree
Showing 38 changed files with 1,134 additions and 125 deletions.
128 changes: 128 additions & 0 deletions locales/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -7100,6 +7100,30 @@
"value": "Input for tag name"
}
]
},
"tag_key": {
"value": [
{
"type": 0,
"value": "Input for tag key"
}
]
},
"tag_key_child": {
"value": [
{
"type": 0,
"value": "Input for child tag key"
}
]
},
"tag_key_parent": {
"value": [
{
"type": 0,
"value": "Input for parent tag key"
}
]
}
},
"type": 5,
Expand Down Expand Up @@ -7316,6 +7340,22 @@
}
]
},
"tag_key_child": {
"value": [
{
"type": 0,
"value": "Filter by child tag key"
}
]
},
"tag_key_parent": {
"value": [
{
"type": 0,
"value": "Filter by parent tag key"
}
]
},
"workload": {
"value": [
{
Expand Down Expand Up @@ -7559,6 +7599,22 @@
}
]
},
"tag_key_child": {
"value": [
{
"type": 0,
"value": "Child tag Key"
}
]
},
"tag_key_parent": {
"value": [
{
"type": 0,
"value": "Parent tag Key"
}
]
},
"workload": {
"value": [
{
Expand Down Expand Up @@ -11581,6 +11637,42 @@
"settingsSuccessTags": [
{
"options": {
"add": {
"value": [
{
"offset": 0,
"options": {
"one": {
"value": [
{
"type": 1,
"value": "count"
},
{
"type": 0,
"value": " tag key added"
}
]
},
"other": {
"value": [
{
"type": 1,
"value": "count"
},
{
"type": 0,
"value": " tag key added"
}
]
}
},
"pluralType": "cardinal",
"type": 6,
"value": "count"
}
]
},
"disable": {
"value": [
{
Expand Down Expand Up @@ -11655,6 +11747,42 @@
},
"other": {
"value": []
},
"remove": {
"value": [
{
"offset": 0,
"options": {
"one": {
"value": [
{
"type": 1,
"value": "count"
},
{
"type": 0,
"value": " tag key removed"
}
]
},
"other": {
"value": [
{
"type": 1,
"value": "count"
},
{
"type": 0,
"value": " tag key removed"
}
]
}
},
"pluralType": "cardinal",
"type": 6,
"value": "count"
}
]
}
},
"type": 5,
Expand Down
8 changes: 4 additions & 4 deletions locales/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,15 @@
"filterByCostCategoryKeyAriaLabel": "Cost category keys",
"filterByCostCategoryValueAriaLabel": "Cost category values",
"filterByCostCategoryValueButtonAriaLabel": "Filter button for cost category value",
"filterByInputAriaLabel": "{value, select, account {Input for account name} aws_category {Input for cost category name} cluster {Input for cluster name} gcp_project {Input for GCP project name} name {Input for name} node {Input for node name} org_unit_id {Input for organizational unit name} payer_tenant_id {Input for account name} product_service {Input for service_name} project {Input for project name} region {Input for region name} resource_location {Input for region name} service {Input for service name} service_name {Input for service_name} subscription_guid {Input for account name} status {Input for status value} tag {Input for tag name} other {}}",
"filterByInputAriaLabel": "{value, select, account {Input for account name} aws_category {Input for cost category name} cluster {Input for cluster name} gcp_project {Input for GCP project name} name {Input for name} node {Input for node name} org_unit_id {Input for organizational unit name} payer_tenant_id {Input for account name} product_service {Input for service_name} project {Input for project name} region {Input for region name} resource_location {Input for region name} service {Input for service name} service_name {Input for service_name} subscription_guid {Input for account name} status {Input for status value} tag {Input for tag name} tag_key {Input for tag key} tag_key_child {Input for child tag key} tag_key_parent {Input for parent tag key} other {}}",
"filterByOrgUnitAriaLabel": "Organizational units",
"filterByOrgUnitPlaceholder": "Choose unit",
"filterByPlaceholder": "{value, select, account {Filter by account} aws_category {Filter by cost category} cluster {Filter by cluster} container {Filter by container} description {Filter by description} gcp_project {Filter by GCP project} group {Filter by group} name {Filter by name} node {Filter by node} org_unit_id {Filter by organizational unit} payer_tenant_id {Filter by account} persistent_volume_claim {Filter by persistent volume claim} product_service {Filter by service} project {Filter by project} region {Filter by region} resource_location {Filter by region} service {Filter by service} service_name {Filter by service} source_type {Filter by integration} status {Filter by status} storage_class {Filter by StorageClass} subscription_guid {Filter by account} workload {Filter by workload name} workload_type {Filter by workload type} tag {Filter by tag} tag_key {Filter by tag key} other {}}",
"filterByPlaceholder": "{value, select, account {Filter by account} aws_category {Filter by cost category} cluster {Filter by cluster} container {Filter by container} description {Filter by description} gcp_project {Filter by GCP project} group {Filter by group} name {Filter by name} node {Filter by node} org_unit_id {Filter by organizational unit} payer_tenant_id {Filter by account} persistent_volume_claim {Filter by persistent volume claim} product_service {Filter by service} project {Filter by project} region {Filter by region} resource_location {Filter by region} service {Filter by service} service_name {Filter by service} source_type {Filter by integration} status {Filter by status} storage_class {Filter by StorageClass} subscription_guid {Filter by account} workload {Filter by workload name} workload_type {Filter by workload type} tag {Filter by tag} tag_key {Filter by tag key} tag_key_child {Filter by child tag key} tag_key_parent {Filter by parent tag key} other {}}",
"filterByTagKeyAriaLabel": "Tag keys",
"filterByTagValueAriaLabel": "Tag values",
"filterByTagValueButtonAriaLabel": "Filter button for tag value",
"filterByValuePlaceholder": "Filter by value",
"filterByValues": "{value, select, account {Account} aws_category {Cost category} cluster {Cluster} container {Container} default {Default} gcp_project {GCP project} group {Group} name {Name} node {Node} org_unit_id {Organizational unit} payer_tenant_id {Account} persistent_volume_claim {Persistent volume claim} product_service {Service} project {Project} region {Region} resource_location {Region} service {Service} service_name {Service} source_type {Integration} status {Status} storage_class {StorageClass} subscription_guid {Account} tag {Tag} tag_key {Tag Key} workload {Workload name} workload_type {Workload type} other {}}",
"filterByValues": "{value, select, account {Account} aws_category {Cost category} cluster {Cluster} container {Container} default {Default} gcp_project {GCP project} group {Group} name {Name} node {Node} org_unit_id {Organizational unit} payer_tenant_id {Account} persistent_volume_claim {Persistent volume claim} product_service {Service} project {Project} region {Region} resource_location {Region} service {Service} service_name {Service} source_type {Integration} status {Status} storage_class {StorageClass} subscription_guid {Account} tag {Tag} tag_key {Tag Key} tag_key_child {Child tag Key} tag_key_parent {Parent tag Key} workload {Workload name} workload_type {Workload type} other {}}",
"filterByValuesAriaLabel": "Values",
"forDate": "{value} for {dateRange}",
"gcp": "Google Cloud Platform",
Expand Down Expand Up @@ -518,7 +518,7 @@
"settingsSuccessCostCategories": "{value, select, enable {{count, plural, one {{count} cost category key enabled} other {{count} cost category keys enabled}}} disable {{count, plural, one {{count} cost category key disabled} other {{count} cost category keys disabled}}} other {}}",
"settingsSuccessDesc": "Settings for Cost Management were replaced with new values",
"settingsSuccessPlatformProjects": "{value, select, add {{count, plural, one {{count} projects added to Platform projects} other {{count} project added to Platform projects}}} remove {{count, plural, one {{count} projects removed from Platform projects} other {{count} project removed from Platform projects}}} other {}}",
"settingsSuccessTags": "{value, select, enable {{count, plural, one {{count} tag enabled} other {{count} tags enabled}}} disable {{count, plural, one {{count} tag disabled} other {{count} tags disabled}}} other {}}",
"settingsSuccessTags": "{value, select, add {{count, plural, one {{count} tag key added} other {{count} tag key added}}} enable {{count, plural, one {{count} tag enabled} other {{count} tags enabled}}} disable {{count, plural, one {{count} tag disabled} other {{count} tags disabled}}} remove {{count, plural, one {{count} tag key removed} other {{count} tag key removed}}} other {}}",
"settingsSuccessTitle": "Application settings saved",
"settingsTagsErrorDesc": "You currently have {value} tags enabled",
"settingsTagsErrorTitle": "You can not enable more than {value} tags total",
Expand Down
7 changes: 7 additions & 0 deletions src/locales/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,9 @@ export default defineMessages({
'subscription_guid {Input for account name} ' +
'status {Input for status value} ' +
'tag {Input for tag name} ' +
'tag_key {Input for tag key} ' +
'tag_key_child {Input for child tag key} ' +
'tag_key_parent {Input for parent tag key} ' +
'other {}}',
description: 'Input for {value} name',
id: 'filterByInputAriaLabel',
Expand Down Expand Up @@ -1913,6 +1916,8 @@ export default defineMessages({
'workload_type {Filter by workload type} ' +
'tag {Filter by tag} ' +
'tag_key {Filter by tag key} ' +
'tag_key_child {Filter by child tag key} ' +
'tag_key_parent {Filter by parent tag key} ' +
'other {}}',
description: 'Filter by "value"',
id: 'filterByPlaceholder',
Expand Down Expand Up @@ -1964,6 +1969,8 @@ export default defineMessages({
'subscription_guid {Account} ' +
'tag {Tag} ' +
'tag_key {Tag Key} ' +
'tag_key_child {Child tag Key} ' +
'tag_key_parent {Parent tag Key} ' +
'workload {Workload name} ' +
'workload_type {Workload type} ' +
'other {}}',
Expand Down
3 changes: 3 additions & 0 deletions src/routes/components/dataTable/dataTable.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const styles = {
height: '35vh',
width: '100%',
},
expandableRowBorder: {
border: 0,
},
infoArrow: {
position: 'relative',
},
Expand Down
10 changes: 3 additions & 7 deletions src/routes/components/dataTable/dataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,12 @@ interface DataTableOwnProps {
orderBy: any;
rows?: any[];
selectedItems?: ComputedReportItem[];
variant?: 'checkbox' | 'radio';
}

type DataTableProps = DataTableOwnProps & RouterComponentProps & WrappedComponentProps;

class DataTable extends React.Component<DataTableProps, any> {
constructor(props: DataTableProps) {
super(props);
this.handleOnSelect = this.handleOnSelect.bind(this);
this.handleOnSort = this.handleOnSort.bind(this);
}

private getEmptyState = () => {
const { emptyState, filterBy, intl } = this.props;

Expand Down Expand Up @@ -119,7 +114,7 @@ class DataTable extends React.Component<DataTableProps, any> {
};

public render() {
const { columns, intl, isActionsCell = false, isLoading, isSelectable, rows } = this.props;
const { columns, intl, isActionsCell, isLoading, isSelectable, rows, variant } = this.props;

return (
<>
Expand Down Expand Up @@ -168,6 +163,7 @@ class DataTable extends React.Component<DataTableProps, any> {
isSelected: row.selected,
onSelect: (_evt, isSelected) => this.handleOnSelect(isSelected, rowIndex),
rowIndex,
variant,
}}
style={item.style}
/>
Expand Down
Loading

0 comments on commit e257c1d

Please sign in to comment.