-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3758 from Simpler1/tags
(feat): Tags
- Loading branch information
Showing
27 changed files
with
897 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
-- | ||
-- This adds Tags | ||
-- | ||
|
||
SELECT 'Checking For Tags Table'; | ||
SET @s = (SELECT IF( | ||
(SELECT COUNT(*) | ||
FROM INFORMATION_SCHEMA.TABLES | ||
WHERE table_name = 'Tags' | ||
AND table_schema = DATABASE() | ||
) > 0, | ||
"SELECT 'Tags table exists'", | ||
"CREATE TABLE `Tags` ( | ||
`Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, | ||
`Name` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', | ||
`CreateDate` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
`CreatedBy` int(10) unsigned, | ||
`LastAssignedDate` dateTime, | ||
PRIMARY KEY (`Id`), | ||
UNIQUE(`Name`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" | ||
)); | ||
|
||
PREPARE stmt FROM @s; | ||
EXECUTE stmt; | ||
|
||
SELECT 'Checking For Events_Tags Table'; | ||
SET @s = (SELECT IF( | ||
(SELECT COUNT(*) | ||
FROM INFORMATION_SCHEMA.TABLES | ||
WHERE table_name = 'Events_Tags' | ||
AND table_schema = DATABASE() | ||
) > 0, | ||
"SELECT 'Events_Tags table exists'", | ||
"CREATE TABLE `Events_Tags` ( | ||
`TagId` bigint(20) unsigned NOT NULL, | ||
`EventId` bigint(20) unsigned NOT NULL, | ||
`AssignedDate` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
`AssignedBy` int(10) unsigned, | ||
PRIMARY KEY (`TagId`, `EventId`), | ||
CONSTRAINT `Events_Tags_ibfk_1` FOREIGN KEY (`TagId`) REFERENCES `Tags` (`Id`) ON DELETE CASCADE, | ||
CONSTRAINT `Events_Tags_ibfk_2` FOREIGN KEY (`EventId`) REFERENCES `Events` (`Id`) ON DELETE CASCADE | ||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" | ||
)); | ||
|
||
PREPARE stmt FROM @s; | ||
EXECUTE stmt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ User Guide | |
viewmonitors | ||
filterevents | ||
viewevents | ||
tags | ||
options | ||
cameracontrol | ||
mobile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Tags | ||
==== | ||
|
||
Tags are a simple quick way to categorize events so that you can identify them easier. | ||
|
||
|
||
Creating New Tags | ||
----------------- | ||
Creating new tags is as easy as typing a word in the tags field (located just above the video). Pressing the space bar, comma, or Enter will create the new tag and add it to the event. | ||
|
||
|
||
Adding Existing Tags to an Event | ||
-------------------------------- | ||
Clicking in the tags field will show a dropdown list of all of the available tags in descending order of when they were last added to an event. | ||
|
||
An existing tag can be added to the event by clicking it from the dropdown or by using the down/up arrow keys to highlight the desired tag and pressing Enter. | ||
|
||
<Ctrl-Down Arrow> will add the tag most recently added to any event to the current event. | ||
|
||
Typing in the tags field will filter the available tags to the ones that contain the text typed. | ||
|
||
.. note:: | ||
Since you can use the right/left arrows to move between events when the tags field doesn't have focus, you can quickly add the most recent tag with <Ctrl-Down Arrow> and then move to the next event with Right Arrow. You can also use the Down Arrow to bring up the available tags to add a different tag before pressing the Right Arrow to move to the next event. | ||
|
||
|
||
Removing Tags from an Event | ||
--------------------------- | ||
Pressing the "x" to the right of a tag will remove it from the event. When the tag is removed from the last event, the tag will be deleted from the available tags. | ||
|
||
|
||
Filtering with Tags | ||
=================== | ||
Current Limitations | ||
------------------- | ||
1. Filtering for multiple tags is an OR search (Goal is to make this an AND search) | ||
2. Resulting events only display the tags that were searched (Goal is to display all of the tags on the resulting events) | ||
3. There is no way to search for events that don't have any tag (Goal is to provide search criteria for events with no tag) | ||
4. There is no way to search for events with ONLY the specified tag or tags (Goal is to provide search criteria to search for events with ONLY the specified tag or tags) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.