Skip to content

Commit

Permalink
Refactor Ceph Plugin Directory Structure
Browse files Browse the repository at this point in the history
  • Loading branch information
bipuladh committed Feb 17, 2021
1 parent 9d7806b commit 7d3624c
Show file tree
Hide file tree
Showing 78 changed files with 138 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -1,62 +1,40 @@
{
"replacement disallowed: disk {{diskName}} is {{replacementStatus}}": "replacement disallowed: disk {{diskName}} is {{replacementStatus}}",
"Disk Replacement": "Disk Replacement",
"This action will start preparing the disk for replacement.": "This action will start preparing the disk for replacement.",
"Data rebalancing is in progress": "Data rebalancing is in progress",
"See data resiliency status": "See data resiliency status",
"Are you sure you want to replace <1>{{diskName}}</1> ?": "Are you sure you want to replace <1>{{diskName}}</1> ?",
"Replace": "Replace",
"Name": "Name",
"Disk State": "Disk State",
"OCS Status": "OCS Status",
"Type": "Type",
"Model": "Model",
"Capacity": "Capacity",
"Filesystem": "Filesystem",
"Disks List": "Disks List",
"Start Disk Replacement": "Start Disk Replacement",
"<0>{{diskName}}</0> can be replaced with a disk of same type.": "<0>{{diskName}}</0> can be replaced with a disk of same type.",
"Troubleshoot disk <1>{{diskName}}</1>": "Troubleshoot disk <1>{{diskName}}</1>",
"here": "here",
"Online": "Online",
"Offline": "Offline",
"NotResponding": "NotResponding",
"PreparingToReplace": "PreparingToReplace",
"ReplacementFailed": "ReplacementFailed",
"ReplacementReady": "ReplacementReady",
"Unknown": "Unknown",
"Activity": "Activity",
"Expanding OCS Cluster": "Expanding OCS Cluster",
"Rebuilding data resiliency": "Rebuilding data resiliency",
"{{formattedProgress, number}}%": "{{formattedProgress, number}}%",
"Upgrading OCS Operator": "Upgrading OCS Operator",
"Not enough usage data": "Not enough usage data",
"used": "used",
"available": "available",
"Other": "Other",
"All other capacity usage that are not a part of the top 5 consumers.": "All other capacity usage that are not a part of the top 5 consumers.",
"Available": "Available",
"Rebuilding data resiliency": "Rebuilding data resiliency",
"{{formattedProgress, number}}%": "{{formattedProgress, number}}%",
"Projects": "Projects",
"Storage Classes": "Storage Classes",
"Pods": "Pods",
"Used Capacity Breakdown": "Used Capacity Breakdown",
"This card shows the used capacity for Usable storage, broken-down by different kubernetes resources. Usable storage is all the data that can be stored in the system after decreasing the replication policies.": "This card shows the used capacity for Usable storage, broken-down by different kubernetes resources. Usable storage is all the data that can be stored in the system after decreasing the replication policies.",
"Capacity breakdown": "Capacity breakdown",
"{{metricType}}": "{{metricType}}",
"Break By Dropdown": "Break By Dropdown",
"Details": "Details",
"Service Name": "Service Name",
"Cluster Name": "Cluster Name",
"Provider": "Provider",
"Mode": "Mode",
"Version": "Version",
"Status": "Status",
"OCS Cluster": "OCS Cluster",
"Utilization": "Utilization",
"Used Capacity": "Used Capacity",
"Requested capacity": "Requested capacity",
"Activity": "Activity",
"Expanding OCS Cluster": "Expanding OCS Cluster",
"Upgrading OCS Operator": "Upgrading OCS Operator",
"Used Capacity Breakdown": "Used Capacity Breakdown",
"This card shows the used capacity for Usable storage, broken-down by different kubernetes resources. Usable storage is all the data that can be stored in the system after decreasing the replication policies.": "This card shows the used capacity for Usable storage, broken-down by different kubernetes resources. Usable storage is all the data that can be stored in the system after decreasing the replication policies.",
"Break By Dropdown": "Break By Dropdown",
"Inventory": "Inventory",
"Raw Capacity": "Raw Capacity",
"Used": "Used",
"Available versus Used Capacity": "Available versus Used Capacity",
"Used of {{capacity}}": "Used of {{capacity}}",
"Not Available": "Not Available",
"Status": "Status",
"OCS Cluster": "OCS Cluster",
"Data Resiliency": "Data Resiliency",
"Warning": "Warning",
"Error": "Error",
Expand All @@ -67,28 +45,29 @@
"Savings": "Savings",
"The amount of physical storage saved after applying compression.": "The amount of physical storage saved after applying compression.",
"Storage Efficiency": "Storage Efficiency",
"Used Capacity": "Used Capacity",
"Utilization": "Utilization",
"IOPS": "IOPS",
"Latency": "Latency",
"Throughput": "Throughput",
"Recovery": "Recovery",
"Capacity breakdown": "Capacity breakdown",
"Requested capacity": "Requested capacity",
"The uploaded file is not a valid JSON file": "The uploaded file is not a valid JSON file",
"Connect to external cluster": "Connect to external cluster",
"Download <1>{{SCRIPT_NAME}}</1> script and run on the RHCS cluster, then upload the results(JSON) in the External cluster metadata field.": "Download <1>{{SCRIPT_NAME}}</1> script and run on the RHCS cluster, then upload the results(JSON) in the External cluster metadata field.",
"Download Script": "Download Script",
"A bucket will be created to provide the OCS Service.": "A bucket will be created to provide the OCS Service.",
"Bucket created for OCS Service": "Bucket created for OCS Service",
"Create External Storage Cluster": "Create External Storage Cluster",
"External cluster metadata": "External cluster metadata",
"Upload JSON File": "Upload JSON File",
"Upload Credentials file": "Upload Credentials file",
"JSON data": "JSON data",
"Create Button": "Create Button",
"Create": "Create",
"Cancel": "Cancel",
"Name": "Name",
"Disk State": "Disk State",
"OCS Status": "OCS Status",
"Type": "Type",
"Model": "Model",
"Capacity": "Capacity",
"Filesystem": "Filesystem",
"Disks List": "Disks List",
"Start Disk Replacement": "Start Disk Replacement",
"<0>{{diskName}}</0> can be replaced with a disk of same type.": "<0>{{diskName}}</0> can be replaced with a disk of same type.",
"Troubleshoot disk <1>{{diskName}}</1>": "Troubleshoot disk <1>{{diskName}}</1>",
"here": "here",
"Online": "Online",
"Offline": "Offline",
"NotResponding": "NotResponding",
"PreparingToReplace": "PreparingToReplace",
"ReplacementFailed": "ReplacementFailed",
"ReplacementReady": "ReplacementReady",
"Unknown": "Unknown",
"This is a required field": "This is a required field",
"Please enter a URL": "Please enter a URL",
"Please enter a valid port": "Please enter a valid port",
Expand Down Expand Up @@ -123,6 +102,13 @@
"Client Certificate": "Client Certificate",
"Client Private Key": "Client Private Key",
"Save": "Save",
"replacement disallowed: disk {{diskName}} is {{replacementStatus}}": "replacement disallowed: disk {{diskName}} is {{replacementStatus}}",
"Disk Replacement": "Disk Replacement",
"This action will start preparing the disk for replacement.": "This action will start preparing the disk for replacement.",
"Data rebalancing is in progress": "Data rebalancing is in progress",
"See data resiliency status": "See data resiliency status",
"Are you sure you want to replace <1>{{diskName}}</1> ?": "Are you sure you want to replace <1>{{diskName}}</1> ?",
"Replace": "Replace",
"{{replica}} Replication": "{{replica}} Replication",
"A Storage pool is a logical entity providing elastic capacity to applications and workloads. Pools provide a means of supporting policies for access data resilience and storage efficiency.": "A Storage pool is a logical entity providing elastic capacity to applications and workloads. Pools provide a means of supporting policies for access data resilience and storage efficiency.",
"Create New Storage Pool": "Create New Storage Pool",
Expand All @@ -136,13 +122,15 @@
"Compression": "Compression",
"Enable Compression": "Enable Compression",
"Enabling compression may result in little or no space savings for encrypted or random data. Also, enabling compression may have an impact on I/O performance.": "Enabling compression may result in little or no space savings for encrypted or random data. Also, enabling compression may have an impact on I/O performance.",
"Create": "Create",
"Discover Disks": "Discover Disks",
"Create Storage Class": "Create Storage Class",
"Storage and Nodes": "Storage and Nodes",
"Configure": "Configure",
"Review and Create": "Review and Create",
"Next": "Next",
"Back": "Back",
"Cancel": "Cancel",
"Missing storage class": "Missing storage class",
"The storage cluster needs to use a storage class to consume the local storage. In order to create one you need to discover the available disks and create a storage class using the filters to select the disks you wish to use": "The storage cluster needs to use a storage class to consume the local storage. In order to create one you need to discover the available disks and create a storage class using the filters to select the disks you wish to use",
"Can be used on any platform. It means that OCS uses attached disks, via Local Storage Operator. In this case, the infrastructure storage class is actually provided by LSO, on top of attached drives.": "Can be used on any platform. It means that OCS uses attached disks, via Local Storage Operator. In this case, the infrastructure storage class is actually provided by LSO, on top of attached drives.",
Expand Down Expand Up @@ -188,7 +176,19 @@
"Storage Cluster exists": "Storage Cluster exists",
"Back to operator page": "Back to operator page",
"Go to cluster page": "Go to cluster page",
"clusterExistText": "A storage cluster <1>{{clusterName}}</1> already exists.<3></3>You cannot create another storage cluster.",
"clusterExistText": "A storage cluster <1>{{clusterName}}</1> is already created.<3></3>You cannot create another storage cluster.",
"The uploaded file is not a valid JSON file": "The uploaded file is not a valid JSON file",
"Connect to external cluster": "Connect to external cluster",
"Download <1>{{SCRIPT_NAME}}</1> script and run on the RHCS cluster, then upload the results(JSON) in the External cluster metadata field.": "Download <1>{{SCRIPT_NAME}}</1> script and run on the RHCS cluster, then upload the results(JSON) in the External cluster metadata field.",
"Download Script": "Download Script",
"A bucket will be created to provide the OCS Service.": "A bucket will be created to provide the OCS Service.",
"Bucket created for OCS Service": "Bucket created for OCS Service",
"Create External Storage Cluster": "Create External Storage Cluster",
"External cluster metadata": "External cluster metadata",
"Upload JSON File": "Upload JSON File",
"Upload Credentials file": "Upload Credentials file",
"JSON data": "JSON data",
"Create Button": "Create Button",
"Create Storage Cluster": "Create Storage Cluster",
"OCS runs as a cloud-native service for optimal integration with applications in need of storage and handles the scenes such as provisioning and management.": "OCS runs as a cloud-native service for optimal integration with applications in need of storage and handles the scenes such as provisioning and management.",
"The selected nodes will be labeled with <1>{{label}}</1> (unless they are already labeled). {{replica}} of the selected nodes will be used for initial deployment. The remaining nodes will be used by OpenShift as scheduling targets for OCS scaling.": "The selected nodes will be labeled with <1>{{label}}</1> (unless they are already labeled). {{replica}} of the selected nodes will be used for initial deployment. The remaining nodes will be used by OpenShift as scheduling targets for OCS scaling.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { ShallowWrapper, shallow } from 'enzyme';
import {
BreakdownBodyProps,
BreakdownCardBody,
} from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-body';
import { getStackChartStats } from '../components/dashboard-page/storage-dashboard/breakdown-card/utils';
} from '../components/dashboards/common/capacity-breakdown/breakdown-body';
import { getStackChartStats } from '../components/dashboards/common/capacity-breakdown/utils';
import { breakdownData } from '../__mocks__/breakdown-data';
import { BreakdownChart } from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-chart';
import { TotalCapacityBody } from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-capacity';
import { BreakdownChartLoading } from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-loading';
import { BreakdownChart } from '../components/dashboards/common/capacity-breakdown/breakdown-chart';
import { TotalCapacityBody } from '../components/dashboards/common/capacity-breakdown/breakdown-capacity';
import { BreakdownChartLoading } from '../components/dashboards/common/capacity-breakdown/breakdown-loading';

