(
style={{ maxHeight: `${21 * 7}px` }}
>
-
+
(
isImport,
isLoadingValue,
isErrorLoadingValue,
+ (part) => {
+ setHoveredPart(part);
+ },
+ hoveredPart,
+ isCmdOrCtrlPressed,
+ onClickSegment,
placeholder
)}
@@ -138,6 +227,9 @@ export const SecretInput = forwardRef(
onBlur?.(evt);
setIsSecretFocused.off();
}}
+ onMouseLeave={() => {
+ setHoveredPart(undefined);
+ }}
value={value || ""}
{...props}
readOnly={isReadOnly || isLoadingValue || isErrorLoadingValue}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
index 977943330..a821a029d 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
@@ -249,6 +249,21 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
name="value"
render={({ field }) => (
+ You can add references to other secrets using the format{" "}
+
+ ${"{"}secret_name{"}"}
+
+
+
+ You can go to the referenced secret by holding the{" "}
+ Cmd (Mac) or{" "}
+ Ctrl{" "}
+ (Windows/Linux) key and clicking on the secret name.
+
+ }
+ tooltipClassName="max-w-md"
label="Value"
isError={Boolean(errors?.value)}
errorText={errors?.value?.message}
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
index a2ee814f8..203a3f6eb 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
@@ -219,22 +219,43 @@ const Page = () => {
ProjectPermissionSub.Commits
);
- const defaultFilterState = {
- tags: {},
- searchFilter: (routerQueryParams.search as string) || "",
- // these should always be on by default for the UI, they will be disabled for the query below based off permissions
- include: {
- [RowType.Folder]: false,
- [RowType.Import]: false,
- [RowType.DynamicSecret]: false,
- [RowType.Secret]: false,
- [RowType.SecretRotation]: false
- }
- };
+ const getFilterStateFromQueryParams = useCallback(() => {
+ const filterByArray = routerQueryParams.filterBy
+ ? (routerQueryParams.filterBy as string).split(",").filter(Boolean)
+ : [];
+
+ const includeFilters = {
+ [RowType.Folder]: filterByArray.includes("folder") || false,
+ [RowType.Import]: filterByArray.includes("import") || false,
+ [RowType.DynamicSecret]: filterByArray.includes("dynamic") || false,
+ [RowType.Secret]: filterByArray.includes("secret") || false,
+ [RowType.SecretRotation]: filterByArray.includes("rotation") || false
+ };
+
+ const tags = routerQueryParams.tags
+ ? routerQueryParams.tags.split(",").reduce(
+ (acc, tag) => {
+ const trimmedTag = tag.trim();
+ if (trimmedTag) {
+ acc[trimmedTag] = true;
+ }
+ return acc;
+ },
+ {} as Record
+ )
+ : {};
+
+ return {
+ tags,
+ searchFilter: (routerQueryParams.search as string) || "",
+ include: includeFilters
+ };
+ }, [routerQueryParams.search, routerQueryParams.tags, routerQueryParams.filterBy]);
+
+ const defaultFilterState = getFilterStateFromQueryParams();
const [filter, setFilter] = useState(defaultFilterState);
const [debouncedSearchFilter, setDebouncedSearchFilter] = useDebounce(filter.searchFilter);
- const [filterHistory, setFilterHistory] = useState