[jenkinscat-docs] master: Build page renderer. (4f79242)
immanetize at fedoraproject.org
immanetize at fedoraproject.org
Fri Feb 6 07:40:24 UTC 2015
Repository : http://git.fedorahosted.org/cgit/jenkinscat-docs.git
On branch : master
>---------------------------------------------------------------
commit 4f79242ecd21072fa500fea03363b97ab5e09f70
Author: Pavel Tisnovsky <ptisnovs at redhat.com>
Date: Thu Dec 11 14:14:56 2014 +0100
Build page renderer.
>---------------------------------------------------------------
ChangeLog | 5 ++
src/jenkinscat/renderers/build_page.clj | 78 +++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 05d8b3f..16d9e48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2014-12-11 Pavel Tisnovsky <ptisnovs at redhat.com>
+ * src/jenkinscat/renderers/build_page.clj:
+ Build page renderer.
+
+2014-12-11 Pavel Tisnovsky <ptisnovs at redhat.com>
+
* src/jenkinscat/renderers/add_book_step_3_page.clj:
Added 4th renderer: dialog to add new book/job.
diff --git a/src/jenkinscat/renderers/build_page.clj b/src/jenkinscat/renderers/build_page.clj
new file mode 100644
index 0000000..d1f94fb
--- /dev/null
+++ b/src/jenkinscat/renderers/build_page.clj
@@ -0,0 +1,78 @@
+;;;
+;;; Jenkinscat HTTP server that handles all requests send from clients/browsers.
+;;;
+;;; Copyright (c) 2014 Pavel Tisnovsky, Red Hat
+;;; All rights reserved.
+;;;
+;;; Redistribution and use in source and binary forms, with or without
+;;; modification, are permitted provided that the following conditions are met:
+;;; * Redistributions of source code must retain the above copyright
+;;; notice, this list of conditions and the following disclaimer.
+;;; * Redistributions in binary form must reproduce the above copyright
+;;; notice, this list of conditions and the following disclaimer in the
+;;; documentation and/or other materials provided with the distribution.
+;;; * Neither the name of the Red Hat nor the
+;;; names of its contributors may be used to endorse or promote products
+;;; derived from this software without specific prior written permission.
+;;;
+;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;;; DISCLAIMED. IN NO EVENT SHALL Pavel Tisnovsky BE LIABLE FOR ANY
+;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+;;; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+;;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+;;; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;;
+
+
+
+(ns jenkinscat.renderers.build-page)
+
+(defn render-build-page
+ "Render page with info about build."
+ [hostname job-name]
+ (str "
+<html>
+ <head>
+ <title>Job build started</title>
+ <link rel='stylesheet' href='css/bootstrap.min.css'>
+
+ <!-- Optional theme -->
+ <link rel='stylesheet' href='css/bootstrap-theme.min.css'>
+ <link href='css/Jenkinscat.css' rel='stylesheet' type='text/css'>
+ </head>
+ <body ng-app='jenkinscat' ng-controller='jenkinscatApp'><div class='container-fluid'>
+ <nav class='navbar navbar-inverse navbar-fixed-top' role='navigation'>
+ <div class='container-fluid'>
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class='navbar-header'>
+ <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='#bs-example-navbar-collapse-1'>
+ <span class='sr-only'>Toggle navigation</span>
+ <span class='icon-bar'></span>
+ <span class='icon-bar'></span>
+ <span class='icon-bar'></span>
+ </button>
+ <img class='navbar-brand-' style='float:left' src='jenkinscat.png' />
+ <a class='navbar-brand' href='#'> Jenkinscat</a>
+ </div>
+
+ </div><!-- /.container-fluid -->
+ </nav>
+ <h3>Build for the job '" job-name "' has been added into job queue.</h3>
+ <table class='table table-condensed table-hover table-bordered'>
+ <tr>
+ <td><a href='http://" hostname ":8080/job/" job-name "%20(html-single)'>Build details for the HTML-single book</a></td>
+ </tr>
+ <tr>
+ <td><a href='http://" hostname ":8080/job/" job-name "%20(PDF)'>Build details for the PDF book</a></td>
+ </tr>
+ <tr>
+ <td><a href='/'>Back to Jenkinscat front page</a></td>
+ </tr>
+ </table>
+ </body>
+</html>"))
+
More information about the docs-commits
mailing list