mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-06 15:46:25 +00:00
feat(models) Add data models for Custom Home page project - Templates and Modules (#13911)
This commit is contained in:
parent
1c34f96b6d
commit
7457319c0a
@ -0,0 +1,13 @@
|
|||||||
|
namespace com.linkedin.identity
|
||||||
|
|
||||||
|
import com.linkedin.common.Urn
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings related to the home page for a user
|
||||||
|
*/
|
||||||
|
record CorpUserHomePageSettings {
|
||||||
|
/**
|
||||||
|
* The page template that will be rendered in the UI by default for this user
|
||||||
|
*/
|
||||||
|
pageTemplate: Urn
|
||||||
|
}
|
||||||
@ -23,4 +23,9 @@ record CorpUserSettings {
|
|||||||
* Notification settings for a user
|
* Notification settings for a user
|
||||||
*/
|
*/
|
||||||
notificationSettings: optional NotificationSettings
|
notificationSettings: optional NotificationSettings
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings related to the home page for a user
|
||||||
|
*/
|
||||||
|
homePage: optional CorpUserHomePageSettings
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,14 @@
|
|||||||
|
namespace com.linkedin.metadata.key
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Key for a DataHubPageModule
|
||||||
|
*/
|
||||||
|
@Aspect = {
|
||||||
|
"name": "dataHubPageModuleKey",
|
||||||
|
}
|
||||||
|
record DataHubPageModuleKey {
|
||||||
|
/**
|
||||||
|
* Unique id for the module.
|
||||||
|
*/
|
||||||
|
id: string
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
namespace com.linkedin.metadata.key
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Key for a DataHubPageTemplate
|
||||||
|
*/
|
||||||
|
@Aspect = {
|
||||||
|
"name": "dataHubPageTemplateKey",
|
||||||
|
}
|
||||||
|
record DataHubPageTemplateKey {
|
||||||
|
/**
|
||||||
|
* Unique id for the template.
|
||||||
|
*/
|
||||||
|
id: string
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
namespace com.linkedin.module
|
||||||
|
|
||||||
|
import com.linkedin.common.Urn
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The specific parameters stored for a module
|
||||||
|
*/
|
||||||
|
record DataHubPageModuleParams {
|
||||||
|
/**
|
||||||
|
* The params required if the module is type LINK
|
||||||
|
*/
|
||||||
|
linkParams: optional record LinkModuleParams {
|
||||||
|
linkUrn: Urn
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The params required if the module is type RICH_TEXT
|
||||||
|
*/
|
||||||
|
richTextParams: optional record RichTextModuleParams {
|
||||||
|
content: string
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
namespace com.linkedin.module
|
||||||
|
|
||||||
|
import com.linkedin.common.AuditStamp
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main properties of a DataHub page module
|
||||||
|
*/
|
||||||
|
@Aspect = {
|
||||||
|
"name": "dataHubPageModuleProperties"
|
||||||
|
}
|
||||||
|
record DataHubPageModuleProperties {
|
||||||
|
/**
|
||||||
|
* The display name of this module
|
||||||
|
*/
|
||||||
|
name: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of this module - the purpose it serves
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"fieldType": "KEYWORD"
|
||||||
|
}
|
||||||
|
type: DataHubPageModuleType
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about the visibility of this module
|
||||||
|
*/
|
||||||
|
visibility: DataHubPageModuleVisibility
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The specific parameters stored for this module
|
||||||
|
*/
|
||||||
|
params: DataHubPageModuleParams
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Audit stamp for when and by whom this template was created
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"/time": {
|
||||||
|
"fieldType": "DATETIME",
|
||||||
|
"fieldName": "createdAt"
|
||||||
|
},
|
||||||
|
"/actor": {
|
||||||
|
"fieldType": "URN",
|
||||||
|
"fieldName": "createdBy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
created: AuditStamp
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Audit stamp for when and by whom this template was last updated
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"/time": {
|
||||||
|
"fieldType": "DATETIME",
|
||||||
|
"fieldName": "lastModifiedAt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lastModified: AuditStamp
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
namespace com.linkedin.module
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enum containing the types of page modules that there are
|
||||||
|
*/
|
||||||
|
enum DataHubPageModuleType {
|
||||||
|
/**
|
||||||
|
* Link type module
|
||||||
|
*/
|
||||||
|
LINK
|
||||||
|
/**
|
||||||
|
* Module containing rich text to be rendered
|
||||||
|
*/
|
||||||
|
RICH_TEXT
|
||||||
|
/**
|
||||||
|
* A module with a collection of assets
|
||||||
|
*/
|
||||||
|
ASSET_COLLECTION
|
||||||
|
/**
|
||||||
|
* A module displaying a hierarchy to navigate
|
||||||
|
*/
|
||||||
|
HIERARCHY
|
||||||
|
/**
|
||||||
|
* Module displaying assets owned by a user
|
||||||
|
*/
|
||||||
|
OWNED_ASSETS
|
||||||
|
/**
|
||||||
|
* Module displaying assets subscribed to by a given user
|
||||||
|
*/
|
||||||
|
SUBSCRIBED_ASSETS
|
||||||
|
/**
|
||||||
|
* Module displaying the top domains
|
||||||
|
*/
|
||||||
|
DOMAINS
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
namespace com.linkedin.module
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about the visibility of this module
|
||||||
|
*/
|
||||||
|
record DataHubPageModuleVisibility {
|
||||||
|
/**
|
||||||
|
* Audit stamp for when and by whom this module was created
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"fieldType": "KEYWORD"
|
||||||
|
}
|
||||||
|
scope: enum PageModuleScope {
|
||||||
|
/**
|
||||||
|
* This module is used for individual use only
|
||||||
|
*/
|
||||||
|
PERSONAL
|
||||||
|
/**
|
||||||
|
* This module is discoverable and can be used by any user on the platform
|
||||||
|
*/
|
||||||
|
GLOBAL
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
namespace com.linkedin.settings.global
|
||||||
|
|
||||||
|
import com.linkedin.common.Urn
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global settings related to the home page for an instance
|
||||||
|
*/
|
||||||
|
record GlobalHomePageSettings {
|
||||||
|
/**
|
||||||
|
* The urn that will be rendered in the UI by default for all users
|
||||||
|
*/
|
||||||
|
defaultTemplate: Urn
|
||||||
|
}
|
||||||
@ -25,4 +25,9 @@ record GlobalSettingsInfo {
|
|||||||
"enabled": true
|
"enabled": true
|
||||||
"columnPropagationEnabled": true
|
"columnPropagationEnabled": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Global settings related to the home page for an instance
|
||||||
|
*/
|
||||||
|
homePage: optional GlobalHomePageSettings
|
||||||
}
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
namespace com.linkedin.template
|
||||||
|
|
||||||
|
import com.linkedin.common.AuditStamp
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main properties of a DataHub page template
|
||||||
|
*/
|
||||||
|
@Aspect = {
|
||||||
|
"name": "dataHubPageTemplateProperties"
|
||||||
|
}
|
||||||
|
record DataHubPageTemplateProperties {
|
||||||
|
/**
|
||||||
|
* The rows of modules contained in this template
|
||||||
|
*/
|
||||||
|
@Relationship = {
|
||||||
|
"/*/modules/*": {
|
||||||
|
"name": "ContainedIn",
|
||||||
|
"entityTypes": [ "module" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rows: array[DataHubPageTemplateRow]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about the surface area of the product that this template is deployed in
|
||||||
|
*/
|
||||||
|
surface: DataHubPageTemplateSurface
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about the visibility of this template
|
||||||
|
*/
|
||||||
|
visibility: DataHubPageTemplateVisibility
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Audit stamp for when and by whom this template was created
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"/time": {
|
||||||
|
"fieldType": "DATETIME",
|
||||||
|
"fieldName": "createdAt"
|
||||||
|
},
|
||||||
|
"/actor": {
|
||||||
|
"fieldType": "URN",
|
||||||
|
"fieldName": "createdBy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
created: AuditStamp
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Audit stamp for when and by whom this template was last updated
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"/time": {
|
||||||
|
"fieldType": "DATETIME",
|
||||||
|
"fieldName": "lastModifiedAt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lastModified: AuditStamp
|
||||||
|
}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
namespace com.linkedin.template
|
||||||
|
|
||||||
|
import com.linkedin.common.Urn
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A row of modules contained in a template
|
||||||
|
*/
|
||||||
|
record DataHubPageTemplateRow {
|
||||||
|
/**
|
||||||
|
* The modules that exist in this template row
|
||||||
|
*/
|
||||||
|
modules: array[Urn]
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
namespace com.linkedin.template
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about the surface area of the product that this template is deployed in
|
||||||
|
*/
|
||||||
|
record DataHubPageTemplateSurface {
|
||||||
|
/**
|
||||||
|
* Where exactly is this template being used
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"fieldType": "KEYWORD"
|
||||||
|
}
|
||||||
|
surfaceType: enum PageTemplateSurfaceType {
|
||||||
|
/**
|
||||||
|
* This template applies to what to display on the home page for users.
|
||||||
|
*/
|
||||||
|
HOME_PAGE
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
namespace com.linkedin.template
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info about the visibility of this template
|
||||||
|
*/
|
||||||
|
record DataHubPageTemplateVisibility {
|
||||||
|
/**
|
||||||
|
* The scope of this template and who can use/see it
|
||||||
|
*/
|
||||||
|
@Searchable = {
|
||||||
|
"fieldType": "KEYWORD"
|
||||||
|
}
|
||||||
|
scope: enum PageTemplateScope {
|
||||||
|
/**
|
||||||
|
* This template is used for individual use only
|
||||||
|
*/
|
||||||
|
PERSONAL
|
||||||
|
/**
|
||||||
|
* This template is used across users
|
||||||
|
*/
|
||||||
|
GLOBAL
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -679,6 +679,16 @@ entities:
|
|||||||
- formInfo
|
- formInfo
|
||||||
- dynamicFormAssignment
|
- dynamicFormAssignment
|
||||||
- ownership
|
- ownership
|
||||||
|
- name: dataHubPageTemplate
|
||||||
|
category: core
|
||||||
|
keyAspect: dataHubPageTemplateKey
|
||||||
|
aspects:
|
||||||
|
- dataHubPageTemplateProperties
|
||||||
|
- name: dataHubPageModule
|
||||||
|
category: core
|
||||||
|
keyAspect: dataHubPageModuleKey
|
||||||
|
aspects:
|
||||||
|
- dataHubPageModuleProperties
|
||||||
- name: dataHubConnection
|
- name: dataHubConnection
|
||||||
category: internal
|
category: internal
|
||||||
keyAspect: dataHubConnectionKey
|
keyAspect: dataHubConnectionKey
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user