Skip to content

Commit

Permalink
Add initial "tags and labels" content
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq committed May 8, 2023
1 parent 79765f4 commit 92d0fbf
Show file tree
Hide file tree
Showing 9 changed files with 774 additions and 15 deletions.
48 changes: 42 additions & 6 deletions locales/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1488,12 +1488,6 @@
"value": "Sources table"
}
],
"costModelsSourceType": [
{
"type": 0,
"value": "Source type"
}
],
"costModelsTableAriaLabel": [
{
"type": 0,
Expand Down Expand Up @@ -2736,6 +2730,14 @@
}
]
},
"name": {
"value": [
{
"type": 0,
"value": "Name"
}
]
},
"node": {
"value": [
{
Expand Down Expand Up @@ -2811,6 +2813,22 @@
}
]
},
"source_type": {
"value": [
{
"type": 0,
"value": "Source type"
}
]
},
"status": {
"value": [
{
"type": 0,
"value": "Status"
}
]
},
"subscription_guid": {
"value": [
{
Expand Down Expand Up @@ -3256,6 +3274,12 @@
"value": "value"
}
],
"disabled": [
{
"type": 0,
"value": "Disabled"
}
],
"discountMinus": [
{
"type": 0,
Expand Down Expand Up @@ -3482,6 +3506,12 @@
"value": "No match found"
}
],
"enabled": [
{
"type": 0,
"value": "Enabled"
}
],
"end": [
{
"type": 0,
Expand Down Expand Up @@ -11260,6 +11290,12 @@
"value": "dateRange"
}
],
"sourceType": [
{
"type": 0,
"value": "Source type"
}
],
"sources": [
{
"type": 0,
Expand Down
6 changes: 4 additions & 2 deletions locales/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
"costModelsSourceEmptyStateDesc": "Select the source(s) you want to apply this cost model to.",
"costModelsSourceEmptyStateTitle": "No sources are assigned",
"costModelsSourceTableAriaLabel": "Sources table",
"costModelsSourceType": "Source type",
"costModelsTableAriaLabel": "Cost models table",
"costModelsTagRateTableKey": "Tag key",
"costModelsTagRateTableValue": "Tag value",
Expand Down Expand Up @@ -209,7 +208,7 @@
"detailsCostValue": "Cost: {value}",
"detailsEmptyState": "Processing data to generate a list of all services that sums to a total cost...",
"detailsMoreClusters": ", {value} more...",
"detailsResourceNames": "{value, select, account {Account names} aws_category {Cost category names} cluster {Cluster names} gcp_project {GCP project names} node {Node names} org_unit_id {Organizational unit names} payer_tenant_id {Account names} product_service {Service names} project {Project names} region {Region names} resource_location {Region names} service {Service names} service_name {Service names} subscription_guid {Account names} tag {Tag names} other {}}",
"detailsResourceNames": "{value, select, account {Account names} aws_category {Cost category names} cluster {Cluster names} gcp_project {GCP project names} name {Name} node {Node names} org_unit_id {Organizational unit names} payer_tenant_id {Account names} product_service {Service names} project {Project names} region {Region names} resource_location {Region names} service {Service names} service_name {Service names} status {Status} subscription_guid {Account names} source_type {Source type} tag {Tag names} other {}}",
"detailsSummaryModalTitle": "{groupBy, select, account {{name} accounts} aws_category {{name} cost categories} cluster {{name} clusters} gcp_project {{name} GCP projects} node {{name} nodes} org_unit_id {{name} organizational units} payer_tenant_id {{name} accounts} product_service {{name} services} project {{name} projects} region {{name} regions} resource_location {{name} regions} service {{name} services} service_name {{name} services} subscription_guid {{name} accounts} tag {{name} tags} other {}}",
"detailsUnusedRequestsLabel": "Unrequested capacity",
"detailsUnusedUnits": "{units} ({percentage}% of capacity)",
Expand All @@ -219,6 +218,7 @@
"detailsUsageRequests": "Requests - {value} {units}",
"detailsUsageUsage": "Usage - {value} {units}",
"detailsViewAll": "{value, select, account {View all accounts} aws_category {View all cost categories} cluster {View all clusters} gcp_project {View all GCP projects} node {View all nodes} org_unit_id {View all organizational units} payer_tenant_id {View all accounts} product_service {View all services} project {View all projects} region {View all regions} resource_location {View all regions} service {View all Services} service_name {View all services} subscription_guid {View all accounts} tag {View all tags} other {}}",
"disabled": "Disabled",
"discountMinus": "Discount (-)",
"distribute": "Distribute",
"distributeCosts": "{value, select, true {Distribute {type, select, platform {platform} worker {worker} other {}} unallocated capacity}false {Do not distribute {type, select, platform {platform} worker {worker} other {}} unallocated capacity}other {}}",
Expand All @@ -240,6 +240,7 @@
"emptyFilterSourceStateSubtitle": "Sorry, no source with the given filter was found.",
"emptyFilterStateSubtitle": "Sorry, no data with the given filter was found.",
"emptyFilterStateTitle": "No match found",
"enabled": "Enabled",
"end": "End",
"equalsSymbol": "=",
"errorStateNotAuthorizedDesc": "Contact the cost management administrator to provide access to this application",
Expand Down Expand Up @@ -497,6 +498,7 @@
"settingsSuccessTitle": "Application settings saved",
"settingsTitle": "Cost Management Settings",
"sinceDate": "{dateRange}",
"sourceType": "Source type",
"sources": "Sources",
"start": "Start",
"status": "{value, select, pending {Pending} running {Running} failed {Failed} other {}}",
Expand Down
23 changes: 18 additions & 5 deletions src/locales/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,6 @@ export default defineMessages({
description: 'Sources table',
id: 'costModelsSourceTableAriaLabel',
},
costModelsSourceType: {
defaultMessage: 'Source type',
description: 'Source type',
id: 'costModelsSourceType',
},
costModelsTableAriaLabel: {
defaultMessage: 'Cost models table',
description: 'Cost models table',
Expand Down Expand Up @@ -1202,6 +1197,7 @@ export default defineMessages({
'aws_category {Cost category names} ' +
'cluster {Cluster names} ' +
'gcp_project {GCP project names} ' +
'name {Name} ' +
'node {Node names} ' +
'org_unit_id {Organizational unit names} ' +
'payer_tenant_id {Account names} ' +
Expand All @@ -1211,7 +1207,9 @@ export default defineMessages({
'resource_location {Region names} ' +
'service {Service names} ' +
'service_name {Service names} ' +
'status {Status} ' +
'subscription_guid {Account names} ' +
'source_type {Source type} ' +
'tag {Tag names} ' +
'other {}}',
description: 'Details table resource names',
Expand Down Expand Up @@ -1296,6 +1294,11 @@ export default defineMessages({
description: 'View all {value}',
id: 'detailsViewAll',
},
disabled: {
defaultMessage: 'Disabled',
description: 'Disabled',
id: 'disabled',
},
discountMinus: {
defaultMessage: 'Discount (-)',
description: 'Discount (-)',
Expand Down Expand Up @@ -1421,6 +1424,11 @@ export default defineMessages({
description: 'No match found',
id: 'emptyFilterStateTitle',
},
enabled: {
defaultMessage: 'Enabled',
description: 'Enabled',
id: 'enabled',
},
end: {
defaultMessage: 'End',
description: 'End',
Expand Down Expand Up @@ -3065,6 +3073,11 @@ export default defineMessages({
description: 'Jan 1-31',
id: 'sinceDate',
},
sourceType: {
defaultMessage: 'Source type',
description: 'Source type',
id: 'sourceType',
},
sources: {
defaultMessage: 'Sources',
description: 'Sources',
Expand Down
5 changes: 3 additions & 2 deletions src/routes/settings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type { WrappedComponentProps } from 'react-intl';
import { injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { Calculations } from 'routes/settings/calculations';
import { CostModelsDetails } from 'routes/settings/costModelsDetails';
import { CostModelsDetails } from 'routes/settings/costModels';
import { TagDetails } from 'routes/settings/tagDetails';
import { createMapStateToProps } from 'store/common';
import type { RouterComponentProps } from 'utils/router';
import { withRouter } from 'utils/router';
Expand Down Expand Up @@ -136,7 +137,7 @@ class SettingsBase extends React.Component<SettingsProps, SettingsState> {
} else if (currentTab === SettingsTab.calculations) {
return <Calculations />;
} else if (currentTab === SettingsTab.tags) {
return null;
return <TagDetails />;
} else {
return emptyTab;
}
Expand Down
1 change: 1 addition & 0 deletions src/routes/settings/tagDetails/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as TagDetails } from './tagDetails';
31 changes: 31 additions & 0 deletions src/routes/settings/tagDetails/tagDetails.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import global_BackgroundColor_light_100 from '@patternfly/react-tokens/dist/js/global_BackgroundColor_light_100';
import global_spacer_lg from '@patternfly/react-tokens/dist/js/global_spacer_lg';
import global_spacer_md from '@patternfly/react-tokens/dist/js/global_spacer_md';
import type React from 'react';

export const styles = {
content: {
paddingBottom: global_spacer_lg.value,
paddingTop: global_spacer_lg.value,
},
paginationContainer: {
marginLeft: global_spacer_lg.value,
marginRight: global_spacer_lg.value,
},
pagination: {
backgroundColor: global_BackgroundColor_light_100.value,
paddingBottom: global_spacer_md.value,
paddingTop: global_spacer_md.value,
},
tableContainer: {
marginLeft: global_spacer_lg.value,
marginRight: global_spacer_lg.value,
},
tagDetails: {
minHeight: '100vh',
},
toolbarContainer: {
marginLeft: global_spacer_lg.value,
marginRight: global_spacer_lg.value,
},
} as { [className: string]: React.CSSProperties };
Loading

0 comments on commit 92d0fbf

Please sign in to comment.