Hi Nisala, First of all I think this mail should go to architecture@ :)
On Mon, Aug 28, 2017 at 11:26 PM, Nisala Nanayakkara <nis...@wso2.com> wrote: > Hi all, > > We are in the process of re-writing dashboard component using React. > Currently we have dashboard view component with following features, > > - Dashboard listing (will retrieve the dashboard from the DB and list > down) > - Backend API support for dashboard CRUD activities. > - Dashboard view support (This will retrieve the selected dashboard > from DB and render using Golden Layout) > - Multiple pages support for dashboards (This will introduce multiple > pages at the same level, We need to support hierarchical page support ) > - Internal routing between dashboard listing and dashboard view > > Since we are using the golden layout for layouting, we keep the content of > the each page with respect to page resource url. When we are going to > implement the hierarchical pages support, we are going to process these > page urls and display the hierarchical menu according these page urls. > Please find the sample dashboard json given below, > >> { >> "id": "1", >> "url": "sampledashboard", >> "name": "Sample Dashboard", >> "version": "2.0.0", > > As we don't have versioning support for dashboards any reason for maintaining version info? > >> "description": "Lorem ipsum dolor sit amet DAS", >> "owner": "admin", >> "lastUpdatedBy": "admin", >> "createdTime": 1502820091111, >> "lastUpdatedTime": 1502820091112, > > Could you also explain the usage of lastUpdatedBy, createdTime and lastUpdateTime fields? > >> "isShared": false, > > I don't think we need isShared any more since we don't have a tenancy concept now. We used this attribute earlier to indicate whether a particular dashboard which is in super tenant is shared between other tenants. > >> "parentId": "1", >> "content": [ >> { >> "page0": { >> *content of page0* >> }, >> "page1": { >> *content of page1* >> } >> } >> ] >> } > > > > So we do not keep any mapping between pages and its hierarchy as in the > previous versions of the dashboard component. But we may need to maintain > some additional attributes such as Page title, isHidden and etc wrt page > URL. In that case, I think it is better to maintain a separate mapping > between these attributes and page URLs as in the previous dashboard > component. Please find the sample dashboard json given below. > >> { >> "id": "1", >> "url": "sampledashboard", >> "name": "Sample Dashboard", >> "version": "2.0.0", >> "description": "Lorem ipsum dolor sit amet DAS", >> "owner": "admin", >> "lastUpdatedBy": "admin", >> "createdTime": 1502820091111, >> "lastUpdatedTime": 1502820091112, >> "isShared": false, >> "parentId": "1", >> >> >> >> >> >> >> >> >> >> * "menu": { "page0": { "ishidden": false, >> "title": "Page 0" }, "page1": { "ishidden": >> false, "title": "Page 1" } }*, >> "content": [ >> { >> "page0": {}, >> "page1": {} >> } >> ] >> } >> > I am -1 to have separate menu section since it duplicates certain information and also we don't have lot of meta info to go for a separation. Can't we have page level meta under the page resource url as below? - "content":[ 1. { - "page0":{ - "ishidden":false, - "title":"Page 0", - "content":[ ] }, - "page0/page1":{ - "ishidden":false, - "title":"Page 1", - "content":[ ] } } ] WDYT? Thanks, Tanya > >> Because It will give a clear separation between dashboard content and the > pages’ menu attributes. WDYT? > > Thanks, > Nisala > > -- > *Nisala Niroshana Nanayakkara,* > Software Engineer > Mobile | +94 717600022 > WSO2 Inc | http://wso2.com/ > -- Tanya Madurapperuma Associate Technical Lead, WSO2 Inc. : wso2.com Mobile : +94718184439 Blog : http://tanyamadurapperuma.blogspot.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev