ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-10102) Create ember data model for widget
Date Tue, 17 Mar 2015 16:51:40 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-10102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365496#comment-14365496
] 

Hudson commented on AMBARI-10102:
---------------------------------

SUCCESS: Integrated in Ambari-trunk-Commit #2057 (See [https://builds.apache.org/job/Ambari-trunk-Commit/2057/])
AMBARI-10102 Create ember data model for widget. (atkach) (atkach: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=72bd502b051a5343bf5ff3987ecbccec22f47ff4)
* ambari-web/test/controllers/main/service/item_test.js
* ambari-web/app/assets/data/widgets/service_widgets.json
* ambari-web/app/controllers/main/service/item.js
* ambari-web/app/views/main/service/item.js
* ambari-web/app/models.js
* ambari-web/app/mappers.js
* ambari-web/app/models/widget.js
* ambari-web/app/mappers/widget_mapper.js
* ambari-web/app/config.js


> Create ember data model for widget
> ----------------------------------
>
>                 Key: AMBARI-10102
>                 URL: https://issues.apache.org/jira/browse/AMBARI-10102
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-web
>    Affects Versions: 2.1.0
>            Reporter: Andrii Tkach
>            Assignee: Andrii Tkach
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-10102.patch
>
>
> As a part of this ticket, create an experimental flag under which poll for the widget
information from the stack while landing on the service summary page for the first time. Since
this is a static information, it is required to be polled just once. This needs to be mapped
to a model as described below
> Example API for HDFS service:
> {code}
> {
>   href: "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/2.2/services/HDFS/artifacts/widget_layout",
>   Artifacts: {
>     artifact_name: "widget_order",
>     service_name: "HDFS",
>     stack_name: "HDP",
>     stack_version: "2.2"
>   },
>  artifact_data: {
>        name: "HDFS",  // This is the serviceName in the ember-data model
>        sections: [ 
>          {
>            name: "HDFS_SUMMARY" // This is the sectionName as described in the below
ember-data model
>            widgets: [
>              {
>                widget_name: “NAMENODE_HEAP”,
>                widget_type: “GAUGE”,
>                component_name: “NAMENODE”,
>                display_name: "NameNode Heap",
>                 expression: [{
>                   template: “${jvmMemoryHeapUsed}/${jvmMemoryHeapMax}”
>                }],
>                properties: {
>                  “warning_threshold”: 0.5,
>                  “error_threshold”:   0.7
>                }
>              }, 
>              {
>                widget_name: "HDFS_BYTES_READ",
>                widget_type: “HEATMAP”,
>                display_name: "HDFS Bytes Read",
>                description: "", 
>                component_name: “DATANODE”,
>                expression: [
>               {
>                template: "${metrics.dfs.datanode.bytes_read}"
>               } 
>            ]
>            properties: {
>              display_unit: "MB",
>              max_limit: "1024"
>            }
>              }      
>            ]
>          }
>        ]  
>      },
>      
>        ]  
>      }
>    ]
>  }  
> }
> {code}
> {code}
> App.Widget = DS.Model.extend({
>   widgetName: DS.attr('string'),
>   defaultOrder: "" // This field is not derived from API but needs to be filled in the
mapper on the client side
>   widgetType: DS.attr('string'),
>   displayName: DS.attr('string'),
>   serviceName: DS.attr('string'),
>   componentName: DS.attr('string'),
>   timeCreated: DS.attr('number'),
>   sectionName: DS.attr('string'), 
>   author: DS.attr('string'),
>   properties: DS.attr('object'),
>   expression: DS.attr('array')
> });
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message