Feature #5751
closed
Consolidate event class configuration
Added by Pavel Kácha about 5 years ago.
Updated almost 5 years ago.
Category:
Development - Core
Description
Class info is now separated in numerous places - inspector class assignment
configuration, two macros in templates, webpage. It would be nice to have at
least some of the class related info consolidated.
Let's start with configurable folder, within which subfolders (named by
class label) would hold most of the data concerning one class.
- JSON for basic info - description for reporter, web reference, maybe severity
- Babel translations subfolder (we're ok with need for Apache/Flask reload on changes)
- Related Jinja templates/macros for reporter (txt and html)
Later (in following issues) we might address coupling with inspector rules,
templates/coupling with other places of Hawat (like Events search), and/or
consolidation of wiki information.
- Related to Feature #5752: Reporting based on event class knowledge added
About translations for every class in special subfolder vs one translation for all classes in one folder.
Every class separatly pros:
- no need to change installed files with adding own class (compiled mo files)
One subfolder pros:
- macros will probably very similar, so there won't be duplicates in many subfolders
- easier code (doesn't really matter, I have nearly finished version with seperated subfolders)
Opinions?
Another for one subfolder:
- for every class we have just label to translate, maybe will have reference (all links are to czech description without english counterpart) in future, so nearly all classes have just one line in translations
user#543 wrote:
One subfolder pros:
- macros will probably very similar, so there won't be duplicates in many subfolders
Macros cannot be defined once and included/referenced to avoid duplicates?
Just sidenote: on the first glance there is a typo "deault" instead of "default" on a couple of places.
Pavel Kácha wrote:
user#543 wrote:
One subfolder pros:
- macros will probably very similar, so there won't be duplicates in many subfolders
Macros cannot be defined once and included/referenced to avoid duplicates?
Yes, they can, but I meant duplicates of strings in translation files. Columns like count, ip, url and alike will be in nearly all macros even when the rest of macro will be different.
Pavel Kácha wrote:
Just sidenote: on the first glance there is a typo "deault" instead of "default" on a couple of places.
Thank you, fixed.
I'd say let's go with what you have already done (separate translations), unless Mek raises his opinion soon.
- Status changed from New to In Progress
- Target version changed from Backlog to 2.6
I like this approach. Please continue and let me know, when you are ready to deploy your code to development server for testing.
I sent rest of the stuff that we spoke about, so if nobody find any problem, I consider it ready for test.
- To be discussed changed from No to Yes
Looks very well.
Let's make popup bubbles with longer description of column headers.
Also, it it's not too convoluted, let's try feedback as Bootstrap modal, so we are left with plain table, consistently skinnable as the rest of Hawat.
- To be discussed changed from Yes to No
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
- To be discussed changed from No to Yes
What is the status of this issue, do you consider it production ready? We should discuss this on our next meeting. If you are happy with the test results, we could consider it done and proceed to release next version.
Jan Mach wrote:
What is the status of this issue, do you consider it production ready? We should discuss this on our next meeting. If you are happy with the test results, we could consider it done and proceed to release next version.
If nobody has any more requirements and you didn't find any problems than it is ready.
- Related to Task #6127: Document procedures for adding new event class added
(Note to prevent wrong impression: docs is not a requirement for rolling working code to production in my opinion.)
- Status changed from Feedback to Closed
- To be discussed changed from Yes to No
Also available in: Atom
PDF