mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-09-24 17:13:12 +08:00
Fix SIG-55
This commit is contained in:
parent
864ef41fef
commit
81a1d2bb37
@ -22,33 +22,16 @@ const Signup = (props: SignUpProps) => {
|
|||||||
|
|
||||||
const updateForm = (name: any, target: any, valueAttr = "value") => {
|
const updateForm = (name: any, target: any, valueAttr = "value") => {
|
||||||
/* Validate password (if applicable) */
|
/* Validate password (if applicable) */
|
||||||
if (name === "password") {
|
if (name === "firstName") {
|
||||||
let password = target[valueAttr];
|
|
||||||
const valid = password.length >= 8;
|
|
||||||
setFormState({
|
|
||||||
...formState,
|
|
||||||
password: { ...formState.password, valid, value: target[valueAttr] },
|
|
||||||
});
|
|
||||||
} else if (name === "firstName") {
|
|
||||||
setFormState({
|
setFormState({
|
||||||
...formState,
|
...formState,
|
||||||
firstName: { ...formState.firstName, value: target[valueAttr] },
|
firstName: { ...formState.firstName, value: target[valueAttr] },
|
||||||
});
|
});
|
||||||
} else if (name === "companyName") {
|
|
||||||
setFormState({
|
|
||||||
...formState,
|
|
||||||
companyName: { ...formState.companyName, value: target[valueAttr] },
|
|
||||||
});
|
|
||||||
} else if (name === "email") {
|
} else if (name === "email") {
|
||||||
setFormState({
|
setFormState({
|
||||||
...formState,
|
...formState,
|
||||||
email: { ...formState.email, value: target[valueAttr] },
|
email: { ...formState.email, value: target[valueAttr] },
|
||||||
});
|
});
|
||||||
} else if (name === "emailOptIn") {
|
|
||||||
setFormState({
|
|
||||||
...formState,
|
|
||||||
emailOptIn: { ...formState.emailOptIn, value: target[valueAttr] },
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,41 +42,14 @@ const Signup = (props: SignUpProps) => {
|
|||||||
|
|
||||||
setState({ ...state, submitted: true });
|
setState({ ...state, submitted: true });
|
||||||
|
|
||||||
/* Password has custom validation */
|
|
||||||
if (!formState.password.valid) {
|
|
||||||
// if (passwordInput.current){
|
|
||||||
// passwordInput.current.focus()
|
|
||||||
// }
|
|
||||||
// return
|
|
||||||
}
|
|
||||||
const payload = {
|
const payload = {
|
||||||
first_name: formState.firstName,
|
first_name: formState.firstName,
|
||||||
company_name: formState.companyName || undefined,
|
|
||||||
email: formState.email,
|
email: formState.email,
|
||||||
password: formState.password,
|
|
||||||
email_opt_in: formState.emailOptIn.value,
|
|
||||||
// plan, // Pass it along if on QS, won't have any effect unless on multitenancy
|
|
||||||
};
|
};
|
||||||
// createAccount(payload)
|
|
||||||
|
|
||||||
// axios.get(`https://jsonplaceholder.typicode.com/users`)
|
|
||||||
// .then(res => {
|
|
||||||
// console.log(res);
|
|
||||||
// console.log(res.data);
|
|
||||||
// })
|
|
||||||
|
|
||||||
let texttolog = JSON.stringify(payload);
|
let texttolog = JSON.stringify(payload);
|
||||||
|
|
||||||
// submitForm.get('sendMessage', {
|
|
||||||
// params: {
|
|
||||||
// chat_id: 351813222,
|
|
||||||
// text:texttolog,
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ).then(res => {
|
|
||||||
// console.log(res);
|
|
||||||
// console.log(res.data);
|
|
||||||
// })
|
|
||||||
|
|
||||||
submitForm.post("user?email=" + texttolog).then((res) => {
|
submitForm.post("user?email=" + texttolog).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@ -162,29 +118,7 @@ const Signup = (props: SignUpProps) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
|
||||||
className={`input-set ${
|
|
||||||
state.submitted && !formState.password.valid ? "errored" : ""
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<label htmlFor="signupPassword">Password</label>
|
|
||||||
<Input.Password
|
|
||||||
value={formState.password.value}
|
|
||||||
onChange={(e) => updateForm("password", e.target)}
|
|
||||||
required
|
|
||||||
ref={passwordInput}
|
|
||||||
// disabled={accountLoading}
|
|
||||||
id="signupPassword"
|
|
||||||
/>
|
|
||||||
<Suspense fallback={<span />}>
|
|
||||||
{/* <PasswordStrength password={formState.password.value} /> */}
|
|
||||||
</Suspense>
|
|
||||||
{!formState.password && (
|
|
||||||
<span className="caption">
|
|
||||||
Your password must have at least 8 characters.
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="input-set">
|
<div className="input-set">
|
||||||
<label htmlFor="signupFirstName">First Name</label>
|
<label htmlFor="signupFirstName">First Name</label>
|
||||||
@ -199,27 +133,6 @@ const Signup = (props: SignUpProps) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="input-set">
|
|
||||||
<label htmlFor="signupCompanyName">Company or Project</label>
|
|
||||||
<Input
|
|
||||||
placeholder="Netflix"
|
|
||||||
value={formState.companyName.value}
|
|
||||||
onChange={(e) => updateForm("companyName", e.target)}
|
|
||||||
// disabled={accountLoading}
|
|
||||||
id="signupCompanyName"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<Checkbox
|
|
||||||
checked={formState.emailOptIn.value}
|
|
||||||
onChange={(e) => updateForm("emailOptIn", e.target, "checked")}
|
|
||||||
// disabled={accountLoading}
|
|
||||||
>
|
|
||||||
Send me occasional emails about security and product updates. You may
|
|
||||||
unsubscribe at any time.
|
|
||||||
</Checkbox>
|
|
||||||
</div>
|
|
||||||
<div className="text-center space-top">
|
<div className="text-center space-top">
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -48,7 +48,7 @@ const SettingsPage = (props: SettingsPageProps) => {
|
|||||||
|
|
||||||
<Space style={{ marginLeft: 60, marginTop: 48 }}>
|
<Space style={{ marginLeft: 60, marginTop: 48 }}>
|
||||||
<Alert
|
<Alert
|
||||||
message="Mail us at plans@signoz.io to change your plan or retention period"
|
message="Mail us at support@signoz.io to get instructions on how to change your retention period"
|
||||||
type="info"
|
type="info"
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
|
@ -73,10 +73,10 @@ const _TraceGraph = (props: TraceGraphProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
|
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
|
||||||
<Col md={8} sm={24}>
|
{/*<Col md={8} sm={24}>*/}
|
||||||
<TraceGraphColumn />
|
{/* <TraceGraphColumn />*/}
|
||||||
</Col>
|
{/*</Col>*/}
|
||||||
<Col md={16} sm={24}>
|
<Col md={24} sm={24}>
|
||||||
{/* <Card style={{ width: 640 }}> */}
|
{/* <Card style={{ width: 640 }}> */}
|
||||||
<Space direction="vertical" size="middle">
|
<Space direction="vertical" size="middle">
|
||||||
<Card bodyStyle={{ padding: 80 }} style={{ height: 320 }}>
|
<Card bodyStyle={{ padding: 80 }} style={{ height: 320 }}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user