<commit_before>[[dashboard]]
= Dashboard

[partintro]
--
This section describes how to use the dashboard of Spring Cloud Data Flow.
--



[[dashboard-introduction]]
== Introduction

Spring Cloud Data Flow provides a browser-based GUI called the dashboard to manage the following information:

* *Apps*: The Apps tab lists all available applications and provides the controls to register/unregister them.
* *Runtime*: The Runtime tab provides the list of all running applications.
* *Streams*: The Streams tab lets you list, design, create, deploy, and destroy Stream Definitions.
ifndef::omit-tasks-docs[]
* *Tasks*: The Tasks tab lets you list, create, launch and, destroy Task Definitions.
endif::omit-tasks-docs[]
* *Jobs*: The Jobs tab lets you perform batch job related functions.
* *Analytics*: The Analytics tab lets you create data visualizations for the various analytics applications.

Upon starting Spring Cloud Data Flow, the dashboard is available at:

`http://<host>:<port>/dashboard`

For example, if Spring Cloud Data Flow is running locally, the dashboard is available at `\http://localhost:9393/dashboard`.

If you have enabled https, then the dashboard will be located at `\https://localhost:9393/dashboard`.
If you have enabled security, a login form is available at `\http://localhost:9393/dashboard/#/login`.

NOTE: The default Dashboard server port is `9393`.

The following image shows the opening page of the Spring Cloud Data Flow dashboard:

.The Spring Cloud Data Flow Dashboard
image::{dataflow-asciidoc}/images/dataflow-dashboard-about.png[The Spring Cloud Data Flow Dashboard, scaledwidth="100%"]



[[dashboard-apps]]
== Apps

The Apps section of the dashboard lists all the available applications and provides the controls to register and unregister them (if applicable).
It is possible to import a number of applications at once by using the Bulk Import Applications action.

The following image shows a typical list of available apps within the dashboard:

.List of Available Applications
image::{dataflow-asciidoc}/images/dataflow-available-apps-list.png[List of available applications, scaledwidth="100%"]



=== Bulk Import of Applications

The Bulk Import Applications page provides numerous options for defining and importing a set of applications all at once.
For bulk import, the application definitions are expected to be expressed in a properties style, as follows:

`<type>.<name> = <coordinates>`

The following examples show a typical application definitions:

[source]
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.2.0.RELEASE
processor.transform=maven://org.springframework.cloud.stream.app:transform-processor-rabbit:1.2.0.RELEASE

At the top of the bulk import page, a URI can be specified that points to a properties file stored elsewhere, it should contain properties formatted as shown in the previous example.
Alternatively, by using the textbox labeled "`Apps as Properties`", you can directly list each property string. Finally, if the properties are stored in a local file, the "`Select Properties File`" option opens a local file browser to select the file.
After setting your definitions through one of these routes, click Import.

The following image shows the Bulk Import Applications page:

.Bulk Import Applications
image::{dataflow-asciidoc}/images/dataflow-bulk-import-applications.png[Bulk Import Applications, scaledwidth="100%"]



[[dashboard-runtime]]
== Runtime

The Runtime section of the Dashboard application shows the list of all running applications.
For each runtime app, the state of the deployment and the number of deployed instances is shown.
A list of the used deployment properties is available by clicking on the App Id.

The following image shows an example of the Runtime tab in use:

.List of Running Applications
image::{dataflow-asciidoc}/images/dataflow-runtime.png[List of running applications, scaledwidth="100%"]



[[dashboard-streams]]
== Streams

The Streams tab has two child tabs: Definitions and Create Stream. The following topics describe how to work with each one:

* <<dashboard-stream-definitions>>
* <<dashboard-flo-streams-designer>>



[[dashboard-stream-definitions]]
=== Working with Stream Definitions

The Streams section of the Dashboard includes the Definitions tab that provides a listing of Stream definitions.
There you have the option to deploy or undeploy those stream definitions.
Additionally, you can remove the definition by clicking on Destroy.
Each row includes an arrow on the left, which you can click to see a visual representation of the definition.
Hovering over the boxes in the visual representation shows more details about the apps, including any options passed to them.

In the following screenshot, the `timer` stream has been expanded to show the visual representation:

.List of Stream Definitions
image::{dataflow-asciidoc}/images/dataflow-streams-list-definitions.png[List of Stream Definitions, scaledwidth="100%"]

