我创建像jQuery下拉菜单此。我想在下拉菜单上添加幻灯片效果。同时,如果将鼠标悬停在菜单选项卡上,则子菜单现在已打开,与菜单选项卡相比,看起来好像又上了一步。我需要像滑动 这样。我在这里添加了我的脚本。
function mainmenu() {
jQuery(" #na1").hover(function () {
//alert("hai-2");
jQuery(this).find('#content1').slideDown("fast");
}, function () {
jQuery(this).find('#content1').slideUp("fast");
});
}
$(document).ready(function () {
mainmenu();
});
Run Code Online (Sandbox Code Playgroud)
提前致谢
我想设置警报,以防CloudWatch上的CloudFront发生错误。
在控制台中,我将直接创建一个警报,如果TotalErrorRate大于0 ,它将向我发送电子邮件。
但是现在我想在CloudFormation的yaml模板文件中设置相同的设置。我很难找出相应参数的正确值。我的文件当前如下所示:
# CloudWatch
CloudFrontTotalErrorRateAlarm:
Type: "AWS::CloudWatch::Alarm"
Properties:
ActionsEnabled: Boolean
AlarmActions:
- String
AlarmDescription: "Trigers an alarm if there is any error (e.g. 4xx,5xx)"
AlarmName: "MyApiTotalErrorRate"
ComparisonOperator: GreaterThanThreshold
Dimensions:
- Dimension
EvaluationPeriods: "1"
ExtendedStatistic: String
InsufficientDataActions:
- String
MetricName: TotalErrorRate
Namespace: AWS/CloudFront
OKActions:
- String
Period: 60
Statistic: String
Threshold: 0
TreatMissingData: String
Unit: String
Run Code Online (Sandbox Code Playgroud)
对于某些参数,我可以算出实际值是多少。但是对于其他人,我基本上不知道应该输入什么内容,以便AWS可以在发生错误的情况下向我发送电子邮件。以下参数是缺少的值:
ActionsEnabledAlarmActionsDimensionsExtendedStatisticInsufficientDataActionsOKActionsStatisticTreatMissingDataUnitamazon-web-services aws-cloudformation amazon-cloudwatch amazon-cloudwatch-metrics