const top5MetricsStats = getStackChartStats(breakdownData.top5, breakdownData.humanize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import {
addAvailable,
getStackChartStats,
getLegends,
} from '../components/dashboard-page/storage-dashboard/breakdown-card/utils';
} from '../components/dashboards/common/capacity-breakdown/utils';
import { breakdownData } from '../__mocks__/breakdown-data';
import {
BreakdownChart,
BreakdownChartProps,
LinkableLegend,
LinkableLegendProps,
} from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-chart';
} from '../components/dashboards/common/capacity-breakdown/breakdown-chart';
import { Link } from 'react-router-dom';
import { Chart, ChartBar } from '@patternfly/react-charts';
import { Tooltip } from '@patternfly/react-core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import DashboardCardHeader from '@console/shared/src/components/dashboard/dashbo
import DashboardCardBody from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardBody';
import DashboardCardTitle from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardTitle';
import { PROJECTS, STORAGE_CLASSES, PODS } from '../constants';
import { BreakdownCard } from '../components/independent-dashboard-page/breakdown-card';
import { BreakdownCard } from '../components/dashboards/persistent-external/breakdown-card';
import { dashboardData } from '../__mocks__/independent-mode-dashboard-data';
import { BreakdownCardBody } from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-body';
import { getSelectOptions } from '../components/dashboard-page/storage-dashboard/breakdown-card/breakdown-dropdown';
import { BreakdownCardBody } from '../components/dashboards/common/capacity-breakdown/breakdown-body';
import { getSelectOptions } from '../components/dashboards/common/capacity-breakdown/breakdown-dropdown';

