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
45373a00
Commit
45373a00
authored
Mar 10, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
defined page_generic object
parent
934d765f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
20 deletions
+45
-20
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+2
-18
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+1
-1
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+41
-0
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+1
-1
No files found.
debomatic-webui/public/javascripts/main.js
View file @
45373a00
// update distributions
socket
.
on
(
config
.
events
.
broadcast
.
distributions
,
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
'
+
config
.
paths
.
distribution
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
});
var
socket
=
io
.
connect
(
'
//
'
+
config
.
hostname
);
socket
.
on
(
'
error
'
,
function
(
data
)
{
console
.
error
(
data
)
});
socket
.
on
(
'
status
'
,
function
(
data
)
{
console
.
log
(
'
status
'
)
console
.
log
(
data
)
})
socket
.
on
(
config
.
events
.
broadcast
.
status_update
,
function
(
data
)
{
console
.
log
(
'
status_update
'
)
console
.
log
(
data
)
})
new
Page_Generic
().
init
(
socket
)
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
new
Page_Distrubion
().
init
(
socket
)
...
...
debomatic-webui/public/javascripts/page_distribution.js
View file @
45373a00
...
...
@@ -293,7 +293,7 @@ function Page_Distrubion()
update
.
page
(
old_data
)
});
$
(
window
).
on
(
'
load
'
,
function
(){
$
(
window
).
on
(
'
load
'
,
function
()
{
__check_hash_makes_sense
()
populate
()
});
...
...
debomatic-webui/public/javascripts/page_generic.js
0 → 100644
View file @
45373a00
function
Page_Generic
()
{
var
socket
;
var
update
=
{
distributions
:
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
distributions
.
forEach
(
function
(
name
){
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
'
+
config
.
paths
.
distribution
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
data
=
Utils
.
from_hash_to_data
()
if
(
Utils
.
check_data_distribution
(
data
))
{
$
(
"
#distributions li[id='distribution-
"
+
data
.
distribution
.
name
+
"
']
"
).
addClass
(
'
active
'
)
}
}
}
}
this
.
init
=
function
(
mysocket
)
{
socket
=
mysocket
// update distributions
socket
.
on
(
config
.
events
.
broadcast
.
distributions
,
function
(
distributions
)
{
update
.
distributions
(
distributions
)
});
socket
.
on
(
'
error
'
,
function
(
data
)
{
console
.
error
(
data
)
});
socket
.
on
(
'
status
'
,
function
(
data
)
{
console
.
log
(
'
status
'
)
console
.
log
(
data
)
})
socket
.
on
(
config
.
events
.
broadcast
.
status_update
,
function
(
data
)
{
console
.
log
(
'
status_update
'
)
console
.
log
(
data
)
})
}
}
debomatic-webui/views/layout.ejs
View file @
45373a00
...
...
@@ -45,10 +45,10 @@
<script>
var
config
=
<%-
JSON
.
stringify
(
web
)
%>
var
socket
=
io
.
connect
(
'
//
'
+
config
.
hostname
);
</script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/page_generic.js'
></script>
<script
src=
'/javascripts/page_distribution.js'
></script>
<script
src=
'/javascripts/main.js'
></script>
...
...
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