mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-16 21:09:50 +08:00
refactor: remove 'default' perfix in some fields of access
This commit is contained in:
parent
c07caeb45b
commit
f288fc6142
@ -1523,7 +1523,7 @@ func createSSLDeployerProvider(options *deployerProviderOptions) (core.SSLDeploy
|
||||
|
||||
deployer, err := pWebhook.NewSSLDeployerProvider(&pWebhook.SSLDeployerProviderConfig{
|
||||
WebhookUrl: access.Url,
|
||||
WebhookData: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "webhookData", access.DefaultDataForDeployment),
|
||||
WebhookData: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "webhookData", access.DataStringForDeployment),
|
||||
Method: access.Method,
|
||||
Headers: mergedHeaders,
|
||||
AllowInsecureConnections: access.AllowInsecureConnections,
|
||||
|
||||
@ -139,8 +139,8 @@ type AccessConfigForDingTalkBot struct {
|
||||
}
|
||||
|
||||
type AccessConfigForDiscordBot struct {
|
||||
BotToken string `json:"botToken"`
|
||||
DefaultChannelId string `json:"defaultChannelId,omitempty"`
|
||||
BotToken string `json:"botToken"`
|
||||
ChannelId string `json:"channelId,omitempty"`
|
||||
}
|
||||
|
||||
type AccessConfigForDNSLA struct {
|
||||
@ -167,14 +167,14 @@ type AccessConfigForEdgio struct {
|
||||
}
|
||||
|
||||
type AccessConfigForEmail struct {
|
||||
SmtpHost string `json:"smtpHost"`
|
||||
SmtpPort int32 `json:"smtpPort"`
|
||||
SmtpTls bool `json:"smtpTls"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
DefaultSenderAddress string `json:"defaultSenderAddress,omitempty"`
|
||||
DefaultSenderName string `json:"defaultSenderName,omitempty"`
|
||||
DefaultReceiverAddress string `json:"defaultReceiverAddress,omitempty"`
|
||||
SmtpHost string `json:"smtpHost"`
|
||||
SmtpPort int32 `json:"smtpPort"`
|
||||
SmtpTls bool `json:"smtpTls"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
SenderAddress string `json:"senderAddress"`
|
||||
SenderName string `json:"senderName"`
|
||||
ReceiverAddress string `json:"receiverAddress,omitempty"`
|
||||
}
|
||||
|
||||
type AccessConfigForFlexCDN struct {
|
||||
@ -251,10 +251,10 @@ type AccessConfigForLeCDN struct {
|
||||
}
|
||||
|
||||
type AccessConfigForMattermost struct {
|
||||
ServerUrl string `json:"serverUrl"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
DefaultChannelId string `json:"defaultChannelId,omitempty"`
|
||||
ServerUrl string `json:"serverUrl"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
ChannelId string `json:"channelId,omitempty"`
|
||||
}
|
||||
|
||||
type AccessConfigForNamecheap struct {
|
||||
@ -326,8 +326,8 @@ type AccessConfigForSafeLine struct {
|
||||
}
|
||||
|
||||
type AccessConfigForSlackBot struct {
|
||||
BotToken string `json:"botToken"`
|
||||
DefaultChannelId string `json:"defaultChannelId,omitempty"`
|
||||
BotToken string `json:"botToken"`
|
||||
ChannelId string `json:"channelId,omitempty"`
|
||||
}
|
||||
|
||||
type AccessConfigForSpaceship struct {
|
||||
@ -360,8 +360,8 @@ type AccessConfigForSSLCom struct {
|
||||
}
|
||||
|
||||
type AccessConfigForTelegramBot struct {
|
||||
BotToken string `json:"botToken"`
|
||||
DefaultChatId int64 `json:"defaultChatId,omitempty"`
|
||||
BotToken string `json:"botToken"`
|
||||
ChatId int64 `json:"chatId,omitempty"`
|
||||
}
|
||||
|
||||
type AccessConfigForTencentCloud struct {
|
||||
@ -402,12 +402,12 @@ type AccessConfigForWangsu struct {
|
||||
}
|
||||
|
||||
type AccessConfigForWebhook struct {
|
||||
Url string `json:"url"`
|
||||
Method string `json:"method,omitempty"`
|
||||
HeadersString string `json:"headers,omitempty"`
|
||||
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
|
||||
DefaultDataForDeployment string `json:"defaultDataForDeployment,omitempty"`
|
||||
DefaultDataForNotification string `json:"defaultDataForNotification,omitempty"`
|
||||
Url string `json:"url"`
|
||||
Method string `json:"method,omitempty"`
|
||||
HeadersString string `json:"headers,omitempty"`
|
||||
DataStringForDeployment string `json:"dataForDeployment,omitempty"`
|
||||
DataStringForNotification string `json:"dataForNotification,omitempty"`
|
||||
AllowInsecureConnections bool `json:"allowInsecureConnections,omitempty"`
|
||||
}
|
||||
|
||||
type AccessConfigForWeComBot struct {
|
||||
|
||||
@ -53,7 +53,7 @@ func createNotifierProvider(options *notifierProviderOptions) (core.Notifier, er
|
||||
|
||||
return pDiscordBot.NewNotifierProvider(&pDiscordBot.NotifierProviderConfig{
|
||||
BotToken: access.BotToken,
|
||||
ChannelId: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "channelId", access.DefaultChannelId),
|
||||
ChannelId: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "channelId", access.ChannelId),
|
||||
})
|
||||
}
|
||||
|
||||
@ -70,9 +70,9 @@ func createNotifierProvider(options *notifierProviderOptions) (core.Notifier, er
|
||||
SmtpTls: access.SmtpTls,
|
||||
Username: access.Username,
|
||||
Password: access.Password,
|
||||
SenderAddress: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "senderAddress", access.DefaultSenderAddress),
|
||||
SenderName: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "senderName", access.DefaultSenderName),
|
||||
ReceiverAddress: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "receiverAddress", access.DefaultReceiverAddress),
|
||||
SenderAddress: access.SenderAddress,
|
||||
SenderName: access.SenderName,
|
||||
ReceiverAddress: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "receiverAddress", access.ReceiverAddress),
|
||||
})
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ func createNotifierProvider(options *notifierProviderOptions) (core.Notifier, er
|
||||
ServerUrl: access.ServerUrl,
|
||||
Username: access.Username,
|
||||
Password: access.Password,
|
||||
ChannelId: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "channelId", access.DefaultChannelId),
|
||||
ChannelId: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "channelId", access.ChannelId),
|
||||
})
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ func createNotifierProvider(options *notifierProviderOptions) (core.Notifier, er
|
||||
|
||||
return pSlackBot.NewNotifierProvider(&pSlackBot.NotifierProviderConfig{
|
||||
BotToken: access.BotToken,
|
||||
ChannelId: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "channelId", access.DefaultChannelId),
|
||||
ChannelId: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "channelId", access.ChannelId),
|
||||
})
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ func createNotifierProvider(options *notifierProviderOptions) (core.Notifier, er
|
||||
|
||||
return pTelegramBot.NewNotifierProvider(&pTelegramBot.NotifierProviderConfig{
|
||||
BotToken: access.BotToken,
|
||||
ChatId: xmaps.GetOrDefaultInt64(options.ProviderServiceConfig, "chatId", access.DefaultChatId),
|
||||
ChatId: xmaps.GetOrDefaultInt64(options.ProviderServiceConfig, "chatId", access.ChatId),
|
||||
})
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ func createNotifierProvider(options *notifierProviderOptions) (core.Notifier, er
|
||||
|
||||
return pWebhook.NewNotifierProvider(&pWebhook.NotifierProviderConfig{
|
||||
WebhookUrl: access.Url,
|
||||
WebhookData: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "webhookData", access.DefaultDataForNotification),
|
||||
WebhookData: xmaps.GetOrDefaultString(options.ProviderServiceConfig, "webhookData", access.DataStringForNotification),
|
||||
Method: access.Method,
|
||||
Headers: mergedHeaders,
|
||||
AllowInsecureConnections: access.AllowInsecureConnections,
|
||||
|
||||
@ -83,6 +83,89 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
// update collection `access`
|
||||
{
|
||||
collection, err := app.FindCollectionByNameOrId("4yzbv8urny5ja1e")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
records, err := app.FindAllRecords(collection)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, record := range records {
|
||||
changed := false
|
||||
|
||||
provider := record.GetString("provider")
|
||||
config := make(map[string]any)
|
||||
if err := record.UnmarshalJSONField("config", &config); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch provider {
|
||||
case "discordbot", "mattermost", "slackbot":
|
||||
if _, ok := config["defaultChannelId"]; ok {
|
||||
config["channelId"] = config["defaultChannelId"]
|
||||
delete(config, "defaultChannelId")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
|
||||
case "email":
|
||||
if _, ok := config["defaultSenderAddress"]; ok {
|
||||
config["senderAddress"] = config["defaultSenderAddress"]
|
||||
delete(config, "defaultSenderAddress")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
if _, ok := config["defaultSenderName"]; ok {
|
||||
config["senderName"] = config["defaultSenderName"]
|
||||
delete(config, "defaultSenderName")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
if _, ok := config["defaultReceiverAddress"]; ok {
|
||||
config["receiverAddress"] = config["defaultReceiverAddress"]
|
||||
delete(config, "defaultReceiverAddress")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
|
||||
case "telegrambot":
|
||||
if _, ok := config["defaultChatId"]; ok {
|
||||
config["chatId"] = config["defaultChatId"]
|
||||
delete(config, "defaultChatId")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
|
||||
case "webhook":
|
||||
if _, ok := config["defaultDataForDeployment"]; ok {
|
||||
config["dataForDeployment"] = config["defaultDataForDeployment"]
|
||||
delete(config, "defaultDataForDeployment")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
if _, ok := config["defaultDataForNotification"]; ok {
|
||||
config["dataForNotification"] = config["defaultDataForNotification"]
|
||||
delete(config, "defaultDataForNotification")
|
||||
record.Set("config", config)
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
|
||||
if changed {
|
||||
if err := app.Save(record); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tracer.Printf("record #%s in collection '%s' updated", record.Id, collection.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tracer.Printf("done")
|
||||
return nil
|
||||
}, func(app core.App) error {
|
||||
|
||||
@ -29,7 +29,7 @@ const AccessFormDiscordBotConfig = ({ form: formInst, formName, disabled, initia
|
||||
.string(t("access.form.discordbot_token.placeholder"))
|
||||
.min(1, t("access.form.discordbot_token.placeholder"))
|
||||
.max(256, t("common.errmsg.string_max", { max: 256 })),
|
||||
defaultChannelId: z.string().nullish(),
|
||||
channelId: z.string().nullish(),
|
||||
});
|
||||
const formRule = createSchemaFieldRule(formSchema);
|
||||
|
||||
@ -56,12 +56,12 @@ const AccessFormDiscordBotConfig = ({ form: formInst, formName, disabled, initia
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="defaultChannelId"
|
||||
label={t("access.form.discordbot_default_channel_id.label")}
|
||||
name="channelId"
|
||||
label={t("access.form.discordbot_channel_id.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.discordbot_default_channel_id.tooltip") }}></span>}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.discordbot_channel_id.tooltip") }}></span>}
|
||||
>
|
||||
<Input allowClear placeholder={t("access.form.discordbot_default_channel_id.placeholder")} />
|
||||
<Input allowClear placeholder={t("access.form.discordbot_channel_id.placeholder")} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@ -23,6 +23,9 @@ const initFormModel = (): AccessFormEmailConfigFieldValues => {
|
||||
smtpTls: true,
|
||||
username: "",
|
||||
password: "",
|
||||
senderAddress: "",
|
||||
senderName: "",
|
||||
receiverAddress: "",
|
||||
};
|
||||
};
|
||||
|
||||
@ -47,15 +50,9 @@ const AccessFormEmailConfig = ({ form: formInst, formName, disabled, initialValu
|
||||
.string()
|
||||
.min(1, t("access.form.email_password.placeholder"))
|
||||
.max(256, t("common.errmsg.string_max", { max: 256 })),
|
||||
defaultSenderAddress: z
|
||||
.string()
|
||||
.nullish()
|
||||
.refine((v) => {
|
||||
if (!v) return true;
|
||||
return validEmailAddress(v);
|
||||
}, t("common.errmsg.email_invalid")),
|
||||
defaultSenderName: z.string().nullish(),
|
||||
defaultReceiverAddress: z
|
||||
senderAddress: z.email(t("common.errmsg.email_invalid")),
|
||||
senderName: z.string().nullish(),
|
||||
receiverAddress: z
|
||||
.string()
|
||||
.nullish()
|
||||
.refine((v) => {
|
||||
@ -112,16 +109,16 @@ const AccessFormEmailConfig = ({ form: formInst, formName, disabled, initialValu
|
||||
<Input.Password autoComplete="new-password" placeholder={t("access.form.email_password.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="defaultSenderAddress" label={t("access.form.email_default_sender_address.label")} rules={[formRule]}>
|
||||
<Input type="email" allowClear placeholder={t("access.form.email_default_sender_address.placeholder")} />
|
||||
<Form.Item name="senderAddress" label={t("access.form.email_sender_address.label")} rules={[formRule]}>
|
||||
<Input type="email" allowClear placeholder={t("access.form.email_sender_address.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="defaultSenderName" label={t("access.form.email_default_sender_name.label")} rules={[formRule]}>
|
||||
<Input allowClear placeholder={t("access.form.email_default_sender_name.placeholder")} />
|
||||
<Form.Item name="senderName" label={t("access.form.email_sender_name.label")} rules={[formRule]}>
|
||||
<Input allowClear placeholder={t("access.form.email_sender_name.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="defaultReceiverAddress" label={t("access.form.email_default_receiver_address.label")} rules={[formRule]}>
|
||||
<Input type="email" allowClear placeholder={t("access.form.email_default_receiver_address.placeholder")} />
|
||||
<Form.Item name="receiverAddress" label={t("access.form.email_receiver_address.label")} rules={[formRule]}>
|
||||
<Input type="email" allowClear placeholder={t("access.form.email_receiver_address.placeholder")} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@ -30,7 +30,7 @@ const AccessFormMattermostConfig = ({ form: formInst, formName, disabled, initia
|
||||
serverUrl: z.url(t("common.errmsg.url_invalid")),
|
||||
username: z.string().nonempty(t("access.form.mattermost_username.placeholder")),
|
||||
password: z.string().nonempty(t("access.form.mattermost_password.placeholder")),
|
||||
defaultChannelId: z.string().nullish(),
|
||||
channelId: z.string().nullish(),
|
||||
});
|
||||
const formRule = createSchemaFieldRule(formSchema);
|
||||
|
||||
@ -65,12 +65,12 @@ const AccessFormMattermostConfig = ({ form: formInst, formName, disabled, initia
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="defaultChannelId"
|
||||
label={t("access.form.mattermost_default_channel_id.label")}
|
||||
name="channelId"
|
||||
label={t("access.form.mattermost_channel_id.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.mattermost_default_channel_id.tooltip") }}></span>}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.mattermost_channel_id.tooltip") }}></span>}
|
||||
>
|
||||
<Input allowClear placeholder={t("access.form.mattermost_default_channel_id.placeholder")} />
|
||||
<Input allowClear placeholder={t("access.form.mattermost_channel_id.placeholder")} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@ -29,7 +29,7 @@ const AccessFormSlackBotConfig = ({ form: formInst, formName, disabled, initialV
|
||||
.string(t("access.form.slackbot_token.placeholder"))
|
||||
.min(1, t("access.form.slackbot_token.placeholder"))
|
||||
.max(256, t("common.errmsg.string_max", { max: 256 })),
|
||||
defaultChannelId: z.string().nullish(),
|
||||
channelId: z.string().nullish(),
|
||||
});
|
||||
const formRule = createSchemaFieldRule(formSchema);
|
||||
|
||||
@ -56,12 +56,12 @@ const AccessFormSlackBotConfig = ({ form: formInst, formName, disabled, initialV
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="defaultChannelId"
|
||||
label={t("access.form.slackbot_default_channel_id.label")}
|
||||
name="channelId"
|
||||
label={t("access.form.slackbot_channel_id.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.slackbot_default_channel_id.tooltip") }}></span>}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.slackbot_channel_id.tooltip") }}></span>}
|
||||
>
|
||||
<Input allowClear placeholder={t("access.form.slackbot_default_channel_id.placeholder")} />
|
||||
<Input allowClear placeholder={t("access.form.slackbot_channel_id.placeholder")} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@ -29,16 +29,12 @@ const AccessFormTelegramBotConfig = ({ form: formInst, formName, disabled, initi
|
||||
.string(t("access.form.telegrambot_token.placeholder"))
|
||||
.min(1, t("access.form.telegrambot_token.placeholder"))
|
||||
.max(256, t("common.errmsg.string_max", { max: 256 })),
|
||||
defaultChatId: z
|
||||
chatId: z
|
||||
.preprocess(
|
||||
(v) => (v == null || v === "" ? undefined : Number(v)),
|
||||
z
|
||||
.number()
|
||||
.nullish()
|
||||
.refine((v) => {
|
||||
if (v == null || v + "" === "") return true;
|
||||
return !Number.isNaN(+v!) && +v! !== 0;
|
||||
}, t("access.form.telegrambot_default_chat_id.placeholder"))
|
||||
z.number().refine((v) => {
|
||||
return !Number.isNaN(+v!) && +v! !== 0;
|
||||
}, t("access.form.telegrambot_chat_id.placeholder"))
|
||||
)
|
||||
.nullish(),
|
||||
});
|
||||
@ -67,12 +63,12 @@ const AccessFormTelegramBotConfig = ({ form: formInst, formName, disabled, initi
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="defaultChatId"
|
||||
label={t("access.form.telegrambot_default_chat_id.label")}
|
||||
name="chatId"
|
||||
label={t("access.form.telegrambot_chat_id.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.telegrambot_default_chat_id.tooltip") }}></span>}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.telegrambot_chat_id.tooltip") }}></span>}
|
||||
>
|
||||
<Input allowClear placeholder={t("access.form.telegrambot_default_chat_id.placeholder")} />
|
||||
<Input allowClear placeholder={t("access.form.telegrambot_chat_id.placeholder")} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
|
||||
@ -25,7 +25,7 @@ const initFormModel = (): AccessFormWebhookConfigFieldValues => {
|
||||
method: "POST",
|
||||
headers: "Content-Type: application/json",
|
||||
allowInsecureConnections: false,
|
||||
defaultDataForDeployment: JSON.stringify(
|
||||
dataForDeployment: JSON.stringify(
|
||||
{
|
||||
name: "${DOMAINS}",
|
||||
cert: "${CERTIFICATE}",
|
||||
@ -34,7 +34,7 @@ const initFormModel = (): AccessFormWebhookConfigFieldValues => {
|
||||
null,
|
||||
2
|
||||
),
|
||||
defaultDataForNotification: JSON.stringify(
|
||||
dataForNotification: JSON.stringify(
|
||||
{
|
||||
subject: "${SUBJECT}",
|
||||
message: "${MESSAGE}",
|
||||
@ -65,7 +65,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
}
|
||||
return true;
|
||||
}, t("access.form.webhook_headers.errmsg.invalid")),
|
||||
defaultDataForDeployment: z
|
||||
dataForDeployment: z
|
||||
.string()
|
||||
.nullish()
|
||||
.refine((v) => {
|
||||
@ -78,8 +78,8 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}, t("access.form.webhook_default_data.errmsg.json_invalid")),
|
||||
defaultDataForNotification: z
|
||||
}, t("access.form.webhook_data.errmsg.json_invalid")),
|
||||
dataForNotification: z
|
||||
.string()
|
||||
.nullish()
|
||||
.refine((v) => {
|
||||
@ -92,7 +92,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}, t("access.form.webhook_default_data.errmsg.json_invalid")),
|
||||
}, t("access.form.webhook_data.errmsg.json_invalid")),
|
||||
allowInsecureConnections: z.boolean().nullish(),
|
||||
});
|
||||
const formRule = createSchemaFieldRule(formSchema);
|
||||
@ -105,27 +105,27 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
};
|
||||
|
||||
const handleWebhookDataForDeploymentBlur = () => {
|
||||
const value = formInst.getFieldValue("defaultDataForDeployment");
|
||||
const value = formInst.getFieldValue("dataForDeployment");
|
||||
try {
|
||||
const json = JSON.stringify(JSON.parse(value), null, 2);
|
||||
formInst.setFieldValue("defaultDataForDeployment", json);
|
||||
formInst.setFieldValue("dataForDeployment", json);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
const handleWebhookDataForNotificationBlur = () => {
|
||||
const value = formInst.getFieldValue("defaultDataForNotification");
|
||||
const value = formInst.getFieldValue("dataForNotification");
|
||||
try {
|
||||
const json = JSON.stringify(JSON.parse(value), null, 2);
|
||||
formInst.setFieldValue("defaultDataForNotification", json);
|
||||
formInst.setFieldValue("dataForNotification", json);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
const handlePresetDataForDeploymentClick = () => {
|
||||
formInst.setFieldValue("defaultDataForDeployment", initFormModel().defaultDataForDeployment);
|
||||
formInst.setFieldValue("dataForDeployment", initFormModel().dataForDeployment);
|
||||
};
|
||||
|
||||
const handlePresetDataForNotificationClick = (key: string) => {
|
||||
@ -135,7 +135,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json\r\nAuthorization: Bearer <your-gotify-token>");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
title: "${SUBJECT}",
|
||||
@ -153,7 +153,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json\r\nAuthorization: Bearer <your-gotify-token>");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
title: "${SUBJECT}",
|
||||
@ -171,7 +171,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
topic: "<your-ntfy-topic>",
|
||||
@ -190,7 +190,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
token: "<your-pushover-token>",
|
||||
@ -209,7 +209,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
token: "<your-pushplus-token>",
|
||||
@ -227,7 +227,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
title: "${SUBJECT}",
|
||||
@ -244,7 +244,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue(
|
||||
"defaultDataForNotification",
|
||||
"dataForNotification",
|
||||
JSON.stringify(
|
||||
{
|
||||
text: "${SUBJECT}",
|
||||
@ -259,7 +259,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
default:
|
||||
formInst.setFieldValue("method", "POST");
|
||||
formInst.setFieldValue("headers", "Content-Type: application/json");
|
||||
formInst.setFieldValue("defaultDataForNotification", initFormModel().defaultDataForNotification);
|
||||
formInst.setFieldValue("dataForNotification", initFormModel().dataForNotification);
|
||||
break;
|
||||
}
|
||||
};
|
||||
@ -308,7 +308,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
<label className="mb-1 block">
|
||||
<div className="flex w-full items-center justify-between gap-4">
|
||||
<div className="max-w-full grow truncate">
|
||||
<span>{t("access.form.webhook_default_data_for_deployment.label")}</span>
|
||||
<span>{t("access.form.webhook_data_for_deployment.label")}</span>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<Button size="small" type="link" onClick={handlePresetDataForDeploymentClick}>
|
||||
@ -317,20 +317,20 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<Form.Item name="defaultDataForDeployment" rules={[formRule]}>
|
||||
<Form.Item name="dataForDeployment" rules={[formRule]}>
|
||||
<CodeInput
|
||||
height="auto"
|
||||
minHeight="64px"
|
||||
maxHeight="256px"
|
||||
language="json"
|
||||
placeholder={t("access.form.webhook_default_data_for_deployment.placeholder")}
|
||||
placeholder={t("access.form.webhook_data_for_deployment.placeholder")}
|
||||
onBlur={handleWebhookDataForDeploymentBlur}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Alert type="info" message={<span dangerouslySetInnerHTML={{ __html: t("access.form.webhook_default_data_for_deployment.guide") }}></span>} />
|
||||
<Alert type="info" message={<span dangerouslySetInnerHTML={{ __html: t("access.form.webhook_data_for_deployment.guide") }}></span>} />
|
||||
</Form.Item>
|
||||
</Show>
|
||||
|
||||
@ -339,7 +339,7 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
<label className="mb-1 block">
|
||||
<div className="flex w-full items-center justify-between gap-4">
|
||||
<div className="max-w-full grow truncate">
|
||||
<span>{t("access.form.webhook_default_data_for_notification.label")}</span>
|
||||
<span>{t("access.form.webhook_data_for_notification.label")}</span>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<Dropdown
|
||||
@ -360,20 +360,20 @@ const AccessFormWebhookConfig = ({ form: formInst, formName, disabled, initialVa
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<Form.Item name="defaultDataForNotification" rules={[formRule]}>
|
||||
<Form.Item name="dataForNotification" rules={[formRule]}>
|
||||
<CodeInput
|
||||
height="auto"
|
||||
minHeight="64px"
|
||||
maxHeight="256px"
|
||||
language="json"
|
||||
placeholder={t("access.form.webhook_default_data_for_notification.placeholder")}
|
||||
placeholder={t("access.form.webhook_data_for_notification.placeholder")}
|
||||
onBlur={handleWebhookDataForNotificationBlur}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item>
|
||||
<Alert type="info" message={<span dangerouslySetInnerHTML={{ __html: t("access.form.webhook_default_data_for_notification.guide") }}></span>} />
|
||||
<Alert type="info" message={<span dangerouslySetInnerHTML={{ __html: t("access.form.webhook_data_for_notification.guide") }}></span>} />
|
||||
</Form.Item>
|
||||
</Show>
|
||||
|
||||
|
||||
@ -26,14 +26,6 @@ const NotifyNodeConfigFormEmailConfig = ({ form: formInst, formName, disabled, i
|
||||
const { t } = useTranslation();
|
||||
|
||||
const formSchema = z.object({
|
||||
senderAddress: z
|
||||
.string()
|
||||
.nullish()
|
||||
.refine((v) => {
|
||||
if (!v) return true;
|
||||
return validEmailAddress(v);
|
||||
}, t("common.errmsg.email_invalid")),
|
||||
senderName: z.string().nullish(),
|
||||
receiverAddress: z
|
||||
.string()
|
||||
.nullish()
|
||||
@ -57,24 +49,6 @@ const NotifyNodeConfigFormEmailConfig = ({ form: formInst, formName, disabled, i
|
||||
name={formName}
|
||||
onValuesChange={handleFormChange}
|
||||
>
|
||||
<Form.Item
|
||||
name="senderAddress"
|
||||
label={t("workflow_node.notify.form.email_sender_address.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.notify.form.email_sender_address.tooltip") }}></span>}
|
||||
>
|
||||
<Input type="email" allowClear placeholder={t("workflow_node.notify.form.email_sender_address.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="senderName"
|
||||
label={t("workflow_node.notify.form.email_sender_name.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.notify.form.email_sender_name.tooltip") }}></span>}
|
||||
>
|
||||
<Input allowClear placeholder={t("workflow_node.notify.form.email_sender_name.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="receiverAddress"
|
||||
label={t("workflow_node.notify.form.email_receiver_address.label")}
|
||||
|
||||
@ -208,7 +208,7 @@ export type AccessConfigForDingTalkBot = {
|
||||
|
||||
export type AccessConfigForDiscordBot = {
|
||||
botToken: string;
|
||||
defaultChannelId?: string;
|
||||
channelId?: string;
|
||||
};
|
||||
|
||||
export type AccessConfigForDNSLA = {
|
||||
@ -240,8 +240,9 @@ export type AccessConfigForEmail = {
|
||||
smtpTls: boolean;
|
||||
username: string;
|
||||
password: string;
|
||||
defaultSenderAddress?: string;
|
||||
defaultReceiverAddress?: string;
|
||||
senderAddress?: string;
|
||||
senderName?: string;
|
||||
receiverAddress?: string;
|
||||
};
|
||||
|
||||
export type AccessConfigForFlexCDN = {
|
||||
@ -321,7 +322,7 @@ export type AccessConfigForMattermost = {
|
||||
serverUrl: string;
|
||||
username: string;
|
||||
password: string;
|
||||
defaultChannelId?: string;
|
||||
channelId?: string;
|
||||
};
|
||||
|
||||
export type AccessConfigForNamecheap = {
|
||||
@ -394,7 +395,7 @@ export type AccessConfigForSafeLine = {
|
||||
|
||||
export type AccessConfigForSlackBot = {
|
||||
botToken: string;
|
||||
defaultChannelId?: string;
|
||||
channelId?: string;
|
||||
};
|
||||
|
||||
export type AccessConfigForSpaceship = {
|
||||
@ -419,7 +420,7 @@ export type AccessConfigForSSLCom = {
|
||||
|
||||
export type AccessConfigForTelegramBot = {
|
||||
botToken: string;
|
||||
defaultChatId?: number;
|
||||
chatId?: number;
|
||||
};
|
||||
|
||||
export type AccessConfigForTencentCloud = {
|
||||
@ -464,8 +465,8 @@ export type AccessConfigForWebhook = {
|
||||
method: string;
|
||||
headers?: string;
|
||||
allowInsecureConnections?: boolean;
|
||||
defaultDataForDeployment?: string;
|
||||
defaultDataForNotification?: string;
|
||||
dataForDeployment?: string;
|
||||
dataForNotification?: string;
|
||||
};
|
||||
|
||||
export type AccessConfigForWeComBot = {
|
||||
|
||||
@ -183,9 +183,9 @@
|
||||
"access.form.discordbot_token.label": "Discord bot token",
|
||||
"access.form.discordbot_token.placeholder": "Please enter Discord bot token",
|
||||
"access.form.discordbot_token.tooltip": "For more information, see <a href=\"https://docs.discordbotstudio.org/setting-up-dbs/finding-your-bot-token\" target=\"_blank\">https://docs.discordbotstudio.org/setting-up-dbs/finding-your-bot-token</a>",
|
||||
"access.form.discordbot_default_channel_id.label": "Default Discord channel ID (Optional)",
|
||||
"access.form.discordbot_default_channel_id.placeholder": "Please enter default Discord channel ID",
|
||||
"access.form.discordbot_default_channel_id.tooltip": "For more information, see <a href=\"https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID\" target=\"_blank\">https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID</a>",
|
||||
"access.form.discordbot_channel_id.label": "Discord channel ID (Optional)",
|
||||
"access.form.discordbot_channel_id.placeholder": "Please enter the default Discord channel ID (can be overrided in the workflows)",
|
||||
"access.form.discordbot_channel_id.tooltip": "For more information, see <a href=\"https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID\" target=\"_blank\">https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID</a>",
|
||||
"access.form.dnsla_api_id.label": "DNS.LA API ID",
|
||||
"access.form.dnsla_api_id.placeholder": "Please enter DNS.LA API ID",
|
||||
"access.form.dnsla_api_id.tooltip": "For more information, see <a href=\"https://www.dns.la/docs/ApiDoc\" target=\"_blank\">https://www.dns.la/docs/ApiDoc</a>",
|
||||
@ -219,12 +219,12 @@
|
||||
"access.form.email_username.placeholder": "please enter username",
|
||||
"access.form.email_password.label": "Password",
|
||||
"access.form.email_password.placeholder": "please enter password",
|
||||
"access.form.email_default_sender_address.label": "Default sender email address (Optional)",
|
||||
"access.form.email_default_sender_address.placeholder": "Please enter default sender email address",
|
||||
"access.form.email_default_sender_name.label": "Default sender display name (Optional)",
|
||||
"access.form.email_default_sender_name.placeholder": "Please enter default sender display name",
|
||||
"access.form.email_default_receiver_address.label": "Default receiver email address (Optional)",
|
||||
"access.form.email_default_receiver_address.placeholder": "Please enter default receiver email address",
|
||||
"access.form.email_sender_address.label": "Sender email address",
|
||||
"access.form.email_sender_address.placeholder": "Please enter sender email address",
|
||||
"access.form.email_sender_name.label": "Sender display name (Optional)",
|
||||
"access.form.email_sender_name.placeholder": "Please enter sender display name",
|
||||
"access.form.email_receiver_address.label": "Receiver email address (Optional)",
|
||||
"access.form.email_receiver_address.placeholder": "Please enter the default receiver email address (can be overrided in the workflows)",
|
||||
"access.form.flexcdn_server_url.label": "FlexCDN server URL",
|
||||
"access.form.flexcdn_server_url.placeholder": "Please enter FlexCDN server URL",
|
||||
"access.form.flexcdn_api_role.label": "FlexCDN user role",
|
||||
@ -317,9 +317,9 @@
|
||||
"access.form.mattermost_username.placeholder": "Please enter Mattermost username",
|
||||
"access.form.mattermost_password.label": "Mattermost password",
|
||||
"access.form.mattermost_password.placeholder": "Please enter Mattermost password",
|
||||
"access.form.mattermost_default_channel_id.label": "Default Mattermost channel ID (Optional)",
|
||||
"access.form.mattermost_default_channel_id.placeholder": "Please enter default Mattermost channel ID",
|
||||
"access.form.mattermost_default_channel_id.tooltip": "How to get it? Select the target channel from the left sidebar, click on the channel name at the top, and choose ”Channel Details.” You can directly see the channel ID on the pop-up page.",
|
||||
"access.form.mattermost_channel_id.label": "Mattermost channel ID (Optional)",
|
||||
"access.form.mattermost_channel_id.placeholder": "Please enter the default Mattermost channel ID (can be overrided in the workflows)",
|
||||
"access.form.mattermost_channel_id.tooltip": "How to get it? Select the target channel from the left sidebar, click on the channel name at the top, and choose ”Channel Details.” You can directly see the channel ID on the pop-up page.",
|
||||
"access.form.namecheap_username.label": "Namecheap username",
|
||||
"access.form.namecheap_username.placeholder": "Please enter Namecheap username",
|
||||
"access.form.namecheap_username.tooltip": "For more information, see <a href=\"https://www.namecheap.com/support/api/intro/\" target=\"_blank\">https://www.namecheap.com/support/api/intro/</a>",
|
||||
@ -394,9 +394,9 @@
|
||||
"access.form.slackbot_token.label": "Slack bot token",
|
||||
"access.form.slackbot_token.placeholder": "Please enter Slack bot token",
|
||||
"access.form.slackbot_token.tooltip": "For more information, see <a href=\"https://docs.slack.dev/authentication/tokens#bot\" target=\"_blank\">https://docs.slack.dev/authentication/tokens#bot</a>",
|
||||
"access.form.slackbot_default_channel_id.label": "Default Slack channel ID (Optional)",
|
||||
"access.form.slackbot_default_channel_id.placeholder": "Please enter default Slack channel ID",
|
||||
"access.form.slackbot_default_channel_id.tooltip": "How to get it? Please refer to <a href=\"https://www.youtube.com/watch?v=Uz5Yi5C2pwQ\" target=\"_blank\">https://www.youtube.com/watch?v=Uz5Yi5C2pwQ</a>",
|
||||
"access.form.slackbot_channel_id.label": "Slack channel ID (Optional)",
|
||||
"access.form.slackbot_channel_id.placeholder": "Please enter the default Slack channel ID (can be overrided in the workflows)",
|
||||
"access.form.slackbot_channel_id.tooltip": "How to get it? Please refer to <a href=\"https://www.youtube.com/watch?v=Uz5Yi5C2pwQ\" target=\"_blank\">https://www.youtube.com/watch?v=Uz5Yi5C2pwQ</a>",
|
||||
"access.form.spaceship_api_key.label": "Spaceship API key",
|
||||
"access.form.spaceship_api_key.placeholder": "Please enter Spaceship API key",
|
||||
"access.form.spaceship_api_key.tooltip": "For more information, see <a href=\"https://www.spaceship.com/application/api-manager/\" target=\"_blank\">https://www.spaceship.com/application/api-manager/</a>",
|
||||
@ -433,9 +433,9 @@
|
||||
"access.form.telegrambot_token.label": "Telegram bot token",
|
||||
"access.form.telegrambot_token.placeholder": "Please enter Telegram bot token",
|
||||
"access.form.telegrambot_token.tooltip": "How to get it? Please refer to <a href=\"https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\" target=\"_blank\">https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a</a>",
|
||||
"access.form.telegrambot_default_chat_id.label": "Default Telegram chat ID (Optional)",
|
||||
"access.form.telegrambot_default_chat_id.placeholder": "Please enter default Telegram chat ID",
|
||||
"access.form.telegrambot_default_chat_id.tooltip": "How to get it? Please refer to <a href=\"https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\" target=\"_blank\">https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a</a>",
|
||||
"access.form.telegrambot_chat_id.label": "Telegram chat ID (Optional)",
|
||||
"access.form.telegrambot_chat_id.placeholder": "Please enter the default Telegram chat ID (can be overrided in the workflows)",
|
||||
"access.form.telegrambot_chat_id.tooltip": "How to get it? Please refer to <a href=\"https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\" target=\"_blank\">https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a</a>",
|
||||
"access.form.tencentcloud_secret_id.label": "Tencent Cloud SecretId",
|
||||
"access.form.tencentcloud_secret_id.placeholder": "Please enter Tencent Cloud SecretId",
|
||||
"access.form.tencentcloud_secret_id.tooltip": "For more information, see <a href=\"https://www.tencentcloud.com/zh/document/product/598/34228\" target=\"_blank\">https://www.tencentcloud.com/zh/document/product/598/34228</a>",
|
||||
@ -490,13 +490,13 @@
|
||||
"access.form.webhook_headers.placeholder": "Please enter Webhook request headers",
|
||||
"access.form.webhook_headers.errmsg.invalid": "Please enter a valid request headers",
|
||||
"access.form.webhook_headers.tooltip": "Format: <br><i>key1: val2<br>key2: val2</i><br><br>Example: <br><i>Content-Type: application/json<br>User-Agent: certimate</i>",
|
||||
"access.form.webhook_default_data.errmsg.json_invalid": "Please enter a valiod JSON string",
|
||||
"access.form.webhook_default_data_for_deployment.label": "Webhook data for deployment (Optional)",
|
||||
"access.form.webhook_default_data_for_deployment.placeholder": "Please enter Webhook data",
|
||||
"access.form.webhook_default_data_for_deployment.guide": "Tips: The Webhook data should be in JSON format. <br><br>The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables: <br><ol style=\"list-style: disc;\"><li><strong>${DOMAIN}</strong>: The primary domain of the certificate (<i>CommonName</i>).</li><li><strong>${DOMAINS}</strong>: The domain list of the certificate (<i>SubjectAltNames</i>).</li><li><strong>${CERTIFICATE}</strong>: The PEM format content of the certificate file.</li><li><strong>${SERVER_CERTIFICATE}</strong>: The PEM format content of the server certificate file.</li><li><strong>${INTERMEDIA_CERTIFICATE}</strong>: The PEM format content of the intermediate CA certificate file.</li><li><strong>${PRIVATE_KEY}</strong>: The PEM format content of the private key file.</li></ol><br>When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats: <br><ol style=\"list-style: disc;\"><li>application/json (default).</li><li>application/x-www-form-urlencoded: Nested data is not supported.</li><li>multipart/form-data: Nested data is not supported.</li>",
|
||||
"access.form.webhook_default_data_for_notification.label": "Webhook data for notification (Optional)",
|
||||
"access.form.webhook_default_data_for_notification.placeholder": "Please enter Webhook data",
|
||||
"access.form.webhook_default_data_for_notification.guide": "Tips: The Webhook data should be in JSON format. <br><br>The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables: <br><ol style=\"list-style: disc;\"><li><strong>${SUBJECT}</strong>: The subject of notification.</li><li><strong>${MESSAGE}</strong>: The message of notification.</li></ol><br>When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats: <br><ol style=\"list-style: disc;\"><li>application/json (default).</li><li>application/x-www-form-urlencoded: Nested data is not supported.</li><li>multipart/form-data: Nested data is not supported.</li>",
|
||||
"access.form.webhook_data.errmsg.json_invalid": "Please enter a valiod JSON string",
|
||||
"access.form.webhook_data_for_deployment.label": "Webhook data for deployment (Optional)",
|
||||
"access.form.webhook_data_for_deployment.placeholder": "Please enter the default Webhook data (can be overrided in the workflows)",
|
||||
"access.form.webhook_data_for_deployment.guide": "Tips: The Webhook data should be in JSON format. <br><br>The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables: <br><ol style=\"list-style: disc;\"><li><strong>${DOMAIN}</strong>: The primary domain of the certificate (<i>CommonName</i>).</li><li><strong>${DOMAINS}</strong>: The domain list of the certificate (<i>SubjectAltNames</i>).</li><li><strong>${CERTIFICATE}</strong>: The PEM format content of the certificate file.</li><li><strong>${SERVER_CERTIFICATE}</strong>: The PEM format content of the server certificate file.</li><li><strong>${INTERMEDIA_CERTIFICATE}</strong>: The PEM format content of the intermediate CA certificate file.</li><li><strong>${PRIVATE_KEY}</strong>: The PEM format content of the private key file.</li></ol><br>When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats: <br><ol style=\"list-style: disc;\"><li>application/json (default).</li><li>application/x-www-form-urlencoded: Nested data is not supported.</li><li>multipart/form-data: Nested data is not supported.</li>",
|
||||
"access.form.webhook_data_for_notification.label": "Webhook data for notification (Optional)",
|
||||
"access.form.webhook_data_for_notification.placeholder": "Please enter the default Webhook data (can be overrided in the workflows)",
|
||||
"access.form.webhook_data_for_notification.guide": "Tips: The Webhook data should be in JSON format. <br><br>The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables: <br><ol style=\"list-style: disc;\"><li><strong>${SUBJECT}</strong>: The subject of notification.</li><li><strong>${MESSAGE}</strong>: The message of notification.</li></ol><br>When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats: <br><ol style=\"list-style: disc;\"><li>application/json (default).</li><li>application/x-www-form-urlencoded: Nested data is not supported.</li><li>multipart/form-data: Nested data is not supported.</li>",
|
||||
"access.form.webhook_preset_data.button": "Use preset template",
|
||||
"access.form.webhook_preset_data.option.bark.label": "Bark",
|
||||
"access.form.webhook_preset_data.option.gotify.label": "Gotify",
|
||||
|
||||
@ -962,12 +962,6 @@
|
||||
"workflow_node.notify.form.discordbot_channel_id.label": "Discord channel ID (Optional)",
|
||||
"workflow_node.notify.form.discordbot_channel_id.placeholder": "Please enter Discord channel ID to override the default value",
|
||||
"workflow_node.notify.form.discordbot_channel_id.tooltip": "Leave it blank to use the default channel ID provided by the credential.",
|
||||
"workflow_node.notify.form.email_sender_address.label": "Sender email address (Optional)",
|
||||
"workflow_node.notify.form.email_sender_address.placeholder": "Please enter sender email address to override the default value",
|
||||
"workflow_node.notify.form.email_sender_address.tooltip": "Leave it blank to use the default sender email address provided by the credential.",
|
||||
"workflow_node.notify.form.email_sender_name.label": "Sender display name (Optional)",
|
||||
"workflow_node.notify.form.email_sender_name.placeholder": "Please enter sender display name to override the default value",
|
||||
"workflow_node.notify.form.email_sender_name.tooltip": "Leave it blank to use the default sender display name provided by the credential.",
|
||||
"workflow_node.notify.form.email_receiver_address.label": "Receiver email address (Optional)",
|
||||
"workflow_node.notify.form.email_receiver_address.placeholder": "Please enter receiver email address to override the default value",
|
||||
"workflow_node.notify.form.email_receiver_address.tooltip": "Leave it blank to use the default receiver email address provided by the selected credential.",
|
||||
|
||||
@ -182,9 +182,9 @@
|
||||
"access.form.discordbot_token.label": "Discord 机器人 API Token",
|
||||
"access.form.discordbot_token.placeholder": "请输入 Discord 机器人 API Token",
|
||||
"access.form.discordbot_token.tooltip": "这是什么?请参阅 <a href=\"https://docs.discordbotstudio.org/setting-up-dbs/finding-your-bot-token\" target=\"_blank\">https://docs.discordbotstudio.org/setting-up-dbs/finding-your-bot-token</a>",
|
||||
"access.form.discordbot_default_channel_id.label": "默认的 Discord 频道 ID(可选)",
|
||||
"access.form.discordbot_default_channel_id.placeholder": "请输入默认的 Discord 频道 ID",
|
||||
"access.form.discordbot_default_channel_id.tooltip": "这是什么?请参阅 <a href=\"https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID\" target=\"_blank\">https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID</a>",
|
||||
"access.form.discordbot_channel_id.label": "Discord 频道 ID(可选)",
|
||||
"access.form.discordbot_channel_id.placeholder": "请输入默认的 Discord 频道 ID(可在工作流中单独设置)",
|
||||
"access.form.discordbot_channel_id.tooltip": "这是什么?请参阅 <a href=\"https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID\" target=\"_blank\">https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID</a>",
|
||||
"access.form.dnsla_api_id.label": "DNS.LA API ID",
|
||||
"access.form.dnsla_api_id.placeholder": "请输入 DNS.LA API ID",
|
||||
"access.form.dnsla_api_id.tooltip": "这是什么?请参阅 <a href=\"https://www.dns.la/docs/ApiDoc\" target=\"_blank\">https://www.dns.la/docs/ApiDoc</a>",
|
||||
@ -218,12 +218,12 @@
|
||||
"access.form.email_username.placeholder": "请输入用户名",
|
||||
"access.form.email_password.label": "密码",
|
||||
"access.form.email_password.placeholder": "请输入密码",
|
||||
"access.form.email_default_sender_address.label": "默认的发件人邮箱(可选)",
|
||||
"access.form.email_default_sender_address.placeholder": "请输入默认的发件人邮箱",
|
||||
"access.form.email_default_sender_name.label": "默认的发件人名称(可选)",
|
||||
"access.form.email_default_sender_name.placeholder": "请输入默认的发件人名称",
|
||||
"access.form.email_default_receiver_address.label": "默认的收件人邮箱(可选)",
|
||||
"access.form.email_default_receiver_address.placeholder": "请输入默认的收件人邮箱",
|
||||
"access.form.email_sender_address.label": "发件人邮箱",
|
||||
"access.form.email_sender_address.placeholder": "请输入发件人邮箱",
|
||||
"access.form.email_sender_name.label": "发件人名称(可选)",
|
||||
"access.form.email_sender_name.placeholder": "请输入发件人名称",
|
||||
"access.form.email_receiver_address.label": "收件人邮箱(可选)",
|
||||
"access.form.email_receiver_address.placeholder": "请输入默认的收件人邮箱(可在工作流中单独设置)",
|
||||
"access.form.flexcdn_server_url.label": "FlexCDN 服务地址",
|
||||
"access.form.flexcdn_server_url.placeholder": "请输入 FlexCDN 服务地址",
|
||||
"access.form.flexcdn_api_role.label": "FlexCDN 用户角色",
|
||||
@ -316,9 +316,9 @@
|
||||
"access.form.mattermost_username.placeholder": "请输入 Mattermost 用户名",
|
||||
"access.form.mattermost_password.label": "Mattermost 密码",
|
||||
"access.form.mattermost_password.placeholder": "请输入 Mattermost 密码",
|
||||
"access.form.mattermost_default_channel_id.label": "默认的 Mattermost 频道 ID(可选)",
|
||||
"access.form.mattermost_default_channel_id.placeholder": "请输入默认的 Mattermost 频道 ID",
|
||||
"access.form.mattermost_default_channel_id.tooltip": "如何获取此参数?从左侧边栏中选择目标频道,点击顶部的频道名称,选择“频道详情”,即可在弹出页面中直接看到频道 ID。",
|
||||
"access.form.mattermost_channel_id.label": "Mattermost 频道 ID(可选)",
|
||||
"access.form.mattermost_channel_id.placeholder": "请输入默认的 Mattermost 频道 ID(可在工作流中单独设置)",
|
||||
"access.form.mattermost_channel_id.tooltip": "如何获取此参数?从左侧边栏中选择目标频道,点击顶部的频道名称,选择“频道详情”,即可在弹出页面中直接看到频道 ID。",
|
||||
"access.form.namecheap_username.label": "Namecheap 用户名",
|
||||
"access.form.namecheap_username.placeholder": "请输入 Namecheap 用户名",
|
||||
"access.form.namecheap_username.tooltip": "这是什么?请参阅 <a href=\"https://www.namecheap.com/support/api/intro/\" target=\"_blank\">https://www.namecheap.com/support/api/intro/</a>",
|
||||
@ -393,9 +393,9 @@
|
||||
"access.form.slackbot_token.label": "Slack 机器人 Token",
|
||||
"access.form.slackbot_token.placeholder": "请输入 Slack 机器人 Token",
|
||||
"access.form.slackbot_token.tooltip": "这是什么?请参阅 <a href=\"https://docs.slack.dev/authentication/tokens#bot\" target=\"_blank\">https://docs.slack.dev/authentication/tokens#bot</a>",
|
||||
"access.form.slackbot_default_channel_id.label": "默认的 Slack 频道 ID(可选)",
|
||||
"access.form.slackbot_default_channel_id.placeholder": "请输入默认的 Slack 频道 ID",
|
||||
"access.form.slackbot_default_channel_id.tooltip": "如何获取此参数?请参阅 <a href=\"https://www.youtube.com/watch?v=Uz5Yi5C2pwQ\" target=\"_blank\">https://www.youtube.com/watch?v=Uz5Yi5C2pwQ</a>",
|
||||
"access.form.slackbot_channel_id.label": "Slack 频道 ID(可选)",
|
||||
"access.form.slackbot_channel_id.placeholder": "请输入默认的 Slack 频道 ID(可在工作流中单独设置)",
|
||||
"access.form.slackbot_channel_id.tooltip": "如何获取此参数?请参阅 <a href=\"https://www.youtube.com/watch?v=Uz5Yi5C2pwQ\" target=\"_blank\">https://www.youtube.com/watch?v=Uz5Yi5C2pwQ</a>",
|
||||
"access.form.spaceship_api_key.label": "Spaceship API Key",
|
||||
"access.form.spaceship_api_key.placeholder": "请输入 Spaceship API Key",
|
||||
"access.form.spaceship_api_key.tooltip": "这是什么?请参阅 <a href=\"https://www.spaceship.com/application/api-manager/\" target=\"_blank\">https://www.spaceship.com/application/api-manager/</a>",
|
||||
@ -432,9 +432,9 @@
|
||||
"access.form.telegrambot_token.label": "Telegram 机器人 API Token",
|
||||
"access.form.telegrambot_token.placeholder": "请输入 Telegram 机器人 API Token",
|
||||
"access.form.telegrambot_token.tooltip": "如何获取此参数?请参阅 <a href=\"https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\" target=\"_blank\">https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a</a>",
|
||||
"access.form.telegrambot_default_chat_id.label": "默认的 Telegram 会话 ID(可选)",
|
||||
"access.form.telegrambot_default_chat_id.placeholder": "请输入默认的 Telegram 会话 ID",
|
||||
"access.form.telegrambot_default_chat_id.tooltip": "如何获取此参数?请参阅 <a href=\"https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\" target=\"_blank\">https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a</a>",
|
||||
"access.form.telegrambot_chat_id.label": "Telegram 会话 ID(可选)",
|
||||
"access.form.telegrambot_chat_id.placeholder": "请输入默认的 Telegram 会话 ID(可在工作流中单独设置)",
|
||||
"access.form.telegrambot_chat_id.tooltip": "如何获取此参数?请参阅 <a href=\"https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a\" target=\"_blank\">https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a</a>",
|
||||
"access.form.tencentcloud_secret_id.label": "腾讯云 SecretId",
|
||||
"access.form.tencentcloud_secret_id.placeholder": "请输入腾讯云 SecretId",
|
||||
"access.form.tencentcloud_secret_id.tooltip": "这是什么?请参阅 <a href=\"https://cloud.tencent.com/document/product/598/40488\" target=\"_blank\">https://cloud.tencent.com/document/product/598/40488</a>",
|
||||
@ -489,13 +489,13 @@
|
||||
"access.form.webhook_headers.placeholder": "请输入 Webhook 请求标头",
|
||||
"access.form.webhook_headers.errmsg.invalid": "请输入有效的请求标头",
|
||||
"access.form.webhook_headers.tooltip": "格式:<br><i>key1: val2<br>key2: val2</i><br><br>示例:<br><i>Content-Type: application/json<br>User-Agent: certimate</i>",
|
||||
"access.form.webhook_default_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串",
|
||||
"access.form.webhook_default_data_for_deployment.label": "默认的 Webhook 部署证书回调数据(可选)",
|
||||
"access.form.webhook_default_data_for_deployment.placeholder": "请输入默认的 Webhook 回调数据",
|
||||
"access.form.webhook_default_data_for_deployment.guide": "小贴士:回调数据是一个 JSON 格式的数据。<br><br>其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:<br><ol style=\"list-style: disc;\"><li><strong>${DOMAIN}</strong>:证书的主域名(即 <i>CommonName</i>)。</li><li><strong>${DOMAINS}</strong>:证书的多域名列表(即 <i>SubjectAltNames</i>)。</li><li><strong>${CERTIFICATE}</strong>:证书文件 PEM 格式内容。</li><li><strong>${SERVER_CERTIFICATE}</strong>:证书文件(仅含服务器证书)PEM 格式内容。</li><li><strong>${INTERMEDIA_CERTIFICATE}</strong>:证书文件(仅含中间证书)PEM 格式内容。</li><li><strong>${PRIVATE_KEY}</strong>:私钥文件 PEM 格式内容。</li></ol><br>当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:<br><ol style=\"list-style: disc;\"><li>application/json(默认)。</li><li>application/x-www-form-urlencoded:不支持嵌套数据。</li><li>multipart/form-data:不支持嵌套数据。</li>",
|
||||
"access.form.webhook_default_data_for_notification.label": "默认的 Webhook 推送通知回调数据(可选)",
|
||||
"access.form.webhook_default_data_for_notification.placeholder": "请输入默认的 Webhook 回调数据",
|
||||
"access.form.webhook_default_data_for_notification.guide": "小贴士:回调数据是一个 JSON 格式的数据。<br><br>其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:<br><ol style=\"list-style: disc;\"><li><strong>${SUBJECT}</strong>:通知主题。</li><li><strong>${MESSAGE}</strong>:通知内容。</ol><br>当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:<br><ol style=\"list-style: disc;\"><li>application/json(默认)。</li><li>application/x-www-form-urlencoded:不支持嵌套数据。</li><li>multipart/form-data:不支持嵌套数据。</li>",
|
||||
"access.form.webhook_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串",
|
||||
"access.form.webhook_data_for_deployment.label": "Webhook 部署证书回调数据(可选)",
|
||||
"access.form.webhook_data_for_deployment.placeholder": "请输入默认的 Webhook 回调数据(可在工作流中单独设置)",
|
||||
"access.form.webhook_data_for_deployment.guide": "小贴士:回调数据是一个 JSON 格式的数据。<br><br>其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:<br><ol style=\"list-style: disc;\"><li><strong>${DOMAIN}</strong>:证书的主域名(即 <i>CommonName</i>)。</li><li><strong>${DOMAINS}</strong>:证书的多域名列表(即 <i>SubjectAltNames</i>)。</li><li><strong>${CERTIFICATE}</strong>:证书文件 PEM 格式内容。</li><li><strong>${SERVER_CERTIFICATE}</strong>:证书文件(仅含服务器证书)PEM 格式内容。</li><li><strong>${INTERMEDIA_CERTIFICATE}</strong>:证书文件(仅含中间证书)PEM 格式内容。</li><li><strong>${PRIVATE_KEY}</strong>:私钥文件 PEM 格式内容。</li></ol><br>当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:<br><ol style=\"list-style: disc;\"><li>application/json(默认)。</li><li>application/x-www-form-urlencoded:不支持嵌套数据。</li><li>multipart/form-data:不支持嵌套数据。</li>",
|
||||
"access.form.webhook_data_for_notification.label": "Webhook 推送通知回调数据(可选)",
|
||||
"access.form.webhook_data_for_notification.placeholder": "请输入默认的 Webhook 回调数据(可在工作流中单独设置)",
|
||||
"access.form.webhook_data_for_notification.guide": "小贴士:回调数据是一个 JSON 格式的数据。<br><br>其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:<br><ol style=\"list-style: disc;\"><li><strong>${SUBJECT}</strong>:通知主题。</li><li><strong>${MESSAGE}</strong>:通知内容。</ol><br>当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:<br><ol style=\"list-style: disc;\"><li>application/json(默认)。</li><li>application/x-www-form-urlencoded:不支持嵌套数据。</li><li>multipart/form-data:不支持嵌套数据。</li>",
|
||||
"access.form.webhook_preset_data.button": "使用预设模板",
|
||||
"access.form.webhook_preset_data.option.bark.label": "Bark",
|
||||
"access.form.webhook_preset_data.option.gotify.label": "Gotify",
|
||||
|
||||
@ -960,12 +960,6 @@
|
||||
"workflow_node.notify.form.discordbot_channel_id.label": "Discord 频道 ID(可选)",
|
||||
"workflow_node.notify.form.discordbot_channel_id.placeholder": "请输入 Discord 频道 ID 以覆盖默认值",
|
||||
"workflow_node.notify.form.discordbot_channel_id.tooltip": "不填写时,将使用所选通知渠道授权的默认频道 ID。",
|
||||
"workflow_node.notify.form.email_sender_address.label": "发件人邮箱(可选)",
|
||||
"workflow_node.notify.form.email_sender_address.placeholder": "请输入发件人邮箱以覆盖默认值",
|
||||
"workflow_node.notify.form.email_sender_address.tooltip": "不填写时,将使用所选通知渠道授权的默认发件人邮箱。",
|
||||
"workflow_node.notify.form.email_sender_name.label": "发件人名称(可选)",
|
||||
"workflow_node.notify.form.email_sender_name.placeholder": "请输入发件人名称以覆盖默认值",
|
||||
"workflow_node.notify.form.email_sender_name.tooltip": "不填写时,将使用所选通知渠道授权的默认发件人名称。",
|
||||
"workflow_node.notify.form.email_receiver_address.label": "收件人邮箱(可选)",
|
||||
"workflow_node.notify.form.email_receiver_address.placeholder": "请输入收件人邮箱以覆盖默认值",
|
||||
"workflow_node.notify.form.email_receiver_address.tooltip": "不填写时,将使用所选通知渠道授权的默认收件人邮箱。",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user