You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by keval bhatt <kb...@apache.org> on 2017/02/03 14:35:11 UTC
Review Request 56279: ATLAS-1521 : Update UI to eliminate REST calls
to obtain schema data
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56279/
-----------------------------------------------------------
Review request for atlas, Madhan Neethiraj, Suma Shivaprasad, and Vimal Sharma.
Bugs: ATLAS-1521
https://issues.apache.org/jira/browse/ATLAS-1521
Repository: atlas
Description
-------
When rendering entity details page, UI makes a REST API call to /schema/{guid} to obtain the schema data. For entity types that don't support the notion of schema, this REST API call returns an error. When such error is returned, UI does not add 'Schema' tab to the details page. When the call returns data, UI renders the data in 'Schema' tab.
Given that only few entity-types (like hive_table) support schema, most calls to retrieve schema return an error. Having additional schema related information in the type can eliminate the need for unnecessary REST calls. ATLAS-1517 introduces additional data in 'typeDefOptions' attribute of entity-type definition. UI can use the following logic to render the schema tab contents:
# Does an entity-type support schema?
Is {{entityDef.typeDefOptions[schemaElementsAttribute]}} set and its value non empty? If yes, schema is supported else not-supported. For hive_table type, this will be set to 'columns' - as shown below:
"typeDefOptions": {
"schemaElementsAttribute": "columns"
}
# How does UI get the data to display in schema tab?
Value of {{entityDef.typeDefOptions[schemaElementsAttribute]}} will be the name of the attribute in the entity being rendered. This attribute should be of type array. The value of this attribute will have the data needed to render the schema tab
# What are the columns to display in schema tab?
Each element of the array attribute value will hold an entity/struct instance.For example, In case of hive_table, columns attribute will have an array of hive_column objects. From each such element, UI should get value of attributes listed in {{elementDef.typeDefOptions[schemaAttributes]}} to render the schema table. For example, hive_column will have the following:
"typeDefOptions": {
"schemaAttributes": "[\"name\", \"description\", \"owner\", \"type\", \"comment\", \"position\"]"
}
The value will be a json-ified string array.
Diffs
-----
dashboardv2/public/js/main.js 2ba87a7
dashboardv2/public/js/modules/Modal.js 7889fea
dashboardv2/public/js/router/Router.js 7394946
dashboardv2/public/js/views/audit/AuditTableLayoutView.js 2c0bc8c
dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js 330809f
dashboardv2/public/js/views/business_catalog/BusinessCatalogDetailLayoutView.js 6971a3a
dashboardv2/public/js/views/business_catalog/BusinessCatalogHeader.js 7247ac0
dashboardv2/public/js/views/business_catalog/SideNavLayoutView.js 43bdaeb
dashboardv2/public/js/views/business_catalog/TreeLayoutView.js b872e50
dashboardv2/public/js/views/common/aboutAtlas.js 8fff13c
dashboardv2/public/js/views/detail_page/DetailPageLayoutView.js d778e3e
dashboardv2/public/js/views/graph/LineageLayoutView.js 853b0bd
dashboardv2/public/js/views/schema/SchemaLayoutView.js 483b36c
dashboardv2/public/js/views/search/SearchLayoutView.js 958b23b
dashboardv2/public/js/views/tag/TagAttributeDetailLayoutView.js 3cba566
dashboardv2/public/js/views/tag/TagDetailLayoutView.js 3e98755
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js c02600e
dashboardv2/public/js/views/tag/TagLayoutView.js 450866c
dashboardv2/public/js/views/tag/addTagModalView.js 3d00caf
Diff: https://reviews.apache.org/r/56279/diff/
Testing
-------
While testing I observed that column list from entity detail page do not have classification attribute in it. because of that tag is assigned but UI I not able render tag on schema table.
Thanks,
keval bhatt