Hi Nisala, Assume we have a page2, which is going to be listed under page0>page1. So are we going to have a object like "page0/page1/page2" : {} ? This bit is not clear in the above.
Also better if you can explain what is a *page resource URL* so others can understand. 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", >> "description": "Lorem ipsum dolor sit amet DAS", >> "owner": "admin", >> "lastUpdatedBy": "admin", >> "createdTime": 1502820091111, >> "lastUpdatedTime": 1502820091112, >> "isShared": false, >> "parentId": "1", >> > Also what is the use of parentId here? Are we going to have any dashboard to dashboard relationship? > "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": {} >> } >> ] >> } >> > 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/ > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Regards, UdaraR <http://bit.ly/udarakr>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev