Skip to content

Commit

Permalink
Merge pull request #1977 from dlabrecq/1483-all_cloud_option
Browse files Browse the repository at this point in the history
Omit "All cloud filtered by OpenShift" option
  • Loading branch information
dlabrecq authored Jun 2, 2021
2 parents 39f4f62 + b3a2c9a commit 4852d25
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/pages/views/explorer/explorerHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
infrastructureAzureOptions,
infrastructureGcpOptions,
infrastructureIbmOptions,
infrastructureOcpCloudOptions,
// infrastructureOcpCloudOptions, // Todo: Temp disabled -- see https://issues.redhat.com/browse/COST-1483
infrastructureOcpOptions,
ocpOptions,
PerspectiveType,
Expand Down Expand Up @@ -121,7 +121,9 @@ class ExplorerHeaderBase extends React.Component<ExplorerHeaderProps> {
const options = [];
if (ocp) {
options.push(...ocpOptions);
options.push(...infrastructureOcpCloudOptions);
// Todo: Temp disabled -- see https://issues.redhat.com/browse/COST-1483
//
// options.push(...infrastructureOcpCloudOptions);
}
if (aws) {
options.push(...infrastructureAwsOptions);
Expand Down
21 changes: 14 additions & 7 deletions src/pages/views/overview/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ const infrastructureIbmOptions = [{ label: 'overview.perspective.ibm', value: 'i
const infrastructureOcpOptions = [{ label: 'overview.perspective.ocp_usage', value: 'ocp_usage' }];

// Infrastructure Ocp cloud options
const infrastructureOcpCloudOptions = [{ label: 'overview.perspective.ocp_cloud', value: 'ocp_cloud' }];
//
// Todo: Temp disabled -- see https://issues.redhat.com/browse/COST-1483
//
// const infrastructureOcpCloudOptions = [{ label: 'overview.perspective.ocp_cloud', value: 'ocp_cloud' }];

class OverviewBase extends React.Component<OverviewProps> {
protected defaultState: OverviewState = {
Expand Down Expand Up @@ -223,9 +226,11 @@ class OverviewBase extends React.Component<OverviewProps> {
};

private getDefaultInfrastructurePerspective = () => {
if (this.isOcpAvailable()) {
return InfrastructurePerspective.ocpCloud;
}
// Todo: Temp disabled -- see https://issues.redhat.com/browse/COST-1483
//
// if (this.isOcpAvailable()) {
// return InfrastructurePerspective.ocpCloud;
// }
if (this.isAwsAvailable()) {
return InfrastructurePerspective.aws;
}
Expand Down Expand Up @@ -266,9 +271,11 @@ class OverviewBase extends React.Component<OverviewProps> {
// Dynamically show options if providers are available
const options = [];
if (this.getCurrentTab() === OverviewTab.infrastructure) {
if (ocp) {
options.push(...infrastructureOcpCloudOptions);
}
// Todo: Temp disabled -- see https://issues.redhat.com/browse/COST-1483
//
// if (ocp) {
// options.push(...infrastructureOcpCloudOptions);
// }
if (aws) {
options.push(...infrastructureAwsOptions);
}
Expand Down

0 comments on commit 4852d25

Please sign in to comment.