Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qualification tool support UI code generation #5470

Merged
merged 9 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tools/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
*.iml
target
event_log_profiling.log
## ignore qual-ui static files
**/ui/assets/
**/ui-dependencies-cache/
**/ui/js/data-output.js
68 changes: 68 additions & 0 deletions tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<spark.test.version>${spark311.version}</spark.test.version>
<spark.version.classifier>spark311</spark.version.classifier>
<target.classifier>spark311</target.classifier>
<ui.cache.dir>${project.build.directory}/ui-dependencies-cache</ui.cache.dir>
<ui.resources.relative>src/main/resources/ui</ui.resources.relative>
<ui.resources.dir>${project.basedir}/${ui.resources.relative}</ui.resources.dir>
<ui.resources.external.folder>assets</ui.resources.external.folder>
</properties>

<dependencies>
Expand Down Expand Up @@ -138,6 +142,70 @@
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
tgravescs marked this conversation as resolved.
Show resolved Hide resolved
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>download-ui-dependencies</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<property name="project.basedir" value="${project.basedir}"/>
<property name="project.build.directory"
value="${project.build.directory}"/>
<property name="project.cache.dir" value="${ui.cache.dir}"/>
<property name="project.ui.root" value="${ui.resources.dir}"/>
<property name="project.ui.output"
value="${ui.resources.dir}/${ui.resources.external.folder}"/>
<property name="lib.bootstrap.url"
value="https://github.com/twbs/bootstrap/releases/download/v4.6.1/bootstrap-4.6.1-dist.zip"/>
<property name="lib.bootstrap.dir" value="bootstrap"/>
<property name="lib.jquery.dir" value="jquery"/>
<property name="lib.jquery.url"
value="https://github.com/jquery/jquery/archive/refs/tags/3.6.0.zip"/>
<property name="lib.mustache.dir" value="mustache-js"/>
<property name="lib.mustache.url"
value="https://github.com/janl/mustache.js/archive/refs/tags/v4.1.0.zip"/>
<property name="lib.spur.dir" value="spur"/>
<property name="lib.spur.url"
value="https://github.com/HackerThemes/spur-template/archive/refs/heads/master.zip"/>
<property name="lib.datatables.url.domain"
value="https://cdn.datatables.net"/>
<property name="lib.datatables.dir" value="datatables"/>
<ant antfile="${project.basedir}/prepare-ui-libraries.xml"></ant>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- clean up the qual-ui dependencies from the resources -->
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
tgravescs marked this conversation as resolved.
Show resolved Hide resolved
<executions>
<execution>
<id>clean-qual-ui-dependencies</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${ui.resources.relative}</directory>
<includes>
<include>${ui.resources.external.folder}/</include>
</includes>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
165 changes: 165 additions & 0 deletions tools/prepare-ui-libraries.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022, NVIDIA CORPORATION.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="RAPIDS-Qual-UI" default="extract">
<description>
Ant task to download dependency files from internet and extract during maven package.
Those files are used to render the Qualification UI report file.
</description>
<target name="env">
<echo level="info"
message="Project path : ${project.basedir}"/>
<echo level="info"
message="Project build directory : ${project.build.directory}"/>
<echo level="info"
message="UI Resources Location : ${project.ui.output}"/>
tgravescs marked this conversation as resolved.
Show resolved Hide resolved
<echo level="info"
message="Output location : ${project.ui.output}"/>
<echo level="info"
message="Cache location : ${project.cache.dir}"/>
<mkdir dir="${project.cache.dir}"/>
<mkdir dir="${project.cache.dir}/${lib.datatables.dir}"/>
<mkdir dir="${project.ui.output}"/>
</target>
<target name="download" depends="env"
description="Download UI dependencies from perspective resources">
<echo level="info"
message="Downloading BoostStrap file ..." />
<get src="${lib.bootstrap.url}"
skipexisting="true"
dest="${project.cache.dir}/${lib.bootstrap.dir}.zip" />
<available property="download.bootstrap.file" file="${project.cache.dir}/${lib.bootstrap.dir}.zip"/>
<echo level="info"
message="Downloading SpurAdmin files ..." />
<get src="${lib.spur.url}"
skipexisting="true"
dest="${project.cache.dir}/${lib.spur.dir}.zip" />
<available property="download.spur.file" file="${project.cache.dir}/${lib.spur.dir}.zip"/>
<echo level="info"
message="Downloading jQuery files ..." />
<get src="${lib.jquery.url}"
skipexisting="true"
dest="${project.cache.dir}/${lib.jquery.dir}.zip" />
<available property="download.jquery.file" file="${project.cache.dir}/${lib.jquery.dir}.zip"/>
<echo level="info"
message="Downloading mustache files ..." />
<get src="${lib.mustache.url}"
skipexisting="true"
dest="${project.cache.dir}/${lib.mustache.dir}.zip" />
<available property="download.jquery.file" file="${project.cache.dir}/${lib.mustache.dir}.zip"/>
<!-- get Datatables files -->