jest.mock('react-i18next', () => {
const reactI18next = require.requireActual('react-i18next');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ShallowWrapper, shallow } from 'enzyme';
import { DashboardItemProps } from '@console/internal/components/dashboard/with-dashboard-resources';
import DashboardCardHeader from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardHeader';
import DashboardCardTitle from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardTitle';
import { DetailsCard } from '../components/independent-dashboard-page/details-card';
import { DetailsCard } from '../components/dashboards/persistent-external/details-card';
import { dashboardData } from '../__mocks__/independent-mode-dashboard-data';

jest.mock('react-i18next', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { FieldLevelHelp } from '@console/internal/components/utils';
import './storage-efficiency-card.scss';

export const EfficiencyItemBody: React.FC<EfficiencyItemBodyProps> = React.memo(
({ stats, title, infoText, isLoading, error, getStats }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ import DashboardCard from '@console/shared/src/components/dashboard/dashboard-ca
import DashboardCardTitle from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardTitle';
import DashboardCardBody from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardBody';
import { getInstantVectorStats } from '@console/internal/components/graphs/utils';
import { breakdownIndependentQueryMap } from '../../constants/queries';
import { PROJECTS, STORAGE_CLASSES, PODS } from '../../constants';
import {
sortInstantVectorStats,
getStackChartStats,
} from '../dashboard-page/storage-dashboard/breakdown-card/utils';
import { BreakdownCardBody } from '../dashboard-page/storage-dashboard/breakdown-card/breakdown-body';
import { getSelectOptions } from '../dashboard-page/storage-dashboard/breakdown-card/breakdown-dropdown';
import '../dashboard-page/storage-dashboard/capacity-breakdown/capacity-breakdown-card.scss';
import { breakdownIndependentQueryMap } from '../../../constants/queries';
import { PROJECTS, STORAGE_CLASSES, PODS } from '../../../constants';
import { sortInstantVectorStats, getStackChartStats } from '../common/capacity-breakdown/utils';
import { BreakdownCardBody } from '../common/capacity-breakdown/breakdown-body';
import { getSelectOptions } from '../common/capacity-breakdown/breakdown-dropdown';
import '../persistent-internal/capacity-breakdown-card/capacity-breakdown-card.scss';

export const BreakdownCard: React.FC<DashboardItemProps> = ({
watchPrometheus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import DashboardCardBody from '@console/shared/src/components/dashboard/dashboar
import DashboardCardHeader from '@console/shared/src/components/dashboard/dashboard-card/DashboardCardHeader';
import { useK8sGet } from '@console/internal/components/utils/k8s-get-hook';
import { InfrastructureModel } from '@console/internal/models';
import { getOCSVersion } from '../../selectors';
import { OCSServiceModel } from '../../models';
import { getOCSVersion } from '../../../selectors';
import { OCSServiceModel } from '../../../models';

const k8sResources: FirehoseResource[] = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import HealthItem from '@console/shared/src/components/dashboard/status-card/Hea
import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook';
import { K8sResourceKind } from '@console/internal/module/k8s';
import { DashboardItemProps } from '@console/internal/components/dashboard/with-dashboard-resources';
import { getCephHealthState } from '../dashboard-page/storage-dashboard/status-card/utils';
import { cephClusterResource } from '../../constants/resources';
import { getCephHealthState } from '../persistent-internal/status-card/utils';
import { cephClusterResource } from '../../../constants/resources';

export const StatusCard: React.FC<DashboardItemProps> = () => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Duration,
} from '@console/shared/src/components/dashboard/duration-hook';
import { PrometheusUtilizationItem } from '@console/internal/components/dashboard/dashboards-page/cluster-dashboard/utilization-card';
import { StorageDashboardQuery, INDEPENDENT_UTILIZATION_QUERIES } from '../../constants/queries';
import { StorageDashboardQuery, INDEPENDENT_UTILIZATION_QUERIES } from '../../../constants/queries';

export const UtilizationCard: React.FC = () => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ const OngoingActivity = withDashboardResources(
if (getResiliencyProgress(progressResponse) < 1) {
prometheusActivities.push({
results: progressResponse,
loader: () => import('./data-resiliency-activity').then((m) => m.DataResiliency),
loader: () =>
import('../../common/data-resiliency/data-resiliency-activity').then(
(m) => m.DataResiliency,
),
});
}

Expand Down
Loading

0 comments on commit 7d3624c

Please sign in to comment.