This repository was archived by the owner on Nov 27, 2022. It is now read-only.
File tree 4 files changed +82
-32
lines changed
4 files changed +82
-32
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
2
log /** /*
3
+ tmp
3
4
tmp /** /*
4
5
bin /*
6
+ vendor
5
7
vendor /gems /*
6
8
! vendor /gems /cache /
7
9
.sass-cache /*
Original file line number Diff line number Diff line change 5
5
get :show , :map => '/' do
6
6
json = ''
7
7
open ( 'http://mirror.xmission.com/jenkins/updates/update-center.json' ) do |f |
8
+ #open(File.dirname(__FILE__) + '/../../tmp/update-center.json') do |f|
8
9
json = f . read
9
10
end
10
11
json = json . sub ( 'updateCenter.post(' , '' ) . sub ( /\) ;$/ , '' )
11
12
@plugins = JSON . parse ( json )
13
+ @categories = [
14
+ "scm" ,
15
+ "misc" ,
16
+ "notifier" ,
17
+ "listview-column" ,
18
+ "builder" ,
19
+ "user" ,
20
+ "ui" ,
21
+ "report" ,
22
+ "maven" ,
23
+ "buildwrapper" ,
24
+ "post-build" ,
25
+ "upload" ,
26
+ "external" ,
27
+ "trigger" ,
28
+ "page-decorator" ,
29
+ "slaves" ,
30
+ "scm-related" ,
31
+ "cluster" ,
32
+ "cli" ,
33
+ "envfile" ,
34
+ "must-be-labeled"
35
+ ]
12
36
render 'jenkins_plugins/show'
13
37
end
14
-
15
38
end
Original file line number Diff line number Diff line change 1
- %header
2
- .container
3
- .row
4
- .span2.logo
5
- = image_tag('icon.png')
6
- .span14
7
- %h1
8
- Jenkins Plugin Hub
9
- %p .lead
10
- This site is a hub site for Jekins plugins. This site provides you Jenkins plugins quick search and RSS feed.
11
- %br
12
- Now
13
- = @plugins['plugins'].size
14
- plugins are available.
15
-
16
1
.container
17
2
.row
18
- %table .zebra-striped
19
- %tr
20
- % th Name
21
- %th Version
22
- % th Release
23
- % th Description
24
- - @plugins['plugins'].each do |key, plugin |
3
+ %ul #filter .pills {:style = > 'margin-bottom:0'}
4
+ %li.active= link_to " All " , " # "
5
+ - @categories.each do |category |
6
+ %li= link_to category, " ?category= #{ category } "
7
+ .row
8
+ %table#table.zebra- striped
9
+ %thead
25
10
%tr
11
+ %th Name
12
+ %th Version
13
+ %th Release
14
+ %th Description
15
+ %tbody
16
+ - @plugins['plugins'].each do |key, plugin|
17
+ %tr{:class => (plugin['labels']||[]).join(' ')}
26
18
%td.name= link_to(key, plugin['wiki'])
27
19
%td.version= plugin['version']
28
20
%td.release= plugin['releaseTimestamp']
29
21
%td.discription= plugin['excerpt']
30
22
31
- .container
32
- %footer Copyright (C) 2011 codefirst.org. All rights reserved.
23
+ :javascript
24
+ $(function() {
25
+ var filter = function (category) {
26
+ $('#table tbody tr').each(function() {
27
+ if (category == 'All' || $(this).hasClass(category)) {
28
+ $(this).show();
29
+ } else {
30
+ $(this).hide();
31
+ }
32
+ });
33
+ }
34
+ $('#filter li').bind("click", function(e) {
35
+ $('#filter li').removeClass("active");
36
+ $(e.target).parent().addClass("active");
37
+ filter(e.target.text);
38
+ return false;
39
+ });
40
+ });
Original file line number Diff line number Diff line change 1
1
!!! Strict
2
2
%html
3
- %head
4
- %title = [@title, " Jenkins Plugin Hub" ].compact.join(" | " )
5
- = stylesheet_link_tag 'bootstrap.min', 'application'
6
- = yield_content :include
7
- = javascript_include_tag 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'
8
- %body
9
- = yield
3
+ %head
4
+ %title = [@title, " Jenkins Plugin Hub" ].compact.join(" | " )
5
+ = stylesheet_link_tag 'bootstrap.min', 'application'
6
+ = yield_content :include
7
+ = javascript_include_tag 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'
8
+ %body
9
+ %header
10
+ .container
11
+ .row
12
+ .span2.logo
13
+ = image_tag('icon.png')
14
+ .span14
15
+ %h1
16
+ Jenkins Plugin Hub
17
+ %p .lead
18
+ This site is a hub site for Jekins plugins. This site provides you Jenkins plugins quick search and RSS feed.
19
+ %br
20
+ Now
21
+ = @plugins['plugins'].size
22
+ plugins are available.
23
+ = yield
24
+ .container
25
+ %footer Copyright (C) 2011 codefirst.org. All rights reserved.
26
+
You can’t perform that action at this time.
0 commit comments