aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Raita <kraita@google.com>2015-05-27 10:31:53 -0700
committerKalle Raita <kraita@google.com>2015-05-29 14:08:02 -0700
commitc74eb2edbd18eb1b072f50c48faba2ab2ff3bfc9 (patch)
tree516e8ca3626262af6e393b81c4464fde56ba4ce8
parent6115b1c1212f6208c10c8c614bac756ab6606476 (diff)
downloadcherry-c74eb2edbd18eb1b072f50c48faba2ab2ff3bfc9.tar.gz
Add about page with license info.
Normalized 3rd party directory mapping to use the root of the corresponding 3rd party directory to make it possible to refer to the LICENSE file. Change-Id: I6f23ede58f45c809360eb32df6dc4da1b9610d86
-rw-r--r--client/index.html5
-rw-r--r--client/js/app.js4
-rw-r--r--client/partials/about.html42
-rw-r--r--server.go19
4 files changed, 62 insertions, 8 deletions
diff --git a/client/index.html b/client/index.html
index 979b002..858d18e 100644
--- a/client/index.html
+++ b/client/index.html
@@ -63,6 +63,7 @@ limitations under the License.
connection lost!
</button>
</li>
+ <li ng-class="{ active: $state.includes('about') }"><a href="#/about">About</a></li>
</ul>
</div>
</div>
@@ -78,9 +79,9 @@ limitations under the License.
<script src="lib/underscore/underscore.js"></script>
<script src="lib/jquery/jquery-1.11.0.min.js"></script>
<script src="lib/angular/angular.js"></script>
- <script src="lib/ui-router/angular-ui-router.js"></script>
+ <script src="lib/ui-router/release/angular-ui-router.js"></script>
<script src="ui-bootstrap/ui-bootstrap-tpls.js"></script>
- <script src="lib/sax/sax.js"></script>
+ <script src="lib/sax/lib/sax.js"></script>
<script src="lib/spin/spin.js"></script>
<script src="lib/angular-spinner/angular-spinner.js"></script>
<script src="lib/angular-tree-control/treeUtilities.js"></script>
diff --git a/client/js/app.js b/client/js/app.js
index 310bc26..1a5127c 100644
--- a/client/js/app.js
+++ b/client/js/app.js
@@ -88,6 +88,10 @@ angular.module('cherry', [
url: '/results/testCase/:batchResultId/:testCasePath',
templateUrl: 'partials/batchResult.case.html'
})
+ .state('about', {
+ url: '/about',
+ templateUrl: 'partials/about.html'
+ })
;
// Configure routes.
diff --git a/client/partials/about.html b/client/partials/about.html
new file mode 100644
index 0000000..e79683a
--- /dev/null
+++ b/client/partials/about.html
@@ -0,0 +1,42 @@
+<!--
+Copyright 2015 Google Inc. All rights reserved.
+
+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.
+-->
+
+<div class="row">
+ <div class="col-md-6 col-md-offset-3">
+ <div class="jumbotron">
+ <h2>Cherry</h2>
+
+ <p>Cherry is a browser-based GUI for controlling deqp test runs and analysing the test results.</p>
+
+ <p><a href="/LICENSE">Cherry license</a></p>
+
+ <p>Third party component licenses:
+ <ul>
+ <li><a href="/ui-bootstrap/LICENSE">UI bootstrap</a></li>
+ <li><a href="/lib/angular/LICENSE">Angular</a></li>
+ <li><a href="/lib/ui-router/LICENSE">UI Router</a></li>
+ <li><a href="/lib/jquery/LICENSE">JQuery</a></li>
+ <li><a href="/lib/spin/LICENSE">Spin</a></li>
+ <li><a href="/lib/angular-spinner/LICENSE">Angular-Spinner</a></li>
+ <li><a href="/lib/bootstrap/LICENSE">Bootstrap</a></li>
+ <li><a href="/lib/sax/LICENSE">sax.js</a></li>
+ <li><a href="/lib/underscore/LICENSE">Underscore.js</a></li>
+ <li><a href="/lib/angular-tree-control/LICENSE">Angular Tree Control</a></li>
+ </ul>
+ </p>
+ </div>
+ </div>
+</div>
diff --git a/server.go b/server.go
index ca9b115..f1df121 100644
--- a/server.go
+++ b/server.go
@@ -307,15 +307,26 @@ func setUpFileMappings() {
serverFileMappings := []ServerFileMapping{
{"third_party/ui-bootstrap", "/ui-bootstrap/"},
{"third_party/angular", "/lib/angular/"},
- {"third_party/ui-router/release", "/lib/ui-router/"},
+ {"third_party/ui-router", "/lib/ui-router/"},
{"third_party/jquery", "/lib/jquery/"},
{"third_party/spin", "/lib/spin/"},
{"third_party/angular-spinner", "/lib/angular-spinner/"},
{"third_party/bootstrap", "/lib/bootstrap/"},
- {"third_party/sax/lib", "/lib/sax/"},
+ {"third_party/sax", "/lib/sax/"},
{"third_party/underscore", "/lib/underscore/"},
{"third_party/angular-tree-control", "/lib/angular-tree-control/"}}
+ // Special case the main license
+ http.HandleFunc("/LICENSE", func(w http.ResponseWriter, r *http.Request) {
+ http.ServeFile(w, r, "LICENSE")
+ })
+
+ // The client hierarchy served as-is
+ fs := http.Dir("client")
+ fileHandler := http.FileServer(fs)
+ http.Handle("/", fileHandler)
+
+ // Re-map third-party to point to the listed directories
for _, mapping := range serverFileMappings {
bootStrapFs := http.Dir(mapping.SourceRootDir)
bootStrapFileHandler := http.StripPrefix(mapping.ServerPrefix, http.FileServer(bootStrapFs))
@@ -359,10 +370,6 @@ func main () {
})
// Setup http handling.
- fs := http.Dir("client")
- fileHandler := http.FileServer(fs)
- http.Handle("/", fileHandler)
-
setUpFileMappings()
http.HandleFunc("/ws", wsHandler)