You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Content Converter Plugins can convert log data into HTML or other data formats, to enable richer logs to be presented in the Rundeck GUI when viewing the Execution Output Logs.
9
+
Content Converter plugins transform log output into rich, visual formats for display in the Rundeck GUI. Instead of plain text, you can render logs as HTML tables, charts, JSON viewers, markdown, or custom visualizations.
10
10
11
-
In addition, Content Converters can be chained together in a limited way, allowing one plugin to do the work
12
-
of (say) converting a List of Java Strings into an HTML `<ol>`, while another plugin does the work of converting CSV formatted data
13
-
into a List of Strings. You could add another plugin which can convert log data into a List of Strings, and it would
14
-
also be rendered into a `<ol>` in the final output due to the first plugin.
11
+
**What They Do:**
15
12
16
-
Each Content Converter Plugin can be asked for "Data Types" that it can accept, and also describes the Output "Data Types" that it can produce.
13
+
Convert log data from one format to another:
14
+
-**Input:** Structured data (JSON, XML, CSV, custom formats)
15
+
-**Processing:** Parse, transform, format
16
+
-**Output:** Rich HTML for GUI display
17
17
18
-
A "Data Type" consist of a Java type (class), and a String such as `text/html`.
18
+
**Common Use Cases:**
19
19
20
-
## Behavior
20
+
**Data Visualization:**
21
+
-**JSON → HTML Table** - Display API responses as tables
22
+
-**CSV → HTML Table** - Render CSV output with formatting
23
+
-**Metrics → Charts** - Convert performance data to charts/graphs
24
+
-**Test Results → Dashboard** - Pretty test result displays
21
25
22
-
Content Converter plugins are applied automatically to Log Output when viewing it in the Rundeck GUI.
26
+
**Enhanced Readability:**
27
+
-**Markdown → HTML** - Render markdown in logs
28
+
-**ANSI Colors → HTML** - Convert terminal colors to HTML
29
+
-**XML → Formatted HTML** - Pretty-print XML responses
30
+
-**Log Levels → Icons** - Visual indicators for errors/warnings
23
31
24
-
However, the Log output must have certain metadata entries set for the Log Events. Plain log output will not be
25
-
rendered in any special way (aside from ANSI Color rendering.)
32
+
**Custom Formats:**
33
+
-**Proprietary → Standard** - Convert vendor formats to readable output
@@ -41,18 +177,126 @@ of Commands or Script steps.
41
177
Additional metadata can be passed to the Content Converter plugins. All log metadata entries with keys starting with `content-meta:` will be extracted from the
42
178
Log Event metadata, and the `content-meta:` prefix removed.
43
179
44
-
## Java Plugin Type
180
+
## Java Plugin Implementation
45
181
46
-
Plugins must implement the [ContentConverterPlugin] interface, and declare as a provider of service [`ContentConverter`]({{$javaDocBase}}/com/dtolabs/rundeck/plugins/ServiceNameConstants.html#ContentConverter).
-`boolean isSupportsDataType(Class<?> clazz, String dataType)`: called to detect if the plugin supports the input Data Type.
51
-
-`Class<?> getOutputClassForDataType(Class<?> clazz, String dataType)`: gets the Java Class for the input data type
52
-
-`String getOutputDataTypeForContentDataType(Class<?> clazz, String dataType)`: gets the data type string for the input data type.
53
-
-`Object convert(Object data, String dataType, Map<String,String> metadata)`: Convert the input data type to the output object, includes metadata about the log event as described in [Log Metadata](#log-metadata).
0 commit comments