diff --git a/app/dashboard/public/locales/en.json b/app/dashboard/public/locales/en.json index b69e343..75ce0b0 100644 --- a/app/dashboard/public/locales/en.json +++ b/app/dashboard/public/locales/en.json @@ -76,12 +76,13 @@ "total": "Total" }, "hostsTable": { + "inboundIsNotSelectedToCreate": "An inbound must be selected first", "status": "status", "editHost": "Edit host", "createHosts": "Create host", "address": "Address", "noHostMatched": "It seems there is no host matched with what you are looking for", - "noHost": "There is no host in the system", + "noHost": "Select an inbound, there is no host in the system", "port": "Port", "total": "Total" }, @@ -188,6 +189,7 @@ "createSubmit": "Submit", "editSubmit": "Submit", "createHost": "Create host", + "editHost": "Edit host", "savedSuccess": "Hosts saved successfully", "loading": "loading...", "apply": "Apply", diff --git a/app/dashboard/src/components/table/empty-section.tsx b/app/dashboard/src/components/table/empty-section.tsx index c724355..dc4c059 100644 --- a/app/dashboard/src/components/table/empty-section.tsx +++ b/app/dashboard/src/components/table/empty-section.tsx @@ -5,11 +5,11 @@ import { ReactComponent as AddFileIcon } from 'assets/add_file.svg'; import { t } from 'i18next'; type EmptySectionProps = { - isFiltered: boolean; - noObjectMatchedT: string; - noObjectT: string; - createObjectT: string; - onCreateObject: (isOpen: boolean) => void; + isFiltered: boolean; + noObjectMatchedT: string; + noObjectT: string; + createObjectT: string; + onCreateObject?: (isOpen: boolean) => void; }; const EmptySectionIcon = chakra(AddFileIcon); @@ -24,7 +24,9 @@ const EmptySectionIcon = chakra(AddFileIcon); * @param onCreateObject - Create object event handler on click * */ -export const EmptySection: FC = ({ isFiltered, noObjectT, noObjectMatchedT, createObjectT, onCreateObject }) => { +export const EmptySection: FC = ({ + isFiltered, noObjectT, noObjectMatchedT, createObjectT, onCreateObject +}) => { return ( = ({ isFiltered, noObjectT, noO {isFiltered ? t(noObjectMatchedT) : t(noObjectT)} - {!isFiltered && ( + {(!isFiltered && onCreateObject !== undefined) && (