@@ -66,7 +66,7 @@
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body style="margin: 0;">
|
||||
<body style="margin: 0">
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
|
||||
@@ -133,9 +133,10 @@ export const SidebarIntro = () => {
|
||||
starredItemsDismissed: false,
|
||||
recentlyViewedItemsDismissed: false,
|
||||
};
|
||||
const [dismissedIntro, setDismissedIntro] = useLocalStorage<
|
||||
SidebarIntroLocalStorage
|
||||
>(SIDEBAR_INTRO_LOCAL_STORAGE);
|
||||
const [
|
||||
dismissedIntro,
|
||||
setDismissedIntro,
|
||||
] = useLocalStorage<SidebarIntroLocalStorage>(SIDEBAR_INTRO_LOCAL_STORAGE);
|
||||
|
||||
const { starredItemsDismissed, recentlyViewedItemsDismissed } =
|
||||
dismissedIntro ?? {};
|
||||
|
||||
+7
-3
@@ -55,9 +55,13 @@ export const PreparePullRequestForm = <
|
||||
onSubmit,
|
||||
render,
|
||||
}: Props<TFieldValues>) => {
|
||||
const { handleSubmit, watch, control, register, errors } = useForm<
|
||||
TFieldValues
|
||||
>({ mode: 'onTouched', defaultValues });
|
||||
const {
|
||||
handleSubmit,
|
||||
watch,
|
||||
control,
|
||||
register,
|
||||
errors,
|
||||
} = useForm<TFieldValues>({ mode: 'onTouched', defaultValues });
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
|
||||
@@ -74,9 +74,10 @@ const CatalogPageContents = () => {
|
||||
const errorApi = useApi(errorApiRef);
|
||||
const { isStarredEntity } = useStarredEntities();
|
||||
const [selectedTab, setSelectedTab] = useState<string>();
|
||||
const [selectedSidebarItem, setSelectedSidebarItem] = useState<
|
||||
CatalogFilterType
|
||||
>();
|
||||
const [
|
||||
selectedSidebarItem,
|
||||
setSelectedSidebarItem,
|
||||
] = useState<CatalogFilterType>();
|
||||
const orgName = configApi.getOptionalString('organization.name') ?? 'Company';
|
||||
const createComponentLink = useRouteRef(createComponentRouteRef);
|
||||
const addMockData = useCallback(async () => {
|
||||
|
||||
@@ -17,9 +17,7 @@ import { useAsync } from 'react-use';
|
||||
import { ActionsListWorkflowRunsForRepoResponseData } from '../../api/types';
|
||||
|
||||
export const useWorkflowRunJobs = (jobsUrl?: string) => {
|
||||
const jobs = useAsync(async (): Promise<
|
||||
ActionsListWorkflowRunsForRepoResponseData
|
||||
> => {
|
||||
const jobs = useAsync(async (): Promise<ActionsListWorkflowRunsForRepoResponseData> => {
|
||||
if (jobsUrl === undefined) {
|
||||
return {
|
||||
builds: [],
|
||||
|
||||
@@ -38,9 +38,7 @@ type PartialPropsWithChildren<T> = PropsWithChildren<Partial<T>>;
|
||||
|
||||
export const MockGroups: Group[] = [{ id: 'tech' }, { id: 'mock-group' }];
|
||||
|
||||
export type MockFilterProviderProps = PartialPropsWithChildren<
|
||||
FilterContextProps
|
||||
>;
|
||||
export type MockFilterProviderProps = PartialPropsWithChildren<FilterContextProps>;
|
||||
|
||||
export const MockFilterProvider = ({
|
||||
children,
|
||||
@@ -64,9 +62,7 @@ export const MockFilterProvider = ({
|
||||
);
|
||||
};
|
||||
|
||||
export type MockLoadingProviderProps = PartialPropsWithChildren<
|
||||
LoadingContextProps
|
||||
>;
|
||||
export type MockLoadingProviderProps = PartialPropsWithChildren<LoadingContextProps>;
|
||||
|
||||
export const MockLoadingProvider = ({
|
||||
children,
|
||||
@@ -84,9 +80,7 @@ export const MockLoadingProvider = ({
|
||||
);
|
||||
};
|
||||
|
||||
export type MockConfigProviderProps = PartialPropsWithChildren<
|
||||
ConfigContextProps
|
||||
>;
|
||||
export type MockConfigProviderProps = PartialPropsWithChildren<ConfigContextProps>;
|
||||
|
||||
export const MockConfigProvider = ({
|
||||
children,
|
||||
@@ -106,9 +100,7 @@ export const MockConfigProvider = ({
|
||||
);
|
||||
};
|
||||
|
||||
export type MockCurrencyProviderProps = PartialPropsWithChildren<
|
||||
CurrencyContextProps
|
||||
>;
|
||||
export type MockCurrencyProviderProps = PartialPropsWithChildren<CurrencyContextProps>;
|
||||
|
||||
export const MockCurrencyProvider = ({
|
||||
children,
|
||||
@@ -129,9 +121,7 @@ export const MockCurrencyProvider = ({
|
||||
);
|
||||
};
|
||||
|
||||
export type MockBillingDateProviderProps = PartialPropsWithChildren<
|
||||
BillingDateContextProps
|
||||
>;
|
||||
export type MockBillingDateProviderProps = PartialPropsWithChildren<BillingDateContextProps>;
|
||||
|
||||
export const MockBillingDateProvider = ({
|
||||
children,
|
||||
@@ -161,9 +151,7 @@ export const MockScrollProvider = ({ children }: MockScrollProviderProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
export type MockGroupsProviderProps = PartialPropsWithChildren<
|
||||
GroupsContextProps
|
||||
>;
|
||||
export type MockGroupsProviderProps = PartialPropsWithChildren<GroupsContextProps>;
|
||||
|
||||
export const MockGroupsProvider = ({
|
||||
children,
|
||||
|
||||
@@ -23,12 +23,13 @@ export interface KubernetesAuthProvider {
|
||||
): Promise<KubernetesRequestBody>;
|
||||
}
|
||||
|
||||
export const kubernetesAuthProvidersApiRef = createApiRef<
|
||||
KubernetesAuthProvidersApi
|
||||
>({
|
||||
id: 'plugin.kubernetes-auth-providers.service',
|
||||
description: 'Used by the Kubernetes plugin to fetch KubernetesAuthProviders',
|
||||
});
|
||||
export const kubernetesAuthProvidersApiRef = createApiRef<KubernetesAuthProvidersApi>(
|
||||
{
|
||||
id: 'plugin.kubernetes-auth-providers.service',
|
||||
description:
|
||||
'Used by the Kubernetes plugin to fetch KubernetesAuthProviders',
|
||||
},
|
||||
);
|
||||
|
||||
export interface KubernetesAuthProvidersApi {
|
||||
decorateRequestBodyForAuth(
|
||||
|
||||
@@ -125,9 +125,10 @@ export class LighthouseRestApi implements LighthouseApi {
|
||||
return await resp.json();
|
||||
}
|
||||
|
||||
async getWebsiteList({ limit, offset }: LASListRequest = {}): Promise<
|
||||
WebsiteListResponse
|
||||
> {
|
||||
async getWebsiteList({
|
||||
limit,
|
||||
offset,
|
||||
}: LASListRequest = {}): Promise<WebsiteListResponse> {
|
||||
const params = new URLSearchParams();
|
||||
if (typeof limit === 'number') params.append('limit', limit.toString());
|
||||
if (typeof offset === 'number') params.append('offset', offset.toString());
|
||||
|
||||
@@ -125,15 +125,14 @@ export const MembersListCard = (_props: {
|
||||
kind: 'User',
|
||||
},
|
||||
});
|
||||
const groupMembersList = ((membersList.items as unknown) as Array<
|
||||
UserEntity
|
||||
>).filter(member =>
|
||||
member?.relations?.some(
|
||||
r =>
|
||||
r.type === RELATION_MEMBER_OF &&
|
||||
r.target.name.toLocaleLowerCase('en-US') ===
|
||||
groupName.toLocaleLowerCase('en-US'),
|
||||
),
|
||||
const groupMembersList = ((membersList.items as unknown) as Array<UserEntity>).filter(
|
||||
member =>
|
||||
member?.relations?.some(
|
||||
r =>
|
||||
r.type === RELATION_MEMBER_OF &&
|
||||
r.target.name.toLocaleLowerCase('en-US') ===
|
||||
groupName.toLocaleLowerCase('en-US'),
|
||||
),
|
||||
);
|
||||
return groupMembersList;
|
||||
}, [catalogApi]);
|
||||
|
||||
Reference in New Issue
Block a user