Skip to content

Commit

Permalink
Added integrations steps
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq committed Mar 15, 2024
1 parent f8b2011 commit 2588782
Show file tree
Hide file tree
Showing 14 changed files with 772 additions and 673 deletions.
745 changes: 348 additions & 397 deletions locales/data.json

Large diffs are not rendered by default.

24 changes: 11 additions & 13 deletions locales/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
"breakdownTitle": "{value}",
"breakdownTotalCostDate": "{value} total cost ({dateRange})",
"calculationType": "Calculation type",
"calculations": "Calculating Data and Cost Models",
"calculationsApplied": "Data correlation and cost models applied",
"cancel": "Cancel",
"chartCostForecastConeLegendLabel": "Cost confidence ({dateRange})",
"chartCostForecastConeLegendNoDataLabel": "Cost confidence (no data)",
Expand Down Expand Up @@ -62,13 +60,6 @@
"chooseValuePlaceholder": "Choose value",
"close": "Close",
"cloudIntegration": "Cloud integration",
"cloudIntegrationData": "Cloud integration data",
"cloudIntegrationDataChecked": "{value, select, aws {Checked for data from Amazon Web Services} azure {Checked for data from Microsoft Azure} oci {Checked for data from Oracle Cloud Infrastructure} gcp {Checked for data from Google Cloud Platform} ibm {Checked for data from IBM Cloud} other {}}",
"cloudIntegrationDataCheckedAriaLabel": "Checked for data from cloud integration",
"cloudIntegrationDataProcessed": "{value, select, aws {Data processed from Amazon Web Services} azure {Data processed from Microsoft Azure} oci {Data processed from Oracle Cloud Infrastructure} gcp {Data processed from Google Cloud Platform} ibm {Data processed from IBM Cloud} other {}}",
"cloudIntegrationDataProcessedAriaLabel": "Data processed from cloud integration",
"cloudIntegrationDataTransferred": "{value, select, aws {Data transferred from Amazon Web Services} azure {Data transferred from Microsoft Azure} oci {Data transferred from Oracle Cloud Infrastructure} gcp {Data transferred from Google Cloud Platform} ibm {Data transferred from IBM Cloud} other {}}",
"cloudIntegrationDataTransferredAriaLabel": "Data transferred from cloud integration",
"cluster": "Cluster",
"clusterId": "Cluster id",
"clusterInfo": "Cluster information",
Expand Down Expand Up @@ -205,7 +196,17 @@
"dashboardNetworkTitle": "Network services cost",
"dashboardStorageTitle": "Storage services usage",
"dashboardTotalCostTooltip": "This total cost is the sum of the infrastructure cost {infrastructureCost} and supplementary cost {supplementaryCost}",
"dataChecked": "{value, select, aws {Checked for data from Amazon Web Services} azure {Checked for data from Microsoft Azure} oci {Checked for data from Oracle Cloud Infrastructure} gcp {Checked for data from Google Cloud Platform} ibm {Checked for data from IBM Cloud} other {}}",
"dataCheckedAriaLabel": "Checked for data from cloud integration",
"dataDetails": "Data details",
"dataDetailsCalculated": "Data correlation and cost models applied",
"dataDetailsCloudIntegration": "Cloud integration data",
"dataDetailsFinalized": "Finalizing cost",
"dataDetailsMetricsOperator": "Cost Management metrics operator data",
"dataDetailsProcessed": "{value, select, aws {New data processed from Amazon Web Services} azure {New data processed from Microsoft Azure} oci {New data processed from Oracle Cloud Infrastructure} gcp {New data processed from Google Cloud Platform} ibm {New data processed from IBM Cloud} ocp {New data processed from OpenShift cluster} other {}}",
"dataDetailsProcessedAriaLabel": "New data processed",
"dataDetailsTransferred": "{value, select, aws {New data transferred from Amazon Web Services} azure {New data transferred from Microsoft Azure} oci {New data transferred from Oracle Cloud Infrastructure} gcp {New data transferred from Google Cloud Platform} ibm {New data transferred from IBM Cloud} ocp {New data transferred from OpenShift cluster} other {}}",
"dataDetailsTransferredAriaLabel": "Data transferred",
"dataTableAriaLabel": "Details table",
"datePickerAfterError": "Date is after the allowable range",
"datePickerBeforeError": "Date is before the allowable range",
Expand Down Expand Up @@ -375,10 +376,6 @@
"metric": "Metric",
"metricPlaceholder": "Filter by metrics",
"metricValues": "{value, select, cpu {CPU} cluster {Cluster} memory {Memory} node {Node} persistent_volume_claims {Persistent volume claims} storage {Storage} other {}}",
"metricsOperatorData": "Cost Management metrics operator data",
"metricsOperatorDataProcessed": "{value, select, aws {Data processed from Amazon Web Services} azure {Data processed from Microsoft Azure} oci {Data processed from Oracle Cloud Infrastructure} gcp {Data processed from Google Cloud Platform} ibm {Data processed from IBM Cloud} ocp {Data processed from OpenShift} other {}}",
"metricsOperatorDataProcessedAriaLabel": "Data received from cloud integration",
"metricsOperatorDataReceived": "{value, select, aws {Data received from Amazon Web Services} azure {Data received from Microsoft Azure} oci {Data received from Oracle Cloud Infrastructure} gcp {Data received from Google Cloud Platform} ibm {Data received from IBM Cloud} ocp {Data received from OpenShift} other {}}",
"metricsOperatorVersion": "Cost Management operator version",
"monthOverMonthChange": "Month over month change",
"names": "{count, plural, one {Name} other {Names}}",
Expand Down Expand Up @@ -540,6 +537,7 @@
"settingsTitle": "Cost Management Settings",
"sinceDate": "{dateRange}",
"source": "{value, select, aws {Amazon Web Services source:} azure {Microsoft Azure source:} oci {Oracle Cloud Infrastructure source:} gcp {Google Cloud Platform source:} ocp {OpenShift source:} other {}}",
"sourceAvailable": "{value, select, aws {Integration available for Amazon Web Services} azure {Integration available for Microsoft Azure} oci {Integration available for Oracle Cloud Infrastructure} gcp {Integration available for Google Cloud Platform} ibm {Integration available for IBM Cloud} ocp {Integration available for OpenShift cluster} other {}}",
"sourceType": "Integration",
"sourceTypes": "{value, select, aws {Amazon Web Services} azure {Microsoft Azure} oci {Oracle Cloud Infrastructure} gcp {Google Cloud Platform} ibm {IBM Cloud} ocp {OpenShift} other {}}",
"sources": "Integrations",
Expand Down
22 changes: 19 additions & 3 deletions src/api/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,23 @@ export interface ProviderCostModel {
uuid: string;
}

