+ {!serviceacnts && (
+
+
+
+ )}
+
+
+
+ {T.translate(`${PREFIX}.serviceAccount`)}
+
+
+
+
+
+ {serviceacnts &&
+ serviceacnts.map((serviceAcnt) => {
+ const actions: IAction[] = [
+ {
+ label: T.translate('commons.edit'),
+ actionFn: () => showEditDialog(serviceAcnt),
+ },
+ {
+ label: 'separator',
+ },
+ {
+ label: T.translate('commons.delete'),
+ actionFn: () => showDeleteConfirmation(serviceAcnt),
+ },
+ ];
+
+ return (
+
+ {serviceAcnt.name}
+
+
+
+
+ );
+ })}
+
+
+ {renderDeleteConfirm()}
+ {renderEditDialog()}
+
+ );
+};
+
+const mapStateToProps = (state) => {
+ return {
+ serviceacnts: state.serviceacnts,
+ };
+};
+
+const ServiceAccounts = connect(mapStateToProps)(ServiceAccountsView);
+export default ServiceAccounts;
diff --git a/app/cdap/components/shared/ConfirmDialog/index.tsx b/app/cdap/components/shared/ConfirmDialog/index.tsx
new file mode 100644
index 00000000000..a6c721ff8a4
--- /dev/null
+++ b/app/cdap/components/shared/ConfirmDialog/index.tsx
@@ -0,0 +1,123 @@
+/*
+ * Copyright © 2023 Cask Data, Inc.
+ *
+ * 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.
+ */
+
+import React, { ReactElement, ReactNode, useState } from 'react';
+import isObject from 'lodash/isObject';
+import DialogTitle from '@material-ui/core/DialogTitle';
+import DialogContent from '@material-ui/core/DialogContent';
+import DialogActions from '@material-ui/core/DialogActions';
+import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
+import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';
+
+import IconButton from '@material-ui/core/IconButton';
+import { StyledBox, StyledDialog, StyledAlert } from './styles';
+import PrimaryTextButton from 'components/shared/Buttons/PrimaryTextButton';
+
+interface IConfirmDialogProps {
+ headerTitle: string | ReactNode;
+ isOpen: boolean;
+ cancelButtonText: string | ReactNode;
+ cancelFn: (arg0: any) => void;
+ confirmButtonText: string | ReactNode;
+ confirmFn: (arg0: any) => void;
+ confirmationElem?: string | ReactNode | ReactElement;
+ confirmationText?: string | ReactNode;
+ severity?: 'success' | 'info' | 'warning' | 'error';
+ statusMessage?: string | ReactNode;
+ extendedMessage?: { response: string };
+ disableAction?: boolean;
+}
+
+export const ConfirmDialog = ({
+ headerTitle,
+ isOpen,
+ cancelButtonText,
+ cancelFn,
+ confirmButtonText,
+ confirmFn,
+ confirmationElem,
+ confirmationText,
+ severity,
+ statusMessage,
+ extendedMessage,
+ disableAction,
+}: IConfirmDialogProps) => {
+ const [isExpanded, setIsExpanded] = useState(false);
+
+ const showStatusMessage = () => {
+ if (statusMessage) {
+ return (
+