If you click the details button, the view changes to show a visual representation of that stream and any related streams.
In the preceding example, if you click details for the `timer` stream, the view changes to the following view, which clearly shows the relationship between the three streams (two of them are tapping into the `timer` stream):

.Stream Details Page
image::{dataflow-asciidoc}/images/dataflow-stream-details.png[Stream Details Page, scaledwidth="100%"]



[[dashboard-flo-streams-designer]]
=== Creating a Stream

The Streams section of the Dashboard includes the Create Stream tab, which makes available the https://github.com/spring-projects/spring-flo[Spring Flo] designer: a canvas application that offers an interactive graphical interface for creating data pipelines.

In this tab, you can:

* Create, manage, and visualize stream pipelines using DSL, a graphical canvas, or both
* Write pipelines via DSL with content-assist and auto-complete
* Use auto-adjustment and grid-layout capabilities in the GUI for simpler and interactive organization of pipelines

You should watch this https://www.youtube.com/watch?v=78CgV46OstI[screencast] that highlights some of the "Flo for Spring Cloud Data Flow" capabilities.
The Spring Flo https://github.com/spring-projects/spring-flo/wiki[wiki] includes more detailed content on core Flo capabilities.

The following image shows the Flo designer in use:

.Flo for Spring Cloud Data Flow
image::{dataflow-asciidoc}/images/dataflow-flo-create-stream.png[Flo for Spring Cloud Data Flo, scaledwidth="100%"]

[dashboard-flo-streams-designer-fanin-fanout]]
=== Creating Fan-In/Fan-Out Streams

In chapter <<spring-cloud-dataflow-stream-dsl-fanin-fanout>> you learned how we can support fan-in and fan-out use cases using <<spring-cloud-dataflow-stream-dsl-named-destinations,named destinations>>. The UI provides dedicated support
as well:

.Flo for Spring Cloud Data Flow
image::{dataflow-asciidoc}/images/dataflow-flo-create-stream-fanin-fanout.png[Fan-in and Fan-out example, scaledwidth="100%"]

In this example we have data from an _HTTP Source_ and a _JDBC Source_ that is being to the
_sharedData_ channel (*Fan-in* use case). On the other end we have a _Cassandra Sink_
and a _File Sink_ subscribed to the _sharedData_ channel (*Fan-out* use case).

=== Creating a Tap Stream

Creating Taps using the Dashboard is straightforward.
Let's say you have stream consisting of an _HTTP Source_ and a _File Sink_ and you would like to tap into the stream
to also send data to a _JDBC Sink_.
In order to create the tap stream simply connect the output connector of the _HTTP Source_ to the _JDBC Sink_.
The connection will be displayed as a dotted line, indicating that you created a tap stream.

.Creating a Tap Stream
image::{dataflow-asciidoc}/images/dataflow-flo-create-tap-stream.png[Tap stream example, scaledwidth="100%"]

The primary stream (_HTTP Source_ to _File Sink_) will be automatically named, in case you did not provide a name for the stream, yet.
When creating tap streams, the primary stream must always be explicitly named.
In the picture above, the primary stream was named _HTTP_INGEST_.

Using the Dashboard, you can also switch the primary stream to become the secondary tap stream.

.Change Primary Stream to Secondary Tap Stream
image::{dataflow-asciidoc}/images/dataflow-flo-tap-stream-switch-to-primary-stream.png[Switch tap stream to primary stream, scaledwidth="100%"]

Simply hover over the existing primary stream, the line between _HTTP Source_ and _File Sink_.
Several control icons will appear, and by clicking on the icon labeled _Switch to/from tap_,
you change the primary stream into a tap stream.
Do the same for the tap stream and switch it to a primary stream.

.End Result of Switching the Primary Stream
image::{dataflow-asciidoc}/images/dataflow-flo-tap-stream-switch-to-primary-stream-result.png[End result of switching the tap stream to a primary stream, scaledwidth="100%"]

ifndef::omit-tasks-docs[]
[[dashboard-tasks]]
== Tasks

The Tasks section of the Dashboard currently has three tabs:

* <<dashboard-tasks-apps>>
* <<dashboard-task-definition>>
* <<dashboard-tasks-executions>>

[[dashboard-tasks-apps]]
=== Apps<commit_msg>gh-2030 Clarify use of named destination<commit_after>[[dashboard]]
= Dashboard

[partintro]
--
This section describes how to use the dashboard of Spring Cloud Data Flow.
--



[[dashboard-introduction]]
== Introduction

Spring Cloud Data Flow provides a browser-based GUI called the dashboard to manage the following information:

