[jenkinscat-docs] master: Job configuration page and build page are now handled by different modules. (e696906)
immanetize at fedoraproject.org
immanetize at fedoraproject.org
Fri Feb 6 07:40:42 UTC 2015
Repository : http://git.fedorahosted.org/cgit/jenkinscat-docs.git
On branch : master
>---------------------------------------------------------------
commit e6969061413316cf6d73a69dc4c4ffbe00be649c
Author: Pavel Tisnovsky <ptisnovs at redhat.com>
Date: Fri Dec 19 16:44:55 2014 +0100
Job configuration page and build page are now handled by different modules.
>---------------------------------------------------------------
ChangeLog | 6 +++
src/jenkinscat/server.clj | 105 ---------------------------------------------
2 files changed, 6 insertions(+), 105 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 707f7b9..564b918 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
2014-12-19 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/jenkinscat/server.clj:
+ Job configuration page and build page are now handled by different
+ modules.
+
+2014-12-19 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/jenkinscat/server.clj:
Change logic used to read info about middleware books.
2014-12-19 Pavel Tisnovsky <ptisnovs at redhat.com>
diff --git a/src/jenkinscat/server.clj b/src/jenkinscat/server.clj
index 58e3836..e67f31b 100644
--- a/src/jenkinscat/server.clj
+++ b/src/jenkinscat/server.clj
@@ -330,51 +330,6 @@
[output-data]
(json/write-str output-data))
-(defn render-build-page
- "Render page with info about build."
- [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>"))
-
(defn page-header
[subtitle]
[:head
@@ -475,66 +430,6 @@
]
]]))
-(defn render-job-configurations-page
- "Render page with job configurations."
- [job-list job-configurations]
- (page/xhtml
- (page-header "job configurations")
- [:body
- (render-nav-bar "Job configurations")
-
- [:table {:class "table table-striped table-condensed table-hover table-borderer"}
- [:tr
- [:th {:style "width:25%"} "Job name"]
- [:th {:style "width:20%"} "GIT repo"]
- [:th {:style "width:8%"} "Branch"]
- [:th {:style "width:4%"} "Artifact<br />2keep"]
- [:th {:style "width:5%"} "Trigger"]
- [:th {:style "width:11%"} "Artifacts"]
- [:th {:style "width:10%"} "Exclude"]
- [:th {:style "width:10%"} "IRC"]
- [:th {:style "width:5%"} "Build script"]
- ]
- (for [i (range (count job-list))]
- (let [job-key (nth job-list i)
- job-configuration (get job-configurations job-key)]
- [:tr
- [:td [:a {:href (str jobs-href-prefix (:job-name job-configuration))} job-key]]
- [:td (:git-repo job-configuration)]
- [:td (:branch job-configuration)]
- [:td (:artifacts2keep job-configuration)]
- [:td (:trigger job-configuration)]
- [:td (:artifacts job-configuration)]
- [:td (:exclude job-configuration)]
- [:td (:irc job-configuration)]
- [:td [:a {:href "#" :id (str "code-" i ) :class "btn btn-success" :rel "popover" :title "Build script" :data-placement "left" :data-content (str "<pre>" (:build-script job-configuration) "</pre>")} "Show"]]]))]
- [:script {:src "http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}]
- [:script {:src "http://w3resource.com/twitter-bootstrap/twitter-bootstrap-v2/js/bootstrap-tooltip.js"}]
- [:script {:src "http://w3resource.com/twitter-bootstrap/twitter-bootstrap-v2/js/bootstrap-popover.js"}]
- "
- <script>
- $(function (){
- $('#example').popover();
- "
- (for [i (range (count job-list))]
- (let [job-key (nth job-list i)
- job-configuration (get job-configurations job-key)]
- (str "\n$('#code-" i "').popover();")))
-
- "
- });
- </script>
- "
- [:table {:class "table table-striped table-condensed table-hover table-borderer"}
- [:tr
- [:th "Jenkinscat administration"]
- ]
- [:tr
- [:td [:a {:href "/reload-book-list"} "Reload book list"]]
- ]
- ]
-]))
-
(defn generate-response-html
"Generate HTTP response for the given request."
[page-content session]
More information about the docs-commits
mailing list