⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
grafana
/
public
/
app
/
features
/
profile
/
View File Name :
UserProfileEditForm.tsx
import React from 'react'; import { selectors } from '@grafana/e2e-selectors'; import { Button, Field, FieldSet, Form, Icon, Input, Tooltip } from '@grafana/ui'; import config from 'app/core/config'; import { t, Trans } from 'app/core/internationalization'; import { UserDTO } from 'app/types'; import { ProfileUpdateFields } from './types'; export interface Props { user: UserDTO | null; isSavingUser: boolean; updateProfile: (payload: ProfileUpdateFields) => void; } const { disableLoginForm } = config; export const UserProfileEditForm = ({ user, isSavingUser, updateProfile }: Props) => { const onSubmitProfileUpdate = (data: ProfileUpdateFields) => { updateProfile(data); }; // check if authLabels is longer than 0 otherwise false const isExternalUser: boolean = (user && user.isExternal) ?? false; const authSource = isExternalUser && user && user.authLabels ? user.authLabels[0] : ''; const lockMessage = authSource ? ` (Synced via ${authSource})` : ''; const disabledEdit = disableLoginForm || isExternalUser; return (
{({ register, errors }) => { return ( <>
Name is required} disabled={disabledEdit} >
} />
Email is required} disabled={disabledEdit} >
} />
} />
Save
> ); }}
); }; export default UserProfileEditForm; const InputSuffix = () => { return disableLoginForm ? (
) : null; };