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
cd9b8916
Commit
cd9b8916
authored
Mar 16, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved welcome view
parent
47a122f0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
5 deletions
+49
-5
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+44
-5
debomatic-webui/public/stylesheets/style.css
debomatic-webui/public/stylesheets/style.css
+4
-0
debomatic-webui/views/distribution.ejs
debomatic-webui/views/distribution.ejs
+1
-0
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
cd9b8916
...
@@ -50,10 +50,7 @@ function Page_Distrubion(socket)
...
@@ -50,10 +50,7 @@ function Page_Distrubion(socket)
return
false
return
false
}
}
if
(
!
window
.
location
.
hash
)
{
if
(
!
window
.
location
.
hash
)
{
title
.
set
(
"
Please select a distribution
"
)
welcome
.
show
()
file
.
clean
()
files
.
hide
()
unselect
()
return
false
return
false
}
}
var
info
=
window
.
location
.
hash
.
split
(
'
/
'
)
var
info
=
window
.
location
.
hash
.
split
(
'
/
'
)
...
@@ -91,7 +88,7 @@ function Page_Distrubion(socket)
...
@@ -91,7 +88,7 @@ function Page_Distrubion(socket)
var
packages
=
{
var
packages
=
{
set
:
function
(
socket_data
)
{
set
:
function
(
socket_data
)
{
$
(
'
#packages ul
'
).
html
(
''
)
packages
.
clean
(
)
var
tmp
=
Utils
.
clone
(
socket_data
)
var
tmp
=
Utils
.
clone
(
socket_data
)
tmp
.
file
=
null
tmp
.
file
=
null
view
.
packages
=
{}
view
.
packages
=
{}
...
@@ -107,6 +104,7 @@ function Page_Distrubion(socket)
...
@@ -107,6 +104,7 @@ function Page_Distrubion(socket)
else
{
else
{
$
(
'
#packages ul
'
).
append
(
'
<li class="text-muted">No packages yet</li>
'
)
$
(
'
#packages ul
'
).
append
(
'
<li class="text-muted">No packages yet</li>
'
)
}
}
packages
.
show
()
},
},
clean
:
function
()
{
clean
:
function
()
{
...
@@ -147,6 +145,12 @@ function Page_Distrubion(socket)
...
@@ -147,6 +145,12 @@ function Page_Distrubion(socket)
// in case user is watching this package, update also view.package
// in case user is watching this package, update also view.package
view
.
package
.
status
=
Utils
.
clone
(
status_data
.
status
)
view
.
package
.
status
=
Utils
.
clone
(
status_data
.
status
)
}
}
},
show
:
function
()
{
$
(
"
#packages
"
).
show
()
},
hide
:
function
()
{
$
(
"
#packages
"
).
hide
()
}
}
}
}
...
@@ -372,6 +376,35 @@ function Page_Distrubion(socket)
...
@@ -372,6 +376,35 @@ function Page_Distrubion(socket)
},
},
}
}
var
welcome
=
{
set
:
function
(
distributions
)
{
welcome
.
clean
()
if
(
distributions
.
length
<
1
)
{
$
(
'
#welcome
'
).
append
(
'
<p class="lead text-muted">There is no distribution at the moment</p>
'
)
}
else
{
distributions
.
forEach
(
function
(
name
){
$
(
'
#welcome
'
).
append
(
'
<a class="btn btn-lg btn-primary" href="
'
+
config
.
paths
.
distribution
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</a>
'
);
});
}
},
show
:
function
()
{
title
.
set
(
"
Please select a distribution
"
)
breadcrumb
.
update
(
"
Select a distribution
"
)
packages
.
hide
()
file
.
clean
()
files
.
hide
()
unselect
()
$
(
"
#welcome
"
).
show
()
},
clean
:
function
()
{
$
(
"
#welcome
"
).
html
(
''
)
},
hide
:
function
()
{
$
(
"
#welcome
"
).
hide
()
}
}
var
preferences
=
function
()
{
var
preferences
=
function
()
{
if
(
!
config
.
preferences
.
sidebar
)
{
if
(
!
config
.
preferences
.
sidebar
)
{
debug
(
2
,
"
no sidebar - updating html
"
)
debug
(
2
,
"
no sidebar - updating html
"
)
...
@@ -405,6 +438,7 @@ function Page_Distrubion(socket)
...
@@ -405,6 +438,7 @@ function Page_Distrubion(socket)
}
}
var
clean
=
function
()
{
var
clean
=
function
()
{
welcome
.
hide
()
title
.
clean
()
title
.
clean
()
packages
.
clean
()
packages
.
clean
()
files
.
clean
()
files
.
clean
()
...
@@ -471,6 +505,11 @@ function Page_Distrubion(socket)
...
@@ -471,6 +505,11 @@ function Page_Distrubion(socket)
error
.
set
(
socket_error
)
error
.
set
(
socket_error
)
})
})
socket
.
on
(
config
.
events
.
broadcast
.
distributions
,
function
(
socket_data
)
{
debug_socket
(
"
received
"
,
config
.
events
.
broadcast
.
distributions
,
socket_data
)
welcome
.
set
(
socket_data
)
})
socket
.
on
(
_e
.
distribution_packages
.
set
,
function
(
socket_data
){
socket
.
on
(
_e
.
distribution_packages
.
set
,
function
(
socket_data
){
debug_socket
(
"
received
"
,
_e
.
distribution_packages
.
set
,
socket_data
)
debug_socket
(
"
received
"
,
_e
.
distribution_packages
.
set
,
socket_data
)
packages
.
set
(
socket_data
)
packages
.
set
(
socket_data
)
...
...
debomatic-webui/public/stylesheets/style.css
View file @
cd9b8916
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
margin
:
0
;
margin
:
0
;
}
}
#welcome
.btn-lg
{
margin
:
10px
;
}
aside
.nav-pills
li
{
aside
.nav-pills
li
{
line-height
:
10px
;
line-height
:
10px
;
}
}
...
...
debomatic-webui/views/distribution.ejs
View file @
cd9b8916
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
<header>
<header>
<h1 id="title"></h1>
<h1 id="title"></h1>
</header>
</header>
<div id="welcome"></div>
<div id="file">
<div id="file">
<pre></pre>
<pre></pre>
<div id="fileOffset"></div>
<div id="fileOffset"></div>
...
...
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