diff --git a/extensions/vertx-http/deployment/src/test/java/io/quarkus/devui/BuildMetricsTest.java b/extensions/vertx-http/deployment/src/test/java/io/quarkus/devui/BuildMetricsTest.java
index cf8adc6920ba7..7065f94e77e75 100644
--- a/extensions/vertx-http/deployment/src/test/java/io/quarkus/devui/BuildMetricsTest.java
+++ b/extensions/vertx-http/deployment/src/test/java/io/quarkus/devui/BuildMetricsTest.java
@@ -20,14 +20,13 @@ public BuildMetricsTest() {
@Test
public void testGetBuildStepsMetrics() throws Exception {
- JsonNode buildStepsMetricsResponse = super.executeJsonRPCMethod("getBuildStepsMetrics");
+ JsonNode buildStepsMetricsResponse = super.executeJsonRPCMethod("getBuildMetrics");
Assertions.assertNotNull(buildStepsMetricsResponse);
-
int duration = buildStepsMetricsResponse.get("duration").asInt();
Assertions.assertTrue(duration > 0);
- boolean dependencyGraphsIncluded = buildStepsMetricsResponse.get("dependencyGraphs").isObject();
- Assertions.assertTrue(dependencyGraphsIncluded);
+ boolean recordsIncluded = buildStepsMetricsResponse.get("records").isArray();
+ Assertions.assertTrue(recordsIncluded);
}
}
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-build-step-graph.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-build-step-graph.js
new file mode 100644
index 0000000000000..8ad69858f757e
--- /dev/null
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-build-step-graph.js
@@ -0,0 +1,200 @@
+import { LitElement, html, css} from 'lit';
+import { JsonRpc } from 'jsonrpc';
+import 'echarts-force-graph';
+import '@vaadin/button';
+import '@vaadin/checkbox';
+import '@vaadin/checkbox-group';
+import '@vaadin/progress-bar';
+
+/**
+ * This component shows the Build Step Graph
+ */
+export class QwcBuildStepGraph extends LitElement {
+
+ static styles = css`
+ .top-bar {
+ display: flex;
+ align-items: baseline;
+ gap: 20px;
+ padding-left: 20px;
+ justify-content: space-between;
+ padding-right: 20px;
+ }
+
+ .top-bar h4 {
+ color: var(--lumo-contrast-60pct);
+ }
+ `;
+
+ static properties = {
+ stepId: {type: String},
+ extensionName: {type: String}, // TODO: Add 'pane' concept in router to register internal extension pages.
+ _edgeLength: {type: Number, state: true},
+ _dependencyGraph: {state: true},
+ _categories: {state: false},
+ _colors: {state: false},
+ _nodes: {state: true},
+ _links: {state: false},
+ _showSimpleDescription: {state: false}
+ };
+
+ constructor() {
+ super();
+ this.stepId = null;
+ this._dependencyGraph = null;
+ this._categories = ['root' , 'direct dependencies', 'direct dependents'];
+ this._categoriesEnum = ['root' , 'directDependency' , 'directDependent'];
+ this._colors = ['#ee6666', '#5470c6' , '#fac858'];
+ this._edgeLength = 120;
+ this._nodes = null;
+ this._links = null;
+ this._showSimpleDescription = [];
+ }
+
+ connectedCallback() {
+ super.connectedCallback();
+ this.jsonRpc = new JsonRpc(this.extensionName);
+ this._fetchDependencyGraph();
+ }
+
+ _fetchDependencyGraph(){
+ if(this.stepId){
+ this.jsonRpc.getDependencyGraph({buildStepId: this.stepId}).then(jsonRpcResponse => {
+ this._dependencyGraph = jsonRpcResponse.result;
+ this._createNodes();
+ });
+ }
+ }
+
+ _createNodes(){
+ if(this._dependencyGraph){
+
+ let dependencyGraphNodes = this._dependencyGraph.nodes;
+ let dependencyGraphLinks = this._dependencyGraph.links;
+
+ this._links = []
+ this._nodes = []
+ for (var l = 0; l < dependencyGraphLinks.length; l++) {
+ let link = new Object();
+ link.source = dependencyGraphNodes.findIndex(item => item.stepId === dependencyGraphLinks[l].source);
+ link.target = dependencyGraphNodes.findIndex(item => item.stepId === dependencyGraphLinks[l].target);
+ let catindex = this._categoriesEnum.indexOf(dependencyGraphLinks[l].type);
+
+ this._addToNodes(dependencyGraphNodes[link.source],catindex);
+ this._addToNodes(dependencyGraphNodes[link.target],catindex);
+ this._links.push(link);
+ }
+ }
+
+ }
+
+ _addToNodes(dependencyGraphNode, catindex){
+ let newNode = this._createNode(dependencyGraphNode);
+ let index = this._nodes.findIndex(item => item.name === newNode.name);
+ if (index < 0 ) {
+ if(dependencyGraphNode.stepId === this.stepId){
+ newNode.category = 0; // Root
+ }else {
+ newNode.category = catindex;
+ }
+ this._nodes.push(newNode);
+ }
+ }
+
+ _createNode(node){
+ let nodeObject = new Object();
+ if(this._showSimpleDescription.length>0){
+ nodeObject.name = node.simpleName;
+ }else{
+ nodeObject.name = node.stepId;
+ }
+
+ nodeObject.value = 1;
+ nodeObject.id = node.stepId;
+ nodeObject.description = node.simpleName;
+ return nodeObject;
+ }
+
+ render() {
+ if(this.stepId && this._dependencyGraph){
+ return html`${this._renderTopBar()}
+
${record.stepId}
`;
}
+
+ _graphIconRenderer(buildStep){
+ return html`