notify: adapt to proxmox_schema changes, use const_format
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
686453a28c
commit
6f1d439f09
@ -9,6 +9,7 @@ exclude.workspace = true
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
|
const_format.workspace = true
|
||||||
handlebars = { workspace = true }
|
handlebars = { workspace = true }
|
||||||
lazy_static.workspace = true
|
lazy_static.workspace = true
|
||||||
lettre = { workspace = true, optional = true }
|
lettre = { workspace = true, optional = true }
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
use regex::Regex;
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
use const_format::concatcp;
|
||||||
|
use regex::Regex;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use proxmox_schema::api_types::COMMENT_SCHEMA;
|
use proxmox_schema::api_types::{COMMENT_SCHEMA, SAFE_ID_REGEX_STR};
|
||||||
use proxmox_schema::{
|
use proxmox_schema::{api, const_regex, ApiStringFormat, Schema, StringSchema, Updater};
|
||||||
api, const_regex, ApiStringFormat, Schema, StringSchema, Updater, SAFE_ID_REGEX_STR,
|
|
||||||
};
|
|
||||||
use proxmox_time::{parse_daily_duration, DailyDuration};
|
use proxmox_time::{parse_daily_duration, DailyDuration};
|
||||||
|
|
||||||
use crate::schema::ENTITY_NAME_SCHEMA;
|
use crate::schema::ENTITY_NAME_SCHEMA;
|
||||||
@ -47,7 +46,7 @@ impl MatchModeOperator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const_regex! {
|
const_regex! {
|
||||||
pub MATCH_FIELD_ENTRY_REGEX = concat!(r"^(?:(exact|regex):)?(", SAFE_ID_REGEX_STR!(), r")=(.*)$");
|
pub MATCH_FIELD_ENTRY_REGEX = concatcp!(r"^(?:(exact|regex):)?(", SAFE_ID_REGEX_STR, r")=(.*)$");
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const MATCH_FIELD_ENTRY_FORMAT: ApiStringFormat =
|
pub const MATCH_FIELD_ENTRY_FORMAT: ApiStringFormat =
|
||||||
|
Loading…
Reference in New Issue
Block a user