+ {requestedServiceTemplateQuery.isLoading ? (
+
+
+
+ ) : requestedServiceTemplateQuery.isSuccess ? (
+
+
+
+ ) : requestedServiceTemplateQuery.isError ? (
+
+ {isHandleKnownErrorResponse(requestedServiceTemplateQuery.error) ? (
+
+ Request Service Template with requestId {serviceTemplateRequestId}{' '}
+ error
+ >
+ }
+ description={String(requestedServiceTemplateQuery.error.body.details)}
+ showIcon
+ type={'error'}
+ closable={true}
+ onClose={handleRequestedServiceTemplateModalClose}
+ />
+ ) : (
+
+ Request Service Template with requestId {serviceTemplateRequestId}{' '}
+ error
+ >
+ }
+ description={requestedServiceTemplateQuery.error.message}
+ showIcon
+ type={'error'}
+ closable={true}
+ onClose={handleRequestedServiceTemplateModalClose}
+ />
+ )}
+
+ ) : null}
+
+
+
+ );
+}
+
+export default ServiceTemplateHistoryTable;
diff --git a/src/components/content/catalog/services/history/useRequestedServiceTemplateQuery.ts b/src/components/content/catalog/services/history/useRequestedServiceTemplateQuery.ts
new file mode 100644
index 000000000..1b048cb19
--- /dev/null
+++ b/src/components/content/catalog/services/history/useRequestedServiceTemplateQuery.ts
@@ -0,0 +1,24 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ * SPDX-FileCopyrightText: Huawei Inc.
+ */
+
+import { useQuery } from '@tanstack/react-query';
+import {
+ getRequestedServiceTemplateByRequestId,
+ GetRequestedServiceTemplateByRequestIdData,
+} from '../../../../../xpanse-api/generated';
+
+export default function useRequestedServiceTemplateQuery(requestId: string | undefined) {
+ return useQuery({
+ queryKey: ['getRequestedServiceTemplateByRequestId', requestId],
+ queryFn: () => {
+ const data: GetRequestedServiceTemplateByRequestIdData = {
+ requestId: requestId ?? '',
+ };
+ return getRequestedServiceTemplateByRequestId(data);
+ },
+ refetchOnWindowFocus: false,
+ enabled: requestId !== undefined,
+ });
+}
diff --git a/src/components/content/catalog/services/history/useServiceTemplateHistoryQuery.ts b/src/components/content/catalog/services/history/useServiceTemplateHistoryQuery.ts
new file mode 100644
index 000000000..94befbb56
--- /dev/null
+++ b/src/components/content/catalog/services/history/useServiceTemplateHistoryQuery.ts
@@ -0,0 +1,23 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ * SPDX-FileCopyrightText: Huawei Inc.
+ */
+
+import { useQuery } from '@tanstack/react-query';
+import {
+ getServiceTemplateRequestHistoryByServiceTemplateId,
+ GetServiceTemplateRequestHistoryByServiceTemplateIdData,
+} from '../../../../../xpanse-api/generated';
+
+export default function useServiceTemplateHistoryQuery(serviceTemplateId: string) {
+ return useQuery({
+ queryKey: ['getServiceTemplateRequestHistoryByServiceTemplateId', serviceTemplateId],
+ queryFn: () => {
+ const data: GetServiceTemplateRequestHistoryByServiceTemplateIdData = {
+ serviceTemplateId: serviceTemplateId,
+ };
+ return getServiceTemplateRequestHistoryByServiceTemplateId(data);
+ },
+ refetchOnWindowFocus: false,
+ });
+}
diff --git a/src/components/content/common/catalog/ServiceTemplateRegisterStatus.tsx b/src/components/content/common/catalog/ServiceTemplateRegisterStatus.tsx
index 749ddc0ec..aedefd9a0 100644
--- a/src/components/content/common/catalog/ServiceTemplateRegisterStatus.tsx
+++ b/src/components/content/common/catalog/ServiceTemplateRegisterStatus.tsx
@@ -20,7 +20,7 @@ export function ServiceTemplateRegisterStatus({