@nisala - what if we keep the parentId undefined if it is not a
personalized dashboard? then it'll be just one
check[if(dashboard.parentId)] and i think it is more faster. This is just a
suggestion so we don't have to duplicate IDs. Keeping the both IDs are okay
too.  WDYT?



On Tue, Aug 29, 2017 at 1:22 PM, Nipuna Chandradasa <[email protected]>
wrote:

> Yeah +1 for the lasantha's idea. That will make it easy to read the json
> also.
> What are the golden layout level functionality that we are using now?  (
> tabs and containers?)
>
> On Tue, Aug 29, 2017 at 12:06 PM, Lasantha Samarakoon <[email protected]>
> wrote:
>
>> ​IMHO it is better to keep the layout information along with the page
>> contents in the dashboard.json file. Separating those information into
>> another set of files will only complex the entire flow.
>>
>> In order to reduce the bulkiness of the dashboard.json what we can do is
>> remove all the unnecessary GoldenLayout properties from the page
>> configuration section. We can add them at the code level on runtime. Only
>> the limited set of those properties which the users really need to
>> manipulate should goes along with the page content. ​
>>
>> *Lasantha Samarakoon* | Software Engineer
>> WSO2, Inc.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 (71) 214 1576 <+94%2071%20214%201576>
>> Email:  [email protected]
>> Web:    www.wso2.com
>>
>> lean . enterprise . middleware
>>
>> On Tue, Aug 29, 2017 at 11:55 AM, Nisala Nanayakkara <[email protected]>
>> wrote:
>>
>>> Hi Nipuna,
>>>
>>> We do not keep layout information separately in dashboard JSON as in the
>>> previous version. Since layouting is handled by the GoldenLayout framework,
>>> we keep the dashboard content and layouting information in the "content"
>>> object of dashboard JSON. Since this is somewhat bound to the GoldenLayout
>>> framework, it is bit difficult to separate the layout information into a
>>> separate file.
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Tue, Aug 29, 2017 at 10:50 AM, Nipuna Chandradasa <[email protected]>
>>> wrote:
>>>
>>>> Hi Nisala,
>>>>
>>>> In previous dashboard.json we had a problem like we have bulky
>>>> information(ex:- layout) inside the same JSON. So i assume inside the
>>>> content attribute which holds the page contents we are going to keep these
>>>> information? if it Is there's a plan to move these information to a
>>>> separate file?
>>>>
>>>> Other than that i'm +1 for above mentioned JSON format.
>>>>
>>>> Thank you,
>>>>
>>>> On Tue, Aug 29, 2017 at 9:44 AM, Nisala Nanayakkara <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Udara,
>>>>>
>>>>> Please find my comments inline.
>>>>>
>>>>> 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.
>>>>>
>>>>> Yes. we are going to keep an object as mentioned above.
>>>>>
>>>>> Also better if you can explain what is a *page resource URL* so
>>>>> others can understand.
>>>>>
>>>>> It simply means the resource path of the page URL.  Ex:-
>>>>> "page0/page1/page2"
>>>>>
>>>>>     {
>>>>>         "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",
>>>>>
>>>>> Yes. We are going to have a dashboard to dashboard relationship. As an
>>>>> example, if someone personalizes a dashboard and save it, we are going
>>>>> maintain its original dashboard id as the parentId.
>>>>>
>>>>> Thanks,
>>>>> Nisala
>>>>>
>>>>>
>>>>> On Tue, Aug 29, 2017 at 8:37 AM, Udara Rathnayake <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> 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 <[email protected]
>>>>>> > 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
>>>>>>> [email protected]
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> UdaraR <http://bit.ly/udarakr>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Nisala Niroshana Nanayakkara,*
>>>>> Software Engineer
>>>>> Mobile | +94 717600022
>>>>> WSO2 Inc | http://wso2.com/
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Nipuna Marcus
>>>> *Senior Software Engineer*
>>>> WSO2 Inc.
>>>> http://wso2.com/ - "lean . enterprise . middleware"
>>>> Mobile : +94 (0) 713 667906 <+94%2071%20366%207906>
>>>> [email protected]
>>>>
>>>
>>>
>>>
>>> --
>>> *Nisala Niroshana Nanayakkara,*
>>> Software Engineer
>>> Mobile | +94 717600022
>>> WSO2 Inc | http://wso2.com/
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
>
> --
> Nipuna Marcus
> *Senior Software Engineer*
> WSO2 Inc.
> http://wso2.com/ - "lean . enterprise . middleware"
> Mobile : +94 (0) 713 667906 <+94%2071%20366%207906>
> [email protected]
>



-- 
Nipuna Marcus
*Senior Software Engineer*
WSO2 Inc.
http://wso2.com/ - "lean . enterprise . middleware"
Mobile : +94 (0) 713 667906
[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to