Skip to content

WebUITab

== [[WebUITab]] WebUITab -- Contract of Tabs in Web UI

WebUITab represents a <> in web UI with a <> and <>.

WebUITab can be:

  • spark-webui-WebUI.md#attachTab[attached] or spark-webui-WebUI.md#detachTab[detached] from a WebUI

  • spark-webui-WebUITab.md#attachPage[attached] to a WebUITab

[[pages]] WebUITab is simply a collection of spark-webui-WebUIPage.md[WebUIPages] that can be <> to the tab.

[[name]] WebUITab has a name (and defaults to <> capitalized).

[[implementations]] NOTE: spark-webui-SparkUITab.md[SparkUITab] is the one and only implementation of WebUITab contract.

NOTE: WebUITab is a private[spark] contract.

=== [[attachPage]] Attaching Page to Tab -- attachPage Method

[source, scala]

attachPage(page: WebUIPage): Unit

attachPage prepends the spark-webui-WebUIPage.md#prefix[page prefix] (of the input WebUIPage) with the <> (with no ending slash, i.e. /, if the page prefix is undefined).

In the end, attachPage adds the WebUIPage to <> registry.

NOTE: attachPage is used when spark-webui-SparkUITab.md#implementations[web UI tabs] register their pages.

=== [[basePath]] Requesting Base URI Path -- basePath Method

[source, scala]

basePath: String

basePath requests the <> for the spark-webui-WebUI.md#basePath[base path].

NOTE: basePath is used when...FIXME

=== [[headerTabs]] Requesting Header Tabs -- headerTabs Method

[source, scala]

headerTabs: Seq[WebUITab]

headerTabs requests the <> for the spark-webui-WebUI.md#headerTabs[header tabs].

NOTE: headerTabs is used exclusively when UIUtils is requested to spark-webui-UIUtils.md#headerSparkPage[headerSparkPage].

=== [[creating-instance]] Creating WebUITab Instance

WebUITab takes the following when created:

  • [[parent]] Parent spark-webui-WebUI.md[WebUI]
  • [[prefix]] Prefix

WebUITab initializes the <>.

NOTE: WebUITab is a Scala abstract class and cannot be created directly, but only as one of the <>.


Last update: 2020-10-06