@@ -157,22 +157,11 @@ private[spark] object UIUtils extends Logging {
157157 def commonHeaderNodes : Seq [Node ] = {
158158 <meta http-equiv =" Content-type" content =" text/html; charset=utf-8" />
159159 <link rel =" stylesheet" href ={prependBaseUri(" /static/bootstrap.min.css" )} type =" text/css" />
160- < link rel= " stylesheet"
161- href= {prependBaseUri(" /static/jquery.dataTables.1.10.4.min.css" )} type = " text/css" />
162- < link rel= " stylesheet"
163- href= {prependBaseUri(" /static/dataTables.bootstrap.css" )} type = " text/css" />
164- <link rel =" stylesheet" href ={prependBaseUri(" /static/jsonFormatter.min.css" )} type =" text/css" />
165160 <link rel =" stylesheet" href ={prependBaseUri(" /static/vis.min.css" )} type =" text/css" />
166161 <link rel =" stylesheet" href ={prependBaseUri(" /static/webui.css" )} type =" text/css" />
167162 <link rel =" stylesheet" href ={prependBaseUri(" /static/timeline-view.css" )} type =" text/css" />
168163 <script src ={prependBaseUri(" /static/sorttable.js" )} ></script >
169164 <script src ={prependBaseUri(" /static/jquery-1.11.1.min.js" )}></script >
170- <script src ={prependBaseUri(" /static/jquery.dataTables.1.10.4.min.js" )}></script >
171- <script src ={prependBaseUri(" /static/jquery.cookies.2.2.0.min.js" )}></script >
172- <script src ={prependBaseUri(" /static/jquery.blockUI.min.js" )}></script >
173- <script src ={prependBaseUri(" /static/dataTables.bootstrap.min.js" )}></script >
174- <script src ={prependBaseUri(" /static/jsonFormatter.min.js" )}></script >
175- <script src ={prependBaseUri(" /static/jquery.mustache.js" )}></script >
176165 <script src ={prependBaseUri(" /static/vis.min.js" )}></script >
177166 <script src ={prependBaseUri(" /static/bootstrap-tooltip.js" )}></script >
178167 <script src ={prependBaseUri(" /static/initialize-tooltips.js" )}></script >
@@ -189,6 +178,20 @@ private[spark] object UIUtils extends Logging {
189178 <script src ={prependBaseUri(" /static/spark-dag-viz.js" )}></script >
190179 }
191180
181+ def dataTablesHeaderNodes : Seq [Node ] = {
182+ < link rel= " stylesheet"
183+ href= {prependBaseUri(" /static/jquery.dataTables.1.10.4.min.css" )} type = " text/css" />
184+ < link rel= " stylesheet"
185+ href= {prependBaseUri(" /static/dataTables.bootstrap.css" )} type = " text/css" />
186+ <link rel =" stylesheet" href ={prependBaseUri(" /static/jsonFormatter.min.css" )} type =" text/css" />
187+ <script src ={prependBaseUri(" /static/jquery.dataTables.1.10.4.min.js" )}></script >
188+ <script src ={prependBaseUri(" /static/jquery.cookies.2.2.0.min.js" )}></script >
189+ <script src ={prependBaseUri(" /static/jquery.blockUI.min.js" )}></script >
190+ <script src ={prependBaseUri(" /static/dataTables.bootstrap.min.js" )}></script >
191+ <script src ={prependBaseUri(" /static/jsonFormatter.min.js" )}></script >
192+ <script src ={prependBaseUri(" /static/jquery.mustache.js" )}></script >
193+ }
194+
192195 /** Returns a spark page with correctly formatted headers */
193196 def headerSparkPage (
194197 title : String ,
@@ -244,10 +247,14 @@ private[spark] object UIUtils extends Logging {
244247 }
245248
246249 /** Returns a page with the spark css/js and a simple format. Used for scheduler UI. */
247- def basicSparkPage (content : => Seq [Node ], title : String ): Seq [Node ] = {
250+ def basicSparkPage (
251+ content : => Seq [Node ],
252+ title : String ,
253+ useDataTables : Boolean = false ): Seq [Node ] = {
248254 <html >
249255 <head >
250256 {commonHeaderNodes}
257+ {if (useDataTables) dataTablesHeaderNodes else Seq .empty}
251258 <title >{title}</title >
252259 </head >
253260 <body >
0 commit comments