* *Apps*: The Apps tab lists all available applications and provides the controls to register/unregister them.
* *Runtime*: The Runtime tab provides the list of all running applications.
* *Streams*: The Streams tab lets you list, design, create, deploy, and destroy Stream Definitions.
ifndef::omit-tasks-docs[]
* *Tasks*: The Tasks tab lets you list, create, launch and, destroy Task Definitions.
endif::omit-tasks-docs[]
* *Jobs*: The Jobs tab lets you perform batch job related functions.
* *Analytics*: The Analytics tab lets you create data visualizations for the various analytics applications.

Upon starting Spring Cloud Data Flow, the dashboard is available at:

`http://<host>:<port>/dashboard`

For example, if Spring Cloud Data Flow is running locally, the dashboard is available at `\http://localhost:9393/dashboard`.

If you have enabled https, then the dashboard will be located at `\https://localhost:9393/dashboard`.
If you have enabled security, a login form is available at `\http://localhost:9393/dashboard/#/login`.

NOTE: The default Dashboard server port is `9393`.

The following image shows the opening page of the Spring Cloud Data Flow dashboard:

.The Spring Cloud Data Flow Dashboard
image::{dataflow-asciidoc}/images/dataflow-dashboard-about.png[The Spring Cloud Data Flow Dashboard, scaledwidth="100%"]



[[dashboard-apps]]
== Apps

The Apps section of the dashboard lists all the available applications and provides the controls to register and unregister them (if applicable).
It is possible to import a number of applications at once by using the Bulk Import Applications action.

The following image shows a typical list of available apps within the dashboard:

.List of Available Applications
image::{dataflow-asciidoc}/images/dataflow-available-apps-list.png[List of available applications, scaledwidth="100%"]



=== Bulk Import of Applications

The Bulk Import Applications page provides numerous options for defining and importing a set of applications all at once.
For bulk import, the application definitions are expected to be expressed in a properties style, as follows:

`<type>.<name> = <coordinates>`

The following examples show a typical application definitions:

[source]
task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.2.0.RELEASE
processor.transform=maven://org.springframework.cloud.stream.app:transform-processor-rabbit:1.2.0.RELEASE

At the top of the bulk import page, a URI can be specified that points to a properties file stored elsewhere, it should contain properties formatted as shown in the previous example.
Alternatively, by using the textbox labeled "`Apps as Properties`", you can directly list each property string. Finally, if the properties are stored in a local file, the "`Select Properties File`" option opens a local file browser to select the file.
After setting your definitions through one of these routes, click Import.

The following image shows the Bulk Import Applications page:

.Bulk Import Applications
image::{dataflow-asciidoc}/images/dataflow-bulk-import-applications.png[Bulk Import Applications, scaledwidth="100%"]



[[dashboard-runtime]]
== Runtime

The Runtime section of the Dashboard application shows the list of all running applications.
For each runtime app, the state of the deployment and the number of deployed instances is shown.
A list of the used deployment properties is available by clicking on the App Id.

The following image shows an example of the Runtime tab in use:

.List of Running Applications
image::{dataflow-asciidoc}/images/dataflow-runtime.png[List of running applications, scaledwidth="100%"]



[[dashboard-streams]]
== Streams

The Streams tab has two child tabs: Definitions and Create Stream. The following topics describe how to work with each one:

* <<dashboard-stream-definitions>>
* <<dashboard-flo-streams-designer>>



[[dashboard-stream-definitions]]
=== Working with Stream Definitions

The Streams section of the Dashboard includes the Definitions tab that provides a listing of Stream definitions.
There you have the option to deploy or undeploy those stream definitions.
Additionally, you can remove the definition by clicking on Destroy.
Each row includes an arrow on the left, which you can click to see a visual representation of the definition.
Hovering over the boxes in the visual representation shows more details about the apps, including any options passed to them.

In the following screenshot, the `timer` stream has been expanded to show the visual representation:

.List of Stream Definitions
image::{dataflow-asciidoc}/images/dataflow-streams-list-definitions.png[List of Stream Definitions, scaledwidth="100%"]

If you click the details button, the view changes to show a visual representation of that stream and any related streams.
In the preceding example, if you click details for the `timer` stream, the view changes to the following view, which clearly shows the relationship between the three streams (two of them are tapping into the `timer` stream):

.Stream Details Page
image::{dataflow-asciidoc}/images/dataflow-stream-details.png[Stream Details Page, scaledwidth="100%"]



