WebUITab — Contract of Tabs in Web UI
WebUITab can be:
WebUITab is simply a collection of WebUIPages that can be attached to the tab.
WebUITab has a name (and defaults to prefix capitalized).
|
Note
|
SparkUITab is the one and only implementation of WebUITab contract.
|
|
Note
|
WebUITab is a private[spark] contract.
|
Attaching Page to Tab — attachPage Method
|
1 2 3 4 5 |
attachPage(page: WebUIPage): Unit |
attachPage prepends the page prefix (of the input WebUIPage) with the tab prefix (with no ending slash, i.e. /, if the page prefix is undefined).
In the end, attachPage adds the WebUIPage to pages registry.
|
Note
|
attachPage is used when web UI tabs register their pages.
|
Requesting Base URI Path — basePath Method
|
1 2 3 4 5 |
basePath: String |
basePath requests the parent WebUI for the base path.
|
Note
|
basePath is used when…FIXME
|
Requesting Header Tabs — headerTabs Method
|
1 2 3 4 5 |
headerTabs: Seq[WebUITab] |
headerTabs requests the parent WebUI for the header tabs.
|
Note
|
headerTabs is used exclusively when UIUtils is requested to headerSparkPage.
|
Creating WebUITab Instance
WebUITab takes the following when created:
-
Parent WebUI
WebUITab initializes the internal registries and counters.
|
Note
|
WebUITab is a Scala abstract class and cannot be created directly, but only as one of the implementations.
|
spark技术分享