[ 
https://issues.apache.org/jira/browse/AMBARI-26650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Himanshu Maurya resolved AMBARI-26650.
--------------------------------------
    Resolution: Abandoned

> Ambari Web React: Add Create Widget wizard for service metrics dashboards
> -------------------------------------------------------------------------
>
>                 Key: AMBARI-26650
>                 URL: https://issues.apache.org/jira/browse/AMBARI-26650
>             Project: Ambari
>          Issue Type: Story
>            Reporter: Himanshu Maurya
>            Assignee: Himanshu Maurya
>            Priority: Major
>             Fix For: 3.1.0
>
>
> h2. Summary
> The React "Modern UI" service metrics page had no way to create custom 
> widgets — the "Create Widget" menu item was a dead placeholder 
> ({{{}onClick=\{() => {}}{}}}), and the "Browse Widgets" flow only let users 
> add pre-existing widgets from the library. The classic Ember UI has always 
> supported building a custom GAUGE/NUMBER/GRAPH/TEMPLATE widget from an 
> arbitrary metric expression via a 3-step wizard. This gap forced users back 
> to the classic UI whenever they needed a widget that didn't already exist in 
> the shared library.
> h2. Changes
>  * Added a new 3-step *Create Widget* wizard 
> ({{{}screens/CreateWidgetWizard/{}}}), built on the existing {{StepWizard}} 
> framework (the same one used by Add Service/Add Host):
>  ** {*}Step 1 — Select Type{*}: choose GAUGE, NUMBER, GRAPH, or TEMPLATE.
>  ** {*}Step 2 — Metrics and Expression{*}: build one or more metric 
> expressions using a cascading Service → Component → Metric/Aggregation 
> picker, operators, and numeric constants; configure type-specific properties 
> (thresholds, display unit, graph type); live preview updates as the 
> expression is built.
>  ** {*}Step 3 — Name and Description{*}: name/description validation, User 
> vs. Cluster sharing scope (with a confirmation prompt when sharing), and save.
>  * The wizard loads the stack's {{metrics_descriptor}} artifact once per 
> session and normalizes it into a per-component metric catalog, including HDFS 
> NameNode HA / federation and YARN ResourceManager HA host-component criteria, 
> and YARN capacity-scheduler queue metric substitution.
>  * On save, the widget is POSTed and automatically attached to the correct 
> widget layout for the service (resolving the active layout, falling back to 
> the service's default layout by convention name), including attaching to both 
> the nameservice-specific and {{_nameservice_all}} layouts for HDFS federation 
> setups.
>  * Added a live widget preview (in the wizard's sidebar) that fetches real 
> point-in-time (or time-series, for GRAPH) metric values and renders them 
> through the existing {{{}GaugeWidgetView{}}}/{{{}GraphWidgetView{}}}/new 
> {{NumberWidgetView}} components, matching what the widget will look like once 
> saved.
>  * Wired the "Create Widget" entry points that previously did nothing or 
> didn't exist:
>  ** Service Metrics page "ACTIONS → Create Widget" menu item and the new "Add 
> Widget" tile (shown both in the empty-widgets state and appended to the 
> populated widget grid).
>  ** Cluster Dashboard "ACTIONS → Create Widget" menu item, shown when the 
> cluster has at least one widget-capable service (HDFS, YARN, HBASE, 
> AMBARI_METRICS).
>  ** Browse Widgets modal's "CREATE WIDGET" button.
>  * Added route {{{}services/:serviceName/widget/create/:stepNumber{}}}, 
> rendered as a modal via the existing {{AddWizardUrlMapping}} router-driven 
> modal pattern, with a cancel-confirmation prompt so in-progress widget data 
> isn't lost accidentally.
>  * {{GaugeWidgetView}} was upgraded to handle out-of-range (overflow) and 
> unavailable/NaN metric values with dedicated visual states, instead of 
> rendering {{"Error"}} as the percentage text.
>  * Added {{Dashboard/models/WidgetType.ts}} defining the 4 widget type tiles 
> (icon, description, applicable properties) shown in step 1, reusing image 
> assets already bundled in the app.
> h2. Impact
> Users can now create custom metric widgets directly from the React UI's 
> service metrics or cluster dashboard pages, without needing to fall back to 
> the classic Ember UI. Existing widget rendering (Gauge/Graph/Number views 
> used elsewhere) also gets more robust handling of missing or out-of-range 
> metric data.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to