Skip to content

Commit

Permalink
Merge branch 'main' into test-deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 12, 2024
2 parents 9100bfb + 3ef0747 commit 5de9b01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dashboard/MonitoringNamingStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class MonitoringNamingStrategy {
static isAlarmFriendly(str: string) {
// we do not know the exact pattern yet, but this is a safe approximation
// also, tokens are not allowed in alarm names
return str && !Token.isUnresolved(str) && /^[a-zA-Z0-9\-_]+$/.test(str);
return str && !Token.isUnresolved(str) && /^[a-zA-Z0-9\-_\.]+$/.test(str);
}

private getFallbackAlarmFriendlyName() {
Expand Down
2 changes: 1 addition & 1 deletion test/dashboard/MonitoringNamingStrategy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test("string with comma is not alarm friendly", () => {

test("this string is alarm friendly", () => {
expect(
MonitoringNamingStrategy.isAlarmFriendly("This_is__Valid-Alarm-Name"),
MonitoringNamingStrategy.isAlarmFriendly("This_is__Valid-Alarm.Name"),
).toBeTruthy();
});

Expand Down

0 comments on commit 5de9b01

Please sign in to comment.