Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

Commit 51f620f

Browse files
committed
ui improvements
1 parent 0b59b75 commit 51f620f

5 files changed

Lines changed: 201 additions & 182 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ src/motorists-poc/target
1717
.settings
1818
target
1919
.classpath
20-
.project
20+
.project
21+
/nbproject/
22+
bin/
23+
.mule

pom.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1515

16-
<app.runtime>4.1.3</app.runtime>
16+
<app.runtime>4.1.5</app.runtime>
1717
<mule.maven.plugin.version>3.1.6</mule.maven.plugin.version>
1818
</properties>
1919

@@ -115,7 +115,19 @@
115115
<version>1.1.1</version>
116116
<classifier>mule-plugin</classifier>
117117
</dependency>
118-
</dependencies>
118+
<dependency>
119+
<groupId>junit</groupId>
120+
<artifactId>junit</artifactId>
121+
<version>4.12</version>
122+
<scope>test</scope>
123+
</dependency>
124+
<dependency>
125+
<groupId>org.hamcrest</groupId>
126+
<artifactId>hamcrest-core</artifactId>
127+
<version>1.3</version>
128+
<scope>test</scope>
129+
</dependency>
130+
</dependencies>
119131

120132
<repositories>
121133
<repository>

src/main/mule/net-tools.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ attributes.requestPath]]></ee:set-variable>
3030
} else {
3131
org.mule.runtime.core.api.util.IOUtils.getResourceAsString(&quot;web&quot; + path, this.getClass());
3232
}</scripting:code>
33-
<scripting:parameters ><![CDATA[#[{path: vars.path}]]]></scripting:parameters>
33+
<scripting:parameters><![CDATA[#[{path: vars.path}]]]></scripting:parameters>
3434
</scripting:execute>
3535
</flow>
36-
<flow name="net-tools-main">
36+
<flow name="ui-css" doc:id="bc50f62f-51f7-4841-955b-014eb52b2976" >
37+
<http:listener doc:name="Listener" doc:id="24f59827-51c3-48d1-abce-18d4143f58f3" config-ref="net-tools-httpListenerConfig" path="/css/*" outputMimeType="text/css"/>
38+
<flow-ref doc:name="Flow Reference" doc:id="4a35a0d4-31a1-4514-a348-a4eb4d089559" name="ui"/>
39+
</flow>
40+
<flow name="net-tools-main">
3741
<http:listener config-ref="net-tools-httpListenerConfig" path="/api/*">
3842
<http:response statusCode="#[vars.httpStatus default 200]">
3943
<http:headers>#[vars.outboundHeaders default {}]</http:headers>
@@ -161,7 +165,7 @@ output application/json
161165
output application/java
162166
import java!com::mulesoft::tool::network::NetworkUtils
163167
---
164-
NetworkUtils::curl(attributes.queryParams.host, attributes.queryParams.port, attributes.queryParams.path)]]></ee:set-payload>
168+
NetworkUtils::curl(attributes.queryParams.url)]]></ee:set-payload>
165169
</ee:message>
166170
</ee:transform>
167171
</flow>

src/main/resources/api/net-tools.raml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,11 @@ securitySchemes:
8282
127.0.0.1
8383
/curl:
8484
get:
85-
description: Runs a curl from the Mule host to the specified resource (ip, path, port)
85+
description: Runs a curl from the Mule host to the specified resource
8686
queryParameters:
87-
host:
88-
description: The domain or ip of the host to traceroute
89-
type: string
90-
path:
91-
description: The path of the resource to be fetched
92-
type: string
93-
port:
94-
description: The port number of host to be tested
95-
type: number
87+
url:
88+
description: Target URL
89+
type: string
9690
responses:
9791
200:
9892
body:

0 commit comments

Comments
 (0)