So all the dashboard level metas like updatedTime and all will be available
in the DB level.

That is good and +1 for this.

On Thu, Aug 31, 2017 at 11:05 AM, Nisala Nanayakkara <[email protected]>
wrote:

> Hi Nipuna,
>
> Yes. We do not support authentication and authorization yet in the
> Dashboard Component. Once we do, we are going to maintain a separate table
> for dashboard permissions. So we do not need this information inside
> dashboard JSON. As an example, when there is a request to view a dashboard,
> we can check the whether the user has the permission or not from the
> permission DB and fetch the dashboard from dashboard DB according to the
> permission.
>
> Thanks,
> Nisala
>
> On Thu, Aug 31, 2017 at 10:38 AM, Nipuna Chandradasa <[email protected]>
> wrote:
>
>> +1 for this format.
>>
>> Why are we removing lastUpdatedTime? isn't that important meta for an
>> admin?
>>
>> Are we not yet supporting Autherization for dashboard ( who owns, who can
>> edit or who can view and so on)? I thought those are parts of the dashboard
>> json (not the most secure place but) ...
>>
>> On Wed, Aug 30, 2017 at 5:16 PM, Nisala Nanayakkara <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> We had an off-line discussion regarding this with Suho,Tanya,
>>> SajithR,Lasantha, SajithAR and came up with following structure for
>>> dashboard JSON,
>>>
>>>> {
>>>>     "id": "2",
>>>>     "url": "sampledashboard",
>>>>     "name": "Sample Dashboard",
>>>>     "description": "Lorem ipsum dolor sit amet DAS",
>>>>     "landingPage": "page0",
>>>>     "parentId": "1",
>>>>     "content": {
>>>>         "pages": [
>>>>             {
>>>>                 "id": "page0",
>>>>                 "name": "Page 0",
>>>>                 "content": []
>>>>             },
>>>>             {
>>>>                 "id": "page1",
>>>>                 "name": "Page 1",
>>>>                 "content": [],
>>>>                 "pages": [
>>>>                     {
>>>>                         "id": "page2",
>>>>                         "name": "Page 2",
>>>>                         "content": [],
>>>>                         "pages": [
>>>>                             {
>>>>                                 "id": "page3",
>>>>                                 "name": "Page 3",
>>>>                                 "content": []
>>>>                             }
>>>>                         ]
>>>>                     },
>>>>                     {
>>>>                         "id": "page4",
>>>>                         "name": "Page 4",
>>>>                         "content": []
>>>>                     }
>>>>                 ]
>>>>             }
>>>>         ]
>>>>     }
>>>> }
>>>>
>>> So we keep the pageIds and its content with their hierarchy as in the
>>> above sample dashboard JSON. There are several reasons to follow
>>> above-mentioned approach,
>>>
>>>    - If we follow this we do not need to keep separate mapping between
>>>    pageIds and its attributes
>>>    - Convenience in processing the dashboard JSON, when there is a
>>>    modification or deletion in the pages.
>>>
>>> Moreover, we are going to remove additional attributes which were
>>> introduced in the UUF based dashboard component(version, lastUpdatedTime
>>> and etc) as Tanya mentioned.
>>>
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Wed, Aug 30, 2017 at 8:51 AM, Tanya Madurapperuma <[email protected]>
>>> wrote:
>>>
>>>> Hi Nisala,
>>>>
>>>> First of all I think this mail should go to architecture@ :)
>>>>
>>>> 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",
>>>>>
>>>>> 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 <+94%2071%20818%204439>
>>>> Blog : http://tanyamadurapperuma.blogspot.com
>>>>
>>>
>>>
>>>
>>> --
>>> *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/
>



-- 
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