diff --git a/openmetadata-service/src/main/resources/elasticsearch/raw_cost_analysis_report_data_index.json b/openmetadata-service/src/main/resources/elasticsearch/raw_cost_analysis_report_data_index.json index 293af93ae5a0..244058a8ce42 100644 --- a/openmetadata-service/src/main/resources/elasticsearch/raw_cost_analysis_report_data_index.json +++ b/openmetadata-service/src/main/resources/elasticsearch/raw_cost_analysis_report_data_index.json @@ -35,47 +35,7 @@ } }, "lifeCycle": { - "properties": { - "created": { - "properties": { - "timestamp": { - "type": "date" - }, - "accessedBy": { - "type": "keyword" - }, - "accessedByAProcess": { - "type": "keyword" - } - } - }, - "updated": { - "properties": { - "timestamp": { - "type": "date" - }, - "accessedBy": { - "type": "keyword" - }, - "accessedByAProcess": { - "type": "keyword" - } - } - }, - "accessed": { - "properties": { - "timestamp": { - "type": "date" - }, - "accessedBy": { - "type": "keyword" - }, - "accessedByAProcess": { - "type": "keyword" - } - } - } - } + "type": "object" }, "sizeInByte": { "type": "double" diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/AppDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/AppDetails.component.tsx index 266731c5fccd..68d362b464c3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/AppDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/AppDetails.component.tsx @@ -77,6 +77,7 @@ import AppSchedule from '../AppSchedule/AppSchedule.component'; import { ApplicationTabs } from '../MarketPlaceAppDetails/MarketPlaceAppDetails.interface'; import './app-details.less'; import { AppAction } from './AppDetails.interface'; +import applicationSchemaClassBase from './ApplicationSchemaClassBase'; const AppDetails = () => { const { t } = useTranslation(); @@ -97,10 +98,10 @@ const AppDetails = () => { include: Include.All, }); setAppData(data); - const schema = await import( - `../../../utils/ApplicationSchemas/${fqn}.json` - ); - setJsonSchema(schema); + + const schema = await applicationSchemaClassBase.importSchema(fqn); + + setJsonSchema(schema.default); } catch (error) { showErrorToast(error as AxiosError); } finally { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/ApplicationSchemaClassBase.ts b/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/ApplicationSchemaClassBase.ts new file mode 100644 index 000000000000..1d07e4c0d4d1 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/Applications/AppDetails/ApplicationSchemaClassBase.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class ApplicationSchemaClassBase { + public importSchema(fqn: string) { + return import(`../../../utils/ApplicationSchemas/${fqn}.json`); + } +} + +const applicationSchemaClassBase = new ApplicationSchemaClassBase(); + +export default applicationSchemaClassBase; +export { ApplicationSchemaClassBase };