cyclid-ui 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cyclid_ui.rb +2 -0
- data/app/cyclid_ui/controllers/auth.rb +10 -2
- data/app/cyclid_ui/controllers/user.rb +16 -0
- data/app/cyclid_ui/templates/intro.mustache +22 -0
- data/app/cyclid_ui/templates/login.mustache +1 -1
- data/app/cyclid_ui/views/intro.rb +24 -0
- data/lib/cyclid_ui/version.rb +1 -1
- data/public/js/user.js +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd6a99f9802100c3fe15f93e3803c624106d7c62
|
4
|
+
data.tar.gz: 83257bb0735724017e9f6f6276e34a359ecd9d72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0377e09d764eaa4faca71fbc86667d25f854581bf3c7866392f17d81c97531fe5d760b81a5c0e6cc258b82d28cb42e01bcc328d8c1ea3e9be003285063848e
|
7
|
+
data.tar.gz: e547570fe202d684e48be60f3dc36f79835c18c76c89f192bc54c76f3ac5ff18da8ad03cd337ec42b9904afecc43bba6105ef03cf1a93f8230b7dba32dad9c5e
|
data/app/cyclid_ui.rb
CHANGED
@@ -133,6 +133,8 @@ module Cyclid
|
|
133
133
|
# it sees the 401 response
|
134
134
|
env['warden'].custom_failure!
|
135
135
|
flash[:login_error] = 'Invalid username or password'
|
136
|
+
session[:request_uri] = env['REQUEST_URI'] \
|
137
|
+
unless session.key? :request_uri
|
136
138
|
cookies.delete 'cyclid.token'
|
137
139
|
redirect to '/login'
|
138
140
|
end
|
@@ -71,8 +71,16 @@ module Cyclid
|
|
71
71
|
# Pick the first organization from the users membership and
|
72
72
|
# redirect; if the user doesn't belong to any organizations,
|
73
73
|
# redirect them to their user page
|
74
|
-
|
75
|
-
|
74
|
+
request_uri = session[:request_uri]
|
75
|
+
Cyclid.logger.debug "request_uri=#{request_uri}"
|
76
|
+
initial_page = if request_uri
|
77
|
+
request_uri
|
78
|
+
elsif user.organizations.empty?
|
79
|
+
if Cyclid.config.signup
|
80
|
+
"/user/#{username}/intro"
|
81
|
+
else
|
82
|
+
"/user/#{username}"
|
83
|
+
end
|
76
84
|
else
|
77
85
|
user.organizations.first
|
78
86
|
end
|
@@ -36,6 +36,22 @@ module Cyclid
|
|
36
36
|
|
37
37
|
mustache :user
|
38
38
|
end
|
39
|
+
|
40
|
+
get '/user/:username/intro' do
|
41
|
+
authenticate!
|
42
|
+
|
43
|
+
# Build breadcrumbs
|
44
|
+
username = params[:username]
|
45
|
+
|
46
|
+
@crumbs = []
|
47
|
+
@crumbs << { 'name' => 'User' }
|
48
|
+
@crumbs << { 'url' => "/user/#{username}", 'name' => username }
|
49
|
+
@crumbs << { 'url' => "/user/#{username}/intro", 'name' => 'Introduction' }
|
50
|
+
|
51
|
+
@current_user = current_user
|
52
|
+
|
53
|
+
mustache :intro
|
54
|
+
end
|
39
55
|
end
|
40
56
|
end
|
41
57
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="container" id="intro">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-8">
|
4
|
+
<h1>Welcome to Cyclid!</h1>
|
5
|
+
<p><span style="font-size:140%;">You currently don't belong to any organizations. Without an organization, you won't be able to run any jobs!</span></p>
|
6
|
+
<p>You can either <a href="{{signup}}/organization">create a new organization</a>, or ask someone to add you to an existing organization.</p>
|
7
|
+
<hr>
|
8
|
+
<p>While you're here, there are some useful links which can help you get the most from Cyclid:</p>
|
9
|
+
<ul style="line-height: 1.75;">
|
10
|
+
<li>The official Cyclid documentation at <a href="//docs.cyclid.io">docs.cyclid.io</a>.</li>
|
11
|
+
<li>Cyclid source code at <a href="//github.com/Cyclid/">Github</a>, including example projects.</li>
|
12
|
+
<li>The <a href="//cyclid.io/blog/">Cyclid Blog</a> for news and articles about Cyclid & Continuous Integration.</li>
|
13
|
+
<li>You can follow <a href="//twitter.com/cyclidci">@cyclidci</a> on Twitter for news & updates.</li>
|
14
|
+
</ul>
|
15
|
+
<p>If you'd like to get in touch, just email us at <a href="mailto:contact@cyclid.io">contact@cyclid.io</a>.</p>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="col-md-4">
|
19
|
+
<img style="padding-top: 90px;" src="/images/cyclid-logo-large.png">
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Copyright 2016 Liqwyd Ltd.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
module Cyclid
|
17
|
+
module UI
|
18
|
+
module Views
|
19
|
+
# New user introduction view
|
20
|
+
class Intro < Layout
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/cyclid_ui/version.rb
CHANGED
data/public/js/user.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyclid-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristian Van Der Vliet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: require_all
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- app/cyclid_ui/models/user.rb
|
229
229
|
- app/cyclid_ui/templates/config.mustache
|
230
230
|
- app/cyclid_ui/templates/footer.mustache
|
231
|
+
- app/cyclid_ui/templates/intro.mustache
|
231
232
|
- app/cyclid_ui/templates/job.mustache
|
232
233
|
- app/cyclid_ui/templates/job_info.mustache
|
233
234
|
- app/cyclid_ui/templates/layout.mustache
|
@@ -235,6 +236,7 @@ files:
|
|
235
236
|
- app/cyclid_ui/templates/organization.mustache
|
236
237
|
- app/cyclid_ui/templates/user.mustache
|
237
238
|
- app/cyclid_ui/views/config.rb
|
239
|
+
- app/cyclid_ui/views/intro.rb
|
238
240
|
- app/cyclid_ui/views/job.rb
|
239
241
|
- app/cyclid_ui/views/layout.rb
|
240
242
|
- app/cyclid_ui/views/login.rb
|