[
https://issues.apache.org/jira/browse/AMBARI-10407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14490359#comment-14490359
]
Hudson commented on AMBARI-10407:
---------------------------------
SUCCESS: Integrated in Ambari-trunk-Commit #2260 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/2260/])
AMBARI-10407. Create API endpoint for widgets. (jaimin:
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2f2e372672e908628de5e0dbd40d0b491bee4eb6)
*
ambari-server/src/main/java/org/apache/ambari/server/api/services/WidgetService.java
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetEntity.java
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntityPK.java
*
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
* ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
*
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog210Test.java
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/WidgetLayoutUserWidgetEntity.java
* ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
*
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/WidgetResourceProviderTest.java
*
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
*
ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java
* ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
> Create API endpoint for widgets
> -------------------------------
>
> Key: AMBARI-10407
> URL: https://issues.apache.org/jira/browse/AMBARI-10407
> Project: Ambari
> Issue Type: Task
> Components: ambari-server
> Affects Versions: 2.1.0
> Reporter: Siddharth Wagle
> Assignee: Ivan Kozlov
> Fix For: 2.1.0
>
> Attachments: AMBARI-10407.patch
>
>
> Request for getting a user created widget instance (private)
> /api/v1/users/jaimin/widgets/NAMENODE_HEAP
> Response
> {code}
> {
> href:
> "http://c6401.ambari.apache.org:8080/api/v1/users/jaimin/widgets/NAMENODE_HEAP",
> cluster_name: "c1",
> widget_name: "NAMENODE_HEAP1",
> widget_type: “GAUGE”,
> display_name: "NameNode Heap",
> service_name: “HDFS”,
> component_name: “NAMENODE”,
> page_names: [“HDFS_SUMMARY”,”DASHBOARD”],
> description: "",
> sharable: true,
> author: “jaimin”,
> metrics: {
> numerator_metric: "jvmMemoryHeapUsed",
> denominator_metric: "jvmMemoryHeapMax"
> },
>
> expression: [{
> name: result,
> template: “${numerator_metric}/${denominator_metric}”
> }],
> properties: {
> “warning_threshold”: 0.9,
> “error_threshold”: 0.7,
> }
> }
> {code}
> NOTE: It should be able to query and get all the widgets that belongs to a
> particular page and either have a specific value for author_name or are
> having sharable set to true. something like following
> {code}
> /api/v1/users?Widgets/sharable=true|Widgets/author=jaimin&page_names=HDFS_SUMMARY&fields=Widgets/*
> {code}
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)