[[dashboard-flo-streams-designer]]
=== Creating a Stream

The Streams section of the Dashboard includes the Create Stream tab, which makes available the https://github.com/spring-projects/spring-flo[Spring Flo] designer: a canvas application that offers an interactive graphical interface for creating data pipelines.

In this tab, you can:

* Create, manage, and visualize stream pipelines using DSL, a graphical canvas, or both
* Write pipelines via DSL with content-assist and auto-complete
* Use auto-adjustment and grid-layout capabilities in the GUI for simpler and interactive organization of pipelines

You should watch this https://www.youtube.com/watch?v=78CgV46OstI[screencast] that highlights some of the "Flo for Spring Cloud Data Flow" capabilities.
The Spring Flo https://github.com/spring-projects/spring-flo/wiki[wiki] includes more detailed content on core Flo capabilities.

The following image shows the Flo designer in use:

.Flo for Spring Cloud Data Flow
image::{dataflow-asciidoc}/images/dataflow-flo-create-stream.png[Flo for Spring Cloud Data Flo, scaledwidth="100%"]

[dashboard-flo-streams-designer-fanin-fanout]]
=== Creating Fan-In/Fan-Out Streams

In chapter <<spring-cloud-dataflow-stream-dsl-fanin-fanout>> you learned how we can support fan-in and fan-out use cases using <<spring-cloud-dataflow-stream-dsl-named-destinations,named destinations>>.
The UI provides dedicated support for named destinations as well:

.Flo for Spring Cloud Data Flow
image::{dataflow-asciidoc}/images/dataflow-flo-create-stream-fanin-fanout.png[Fan-in and Fan-out example, scaledwidth="100%"]

In this example we have data from an _HTTP Source_ and a _JDBC Source_ that is being sent to the
_sharedData_ channel which represents a *Fan-in* use case.
On the other end we have a _Cassandra Sink_ and a _File Sink_ subscribed to the _sharedData_ channel which represents a *Fan-out* use case.

=== Creating a Tap Stream

Creating Taps using the Dashboard is straightforward.
Let's say you have stream consisting of an _HTTP Source_ and a _File Sink_ and you would like to tap into the stream
to also send data to a _JDBC Sink_.
In order to create the tap stream simply connect the output connector of the _HTTP Source_ to the _JDBC Sink_.
The connection will be displayed as a dotted line, indicating that you created a tap stream.

.Creating a Tap Stream
image::{dataflow-asciidoc}/images/dataflow-flo-create-tap-stream.png[Tap stream example, scaledwidth="100%"]

The primary stream (_HTTP Source_ to _File Sink_) will be automatically named, in case you did not provide a name for the stream, yet.
When creating tap streams, the primary stream must always be explicitly named.
In the picture above, the primary stream was named _HTTP_INGEST_.

Using the Dashboard, you can also switch the primary stream to become the secondary tap stream.

.Change Primary Stream to Secondary Tap Stream
image::{dataflow-asciidoc}/images/dataflow-flo-tap-stream-switch-to-primary-stream.png[Switch tap stream to primary stream, scaledwidth="100%"]

Simply hover over the existing primary stream, the line between _HTTP Source_ and _File Sink_.
Several control icons will appear, and by clicking on the icon labeled _Switch to/from tap_,
you change the primary stream into a tap stream.
Do the same for the tap stream and switch it to a primary stream.

.End Result of Switching the Primary Stream
image::{dataflow-asciidoc}/images/dataflow-flo-tap-stream-switch-to-primary-stream-result.png[End result of switching the tap stream to a primary stream, scaledwidth="100%"]
=======
TIP: When interacting directly with <<spring-cloud-dataflow-stream-dsl-named-destinations,named destinations>>,
there can be "n" combinations (Inputs/Outputs). This allows you to create complex topologies involving a
wide variety of data sources and destinations.

ifndef::omit-tasks-docs[]
[[dashboard-tasks]]
== Tasks

The Tasks section of the Dashboard currently has three tabs:

* <<dashboard-tasks-apps>>
* <<dashboard-task-definition>>
* <<dashboard-tasks-executions>>

[[dashboard-tasks-apps]]
=== Apps
{'fraction_non_alphanumeric': 0.07378661421508692, 'fraction_numerical': 0.006485566955504758, 'mean_word_length': 5.088025889967637, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6021653', 'n_tokens_mistral': 5008, 'n_tokens_neox': 4775, 'n_words': 2339}