export interface ProviderInfrastructureState {
end?: string;
start?: string;
state?: string;
}

export interface ProviderInfrastructure {
cloud_provider_state?: {
download?: ProviderInfrastructureState;
processing?: ProviderInfrastructureState;
summary?: ProviderInfrastructureState;
};
paused?: boolean;
source_status?: {
availability_status?: string;
availability_status_error?: string;
};
type?: string;
uuid?: string;
}
Expand All @@ -64,9 +80,9 @@ export interface Provider {
previous_month_data?: boolean;
source_type?: string;
status?: {
download?: string;
processing?: string;
summary?: string;
download?: ProviderInfrastructureState;
processing?: ProviderInfrastructureState;
summary?: ProviderInfrastructureState;
};
type?: string;
uuid?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/inactiveSources/inactiveSources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class InactiveSourcesBase extends React.Component<InactiveSourcesProps, any> {

if (providers && providers.data) {
providers.data.map(data => {
if (data.active !== true && data.paused !== true) {
if (data.active === false && data.paused === false) {
sources.push(data.name);
}
});
Expand Down
195 changes: 88 additions & 107 deletions src/locales/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,6 @@ export default defineMessages({
description: 'Calculation type',
id: 'calculationType',
},
calculations: {
defaultMessage: 'Calculating Data and Cost Models',
description: 'Calculating Data and Cost Models',
id: 'calculations',
},
calculationsApplied: {
defaultMessage: 'Data correlation and cost models applied',
description: 'Data correlation and cost models applied',
id: 'calculationsApplied',
},
cancel: {
defaultMessage: 'Cancel',
description: 'Cancel',
Expand Down Expand Up @@ -360,62 +350,6 @@ export default defineMessages({
description: 'Cloud integration',
id: 'cloudIntegration',
},
cloudIntegrationData: {
defaultMessage: 'Cloud integration data',
description: 'Cloud integration data',
id: 'cloudIntegrationData',
},
cloudIntegrationDataChecked: {
defaultMessage:
'{value, select, ' +
'aws {Checked for data from Amazon Web Services} ' +
'azure {Checked for data from Microsoft Azure} ' +
'oci {Checked for data from Oracle Cloud Infrastructure} ' +
'gcp {Checked for data from Google Cloud Platform} ' +
'ibm {Checked for data from IBM Cloud} ' +
'other {}}',
description: 'Checked for data from cloud integration',
id: 'cloudIntegrationDataChecked',
},
cloudIntegrationDataCheckedAriaLabel: {
defaultMessage: 'Checked for data from cloud integration',
description: 'Check for data from cloud integration',
id: 'cloudIntegrationDataCheckedAriaLabel',
},
cloudIntegrationDataProcessed: {
defaultMessage:
'{value, select, ' +
'aws {Data processed from Amazon Web Services} ' +
'azure {Data processed from Microsoft Azure} ' +
'oci {Data processed from Oracle Cloud Infrastructure} ' +
'gcp {Data processed from Google Cloud Platform} ' +
'ibm {Data processed from IBM Cloud} ' +
'other {}}',
description: 'Data processed from cloud integration',
id: 'cloudIntegrationDataProcessed',
},
cloudIntegrationDataProcessedAriaLabel: {
defaultMessage: 'Data processed from cloud integration',
description: 'Data processed from cloud integration',
id: 'cloudIntegrationDataProcessedAriaLabel',
},
cloudIntegrationDataTransferred: {
defaultMessage:
'{value, select, ' +
'aws {Data transferred from Amazon Web Services} ' +
'azure {Data transferred from Microsoft Azure} ' +
'oci {Data transferred from Oracle Cloud Infrastructure} ' +
'gcp {Data transferred from Google Cloud Platform} ' +
'ibm {Data transferred from IBM Cloud} ' +
'other {}}',
description: 'Data transferred from cloud integration',
id: 'cloudIntegrationDataTransferred',
},
cloudIntegrationDataTransferredAriaLabel: {
defaultMessage: 'Data transferred from cloud integration',
description: 'Data transferred from cloud integration',
id: 'cloudIntegrationDataTransferredAriaLabel',
},
cluster: {
defaultMessage: 'Cluster',
description: 'Cluster',
Expand Down Expand Up @@ -1096,11 +1030,13 @@ export default defineMessages({
description: 'Currency and calculations',
id: 'currencyCalcuationsTitle',
},

currencyDesc: {
defaultMessage: 'Select the preferred currency view for your organization',
description: 'Select the preferred currency view for your organization',
id: 'currencyDesc',
},

// See https://www.localeplanet.com/icu/currency.html
currencyOptions: {
defaultMessage:
Expand Down Expand Up @@ -1178,11 +1114,84 @@ export default defineMessages({
description: 'total cost is the sum of the infrastructure cost and supplementary cost',
id: 'dashboardTotalCostTooltip',
},
dataChecked: {
defaultMessage:
'{value, select, ' +
'aws {Checked for data from Amazon Web Services} ' +
'azure {Checked for data from Microsoft Azure} ' +
'oci {Checked for data from Oracle Cloud Infrastructure} ' +
'gcp {Checked for data from Google Cloud Platform} ' +
'ibm {Checked for data from IBM Cloud} ' +
'other {}}',
description: 'Checked for data from cloud integration',
id: 'dataChecked',
},
dataCheckedAriaLabel: {
defaultMessage: 'Checked for data from cloud integration',
description: 'Check for data from cloud integration',
id: 'dataCheckedAriaLabel',
},
dataDetails: {
defaultMessage: 'Data details',
description: 'Data details',
id: 'dataDetails',
},
dataDetailsCalculated: {
defaultMessage: 'Data correlation and cost models applied',
description: 'Data correlation and cost models applied',
id: 'dataDetailsCalculated',
},
dataDetailsCloudIntegration: {
defaultMessage: 'Cloud integration data',
description: 'Cloud integration data',
id: 'dataDetailsCloudIntegration',
},
dataDetailsFinalized: {
defaultMessage: 'Finalizing cost',
description: 'Finalizing cost',
id: 'dataDetailsFinalized',
},
dataDetailsMetricsOperator: {
defaultMessage: 'Cost Management metrics operator data',
description: 'Cost Management metrics operator data',
id: 'dataDetailsMetricsOperator',
},
dataDetailsProcessed: {
defaultMessage:
'{value, select, ' +
'aws {New data processed from Amazon Web Services} ' +
'azure {New data processed from Microsoft Azure} ' +
'oci {New data processed from Oracle Cloud Infrastructure} ' +
'gcp {New data processed from Google Cloud Platform} ' +
'ibm {New data processed from IBM Cloud} ' +
'ocp {New data processed from OpenShift cluster} ' +
'other {}}',
description: 'New data processed',
id: 'dataDetailsProcessed',
},
dataDetailsProcessedAriaLabel: {
defaultMessage: 'New data processed',
description: 'New data processed',
id: 'dataDetailsProcessedAriaLabel',
},
dataDetailsTransferred: {
defaultMessage:
'{value, select, ' +
'aws {New data transferred from Amazon Web Services} ' +
'azure {New data transferred from Microsoft Azure} ' +
'oci {New data transferred from Oracle Cloud Infrastructure} ' +
'gcp {New data transferred from Google Cloud Platform} ' +
'ibm {New data transferred from IBM Cloud} ' +
'ocp {New data transferred from OpenShift cluster} ' +
'other {}}',
description: 'New data transferred',
id: 'dataDetailsTransferred',
},
dataDetailsTransferredAriaLabel: {
defaultMessage: 'Data transferred',
description: 'Data transferred',
id: 'dataDetailsTransferredAriaLabel',
},
dataTableAriaLabel: {
defaultMessage: 'Details table',
description: 'Details table',
Expand Down Expand Up @@ -2453,47 +2462,6 @@ export default defineMessages({
description: 'Metric values',
id: 'metricValues',
},
metricsOperatorData: {
defaultMessage: 'Cost Management metrics operator data',
description: 'Cost Management metrics operator data',
id: 'metricsOperatorData',
},
metricsOperatorDataProcessed: {
defaultMessage:
'{value, select, ' +
'aws {Data processed from Amazon Web Services} ' +
'azure {Data processed from Microsoft Azure} ' +
'oci {Data processed from Oracle Cloud Infrastructure} ' +
'gcp {Data processed from Google Cloud Platform} ' +
'ibm {Data processed from IBM Cloud} ' +
'ocp {Data processed from OpenShift} ' +
'other {}}',
description: 'Data processed from cloud integration',
id: 'metricsOperatorDataProcessed',
},
metricsOperatorDataProcessedAriaLabel: {
defaultMessage: 'Data processed from cloud integration',
description: 'Data processed from cloud integration',
id: 'metricsOperatorDataProcessedAriaLabel',
},
metricsOperatorDataReceived: {
defaultMessage:
'{value, select, ' +
'aws {Data received from Amazon Web Services} ' +
'azure {Data received from Microsoft Azure} ' +
'oci {Data received from Oracle Cloud Infrastructure} ' +
'gcp {Data received from Google Cloud Platform} ' +
'ibm {Data received from IBM Cloud} ' +
'ocp {Data received from OpenShift} ' +
'other {}}',
description: 'Data received from cloud integration',
id: 'metricsOperatorDataReceived',
},
metricsOperatorDataReceivedAriaLabel: {
defaultMessage: 'Data received from cloud integration',
description: 'Data received from cloud integration',
id: 'metricsOperatorDataProcessedAriaLabel',
},
metricsOperatorVersion: {
defaultMessage: 'Cost Management operator version',
description: 'Cost Management operator version',
Expand Down Expand Up @@ -3368,6 +3336,19 @@ export default defineMessages({
description: 'Select from the following {value} integrations:',
id: 'source',
},
sourceAvailable: {
defaultMessage:
'{value, select, ' +
'aws {Integration available for Amazon Web Services} ' +
'azure {Integration available for Microsoft Azure} ' +
'oci {Integration available for Oracle Cloud Infrastructure} ' +
'gcp {Integration available for Google Cloud Platform} ' +
'ibm {Integration available for IBM Cloud} ' +
'ocp {Integration available for OpenShift cluster} ' +
'other {}}',
description: 'Integration available',
id: 'sourceAvailable',
},
sourceType: {
defaultMessage: 'Integration',
description: 'Integration',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const styles = {
description: {
color: global_disabled_color_100.value,
fontSize: global_FontSize_xs.value,
paddingLeft: '1px',
},
header: {
backgroundColor: global_BackgroundColor_100.var,
Expand Down
16 changes: 7 additions & 9 deletions src/routes/details/components/breakdown/breakdownHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,14 @@ class BreakdownHeader extends React.Component<BreakdownHeaderProps, any> {
<div style={styles.title}>
<Title headingLevel="h1" size={TitleSizes['2xl']}>
{intl.formatMessage(messages.breakdownTitle, { value: title })}
{description && (
<>
<div style={styles.description}>
{description}
{clusterInfoComponent && isClusterInfoToggleEnabled ? clusterInfoComponent : null}
</div>
<div>{dataDetailsComponent && isClusterInfoToggleEnabled ? dataDetailsComponent : null}</div>
</>
)}
</Title>
{description && (
<div style={styles.description}>
{description}
{clusterInfoComponent && isClusterInfoToggleEnabled ? clusterInfoComponent : null}
{dataDetailsComponent && isClusterInfoToggleEnabled ? <div>{dataDetailsComponent}</div> : null}
</div>
)}
{showCostDistribution && (
<div style={styles.costDistribution}>
<CostDistribution costDistribution={costDistribution} onSelect={onCostDistributionSelect} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ const ClusterInfoContent: React.FC<ClusterInfoContentProps> = ({ clusterId }: Cl
const useMapToProps = (): ClusterInfoContentStateProps => {
const dispatch: ThunkDispatch<RootState, any, AnyAction> = useDispatch();

// PermissionsWraper has already made an API request
const providersQueryString = getProvidersQuery(providersQuery);
const providers = useSelector((state: RootState) =>
providersSelectors.selectProviders(state, ProviderType.all, providersQueryString)
Expand Down
Loading

0 comments on commit 2588782

Please sign in to comment.