fix: miscellaneous bug fixes

* Fixes a problem with incorrectly scanning and removing pending events
   from the operation log for new installations
 * Fixes a bug with the operation tree incorrectly applying query
   selectors when filtering events
 * Updates tooltips and comments in PlanView and GettingStartedGuide
This commit is contained in:
garethgeorge
2024-05-18 19:44:46 -07:00
parent 1a053f2748
commit df4be0f7bc
17 changed files with 1139 additions and 237 deletions

View File

@@ -27,8 +27,8 @@ func SanitizeID(id string) string {
// It returns an error if the ID contains invalid characters, is empty, or is too long.
// The maxLen parameter is the maximum length of the ID. If maxLen is 0, the ID length is not checked.
func ValidateID(id string, maxLen int) error {
if strings.HasPrefix(id, "__") && strings.HasSuffix(id, "__") {
return errors.New("IDs starting and ending with '__' are reserved by backrest")
if strings.HasPrefix(id, "_") && strings.HasSuffix(id, "_") {
return errors.New("IDs starting and ending with '_' are reserved by backrest")
}
if !idRegex.MatchString(id) {
return ErrInvalidChars