<mkdir dir="${project.ui.output}/${lib.datatables.dir}"/>
<!-- fetch css files -->
<get src="${lib.datatables.url.domain}/1.12.0/css/dataTables.bootstrap4.min.css"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/buttons/2.2.3/css/buttons.bootstrap4.min.css"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/responsive/2.3.0/css/responsive.bootstrap4.min.css"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/searchpanes/2.0.1/css/searchPanes.bootstrap4.min.css"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/select/1.4.0/css/select.bootstrap4.min.css"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<!-- fetch js files -->
<get src="${lib.datatables.url.domain}/1.12.0/js/jquery.dataTables.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/1.12.0/js/dataTables.bootstrap4.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/buttons/2.2.3/js/dataTables.buttons.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/buttons/2.2.3/js/buttons.bootstrap4.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/buttons/2.2.3/js/buttons.html5.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/responsive/2.3.0/js/dataTables.responsive.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/responsive/2.3.0/js/responsive.bootstrap4.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/searchpanes/2.0.1/js/dataTables.searchPanes.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/searchpanes/2.0.1/js/searchPanes.bootstrap4.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
<get src="${lib.datatables.url.domain}/select/1.4.0/js/dataTables.select.min.js"
dest="${project.cache.dir}/${lib.datatables.dir}/"
skipexisting="true"/>
</target>
<target name="extract" depends="env,download" description="Extract project files">
amahussein marked this conversation as resolved.
Show resolved Hide resolved
<echo level="info"
message="Extracting bootstrap .zip file" />
<unzip src="${project.cache.dir}/${lib.bootstrap.dir}.zip"
dest="${project.ui.output}/${lib.bootstrap.dir}">
<mapper type="flatten"/>
<patternset>
<include name="**/bootstrap.min.css*"/>
<include name="**/bootstrap.bundle.min.js*"/>
<include name="**/LICENSE*"/>
</patternset>
</unzip>
<echo level="info"
message="Extracting spur .zip file" />
<unzip src="${project.cache.dir}/${lib.spur.dir}.zip"
dest="${project.ui.output}/${lib.spur.dir}">
<mapper type="flatten"/>
<patternset>
<include name="**/spur.min.css"/>
<include name="**/LICENSE*"/>
</patternset>
</unzip>
<echo level="info"
message="Extracting jQuery .zip file" />
<unzip src="${project.cache.dir}/${lib.jquery.dir}.zip"
dest="${project.ui.output}/${lib.jquery.dir}">
<mapper type="flatten"/>
<patternset>
<include name="**/jquery.min.*"/>
<include name="**/LICENSE*"/>
</patternset>
</unzip>
<echo level="info"
message="Extracting mustache .zip file" />
<unzip src="${project.cache.dir}/${lib.mustache.dir}.zip"
dest="${project.ui.output}/${lib.mustache.dir}">
<mapper type="flatten"/>
<patternset>
<include name="**/mustache.min.*"/>
<include name="**/LICENSE*"/>
</patternset>
</unzip>
<!-- copying datatables files -->
<echo level="info"
message="Copying datatables files ..." />
<copy todir="${project.ui.output}/${lib.datatables.dir}">
<fileset dir="${project.cache.dir}/${lib.datatables.dir}">
<include name="*"/>
</fileset>
</copy>
</target>
</project>
68 changes: 68 additions & 0 deletions tools/src/main/resources/ui/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
RAPIDS plugin for Apache Spark
Copyright (c) 2022, NVIDIA CORPORATION
tgravescs marked this conversation as resolved.
Show resolved Hide resolved

This product includes software that depends on 3rd party libraries available under MIT License
Attribution Statements: Nvidia actively chooses the MIT license to apply to files with this
copyright and license.

----------------------------------------------------------------------------------------------------

Boostrap V4.6.1 - The MIT License (MIT)
License Text ( https://github.com/twbs/bootstrap/blob/v4.6.1/LICENSE )
Copyright (c) 2011-2021 Twitter, Inc.
Copyright (c) 2011-2021 The Bootstrap Authors

DataTablesSrc V1.12 - The MIT License (MIT)
License Text ( https://datatables.net/license/ )
Copyright (C) 2008-present, SpryMedia Ltd.

jQuery V3.6.0 - The MIT License (MIT)
License Text ( https://jquery.org/license/ )
Copyright OpenJS Foundation and other contributors, https://openjsf.org/

Mustache.js V4.10 - The MIT License (MIT)
License Text ( https://github.com/janl/mustache.js/blob/master/LICENSE )
Copyright (c) 2009 Chris Wanstrath (Ruby)
Copyright (c) 2010-2014 Jan Lehnardt (JavaScript)
Copyright (c) 2010-2015 The mustache.js community

Spur Dashboard V1.1.0 - The MIT License (MIT)
License Text ( https://github.com/HackerThemes/spur-template/blob/master/LICENSE )
Copyright 2016 - 2019 Alexander Rechsteiner
/*!
* spur-template - An admin template based on Bootstrap 4
* Version v1.1.0
* Copyright 2016 - 2019 Alexander Rechsteiner
* https://hackerthemes.com
*
* Parts of this code were created by the Bootstrap team
* and are available under MIT license at https://getbootstrap.com.
* Bootstrap version: 4.3.1
*//*!
* Bootstrap v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

----------------------------------------------------------------------------------------------------

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading