-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: logspec section #836
base: main
Are you sure you want to change the base?
Conversation
- Added `children` prop to Section. The children will be showed after all links in a single column instead of two as the links do - Added `contentHandler` function to handle the different types of data that can be showed in a misc section of a details page and also handles special fields like 'log_excerpt' with pattern matching - Added the `getLogspecSection` function that creates the json needed by `SectionGroup` to create the section correctly. It creates a titled subsection for every object in the logpsec field in misc up to depth 2 and Nested objects beyond depth 2 can be viewed through the Json viewer Closes #804
- Created `misc.tsx` utils file containing the miscContentHandler function - Added the content handler function to the misc section as well as logspec section
we need a minimum height so the full screen button doesn't end up floating in the middle of nowhere |
maybe when we have an empty log_exceprt we should show the fallback text |
typeof obj === 'object' && | ||
obj !== null && | ||
!Array.isArray(obj) && | ||
Object.keys(obj).every(key => typeof key === 'string') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
Object keys already return string keys, I don't think objects can have any other type of key, maps can though
@@ -22,7 +22,7 @@ interface ILogSheet { | |||
} | |||
|
|||
export interface IJsonContent { | |||
src?: JSON; | |||
src?: object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Record<string, unknown> | Array<unknown>
functions are object in javascript
children
prop to Section. The children will be showed after all links in a single column instead of two as the links docontentHandler
function to handle the different types of data that can be showed in a misc section of a details page and also handles special fields like 'log_excerpt' with pattern matchinggetLogspecSection
function that creates the json needed bySectionGroup
to create the section correctly. It creates a titled subsection for every object in the logpsec field in misc up to depth 2 and Nested objects beyond depth 2 can be viewed through the Json viewerCloses #804
Visual Reference