Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
273f4856
Commit
273f4856
authored
Mar 14, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created user preferences
parent
2a9f4c5c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
1 deletion
+40
-1
debomatic-webui/index.js
debomatic-webui/index.js
+1
-0
debomatic-webui/lib/config.js
debomatic-webui/lib/config.js
+6
-1
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+2
-0
debomatic-webui/public/javascripts/preferences.js
debomatic-webui/public/javascripts/preferences.js
+13
-0
debomatic-webui/routes/index.js
debomatic-webui/routes/index.js
+4
-0
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+6
-0
debomatic-webui/views/preferences.ejs
debomatic-webui/views/preferences.ejs
+8
-0
No files found.
debomatic-webui/index.js
View file @
273f4856
...
...
@@ -43,6 +43,7 @@ app.configure('production', function(){
// Routes
app
.
get
(
'
/
'
,
routes
.
index
);
app
.
get
(
config
.
routes
.
distribution
,
routes
.
distribution
)
app
.
get
(
config
.
routes
.
preferences
,
routes
.
preferences
)
var
broadcast
=
new
Broadcaster
(
io
.
sockets
,
status
)
...
...
debomatic-webui/lib/config.js
View file @
273f4856
...
...
@@ -10,13 +10,18 @@ config.debomatic.jsonfile = '/var/log/debomatic.json'
config
.
routes
=
{}
config
.
routes
.
debomatic
=
'
/debomatic
'
config
.
routes
.
distribution
=
'
/distribution
'
config
.
routes
.
preferences
=
'
/preferences
'
config
.
web
=
{}
config
.
web
.
title
=
"
deb-o-matic web.ui
"
config
.
web
.
description
=
"
This is a web interface for debomatic
"
config
.
web
.
footer
=
"
Fork me on github.com
"
config
.
web
.
autoscroll
=
true
// default ui settings
config
.
web
.
preferences
=
{}
config
.
web
.
preferences
.
autoscroll
=
true
config
.
web
.
preferences
.
header
=
true
config
.
web
.
preferences
.
sidebar
=
true
// DO NOT EDIT these ones
...
...
debomatic-webui/public/javascripts/main.js
View file @
273f4856
var
socket
=
io
.
connect
(
'
//
'
+
config
.
hostname
);
new
Preferences
()
new
Page_Generic
().
init
(
socket
)
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
...
...
debomatic-webui/public/javascripts/preferences.js
0 → 100644
View file @
273f4856
function
Preferences
()
{
// update config.preferences according with user choices
this
.
load
=
function
()
{
for
(
setting
in
config
.
preferences
)
{
if
((
value
=
localStorage
.
getItem
(
setting
)))
{
config
.
preferences
[
setting
]
=
JSON
.
parse
(
value
)
}
}
}
this
.
load
()
}
\ No newline at end of file
debomatic-webui/routes/index.js
View file @
273f4856
...
...
@@ -11,4 +11,8 @@ exports.index = function(req, res){
exports
.
distribution
=
function
(
req
,
res
)
{
res
.
render
(
'
distribution
'
,
config
)
};
exports
.
preferences
=
function
(
req
,
res
)
{
res
.
render
(
'
preferences
'
,
config
)
}
debomatic-webui/views/layout.ejs
View file @
273f4856
...
...
@@ -24,6 +24,11 @@
<div
id=
"distributions"
>
<ul
class=
"nav navbar-nav"
></ul>
</div>
<div
id=
"pages"
>
<ul
class=
"nav navbar-nav pull-right"
>
<li><a
href=
"/preferences"
>
Preferences
</a></li>
</ul>
</div>
</div>
</nav>
...
...
@@ -65,6 +70,7 @@
</script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/preferences.js'
></script>
<script
src=
'/javascripts/page_generic.js'
></script>
<script
src=
'/javascripts/page_distribution.js'
></script>
<script
src=
'/javascripts/main.js'
></script>
...
...
debomatic-webui/views/preferences.ejs
0 → 100644
View file @
273f4856
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Preferences</h3>
</div>
<div class="panel-body">
Panel content
</div>
</div>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment