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
b9ee81a2
Commit
b9ee81a2
authored
Mar 14, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved debug functions to new file
parent
f62fa98d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
43 deletions
+44
-43
debomatic-webui/public/javascripts/debug.js
debomatic-webui/public/javascripts/debug.js
+43
-0
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+0
-43
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+1
-0
No files found.
debomatic-webui/public/javascripts/debug.js
0 → 100644
View file @
b9ee81a2
/*
General indication for debugging use:
usage: debug(level, args)
args: can be everything
level: 1 - user interaction
2 - automatic changes
3 - socket emit data
4 - socket received data
*/
var
debug
=
function
()
{
if
(
arguments
.
length
==
0
)
{
return
}
var
level
=
1
if
(
arguments
.
length
>
2
)
{
level
=
arguments
[
0
]
arguments
[
0
]
=
"
debug (
"
+
level
+
"
) >
"
if
(
level
<=
config
.
preferences
.
debug
)
{
if
(
console
.
debug
)
console
.
debug
.
apply
(
console
,
arguments
)
else
console
.
log
.
apply
(
console
,
arguments
)
}
}
}
/*
An helper debug function for socket events
usage: debug_socket("emit"|"received", event_name, data)
*/
var
debug_socket
=
function
()
{
if
(
arguments
.
length
!=
3
)
return
var
level
=
3
;
if
(
arguments
[
0
]
==
"
received
"
)
level
=
4
debug
(
level
,
"
socket >
"
,
arguments
[
0
],
"
event:
"
,
arguments
[
1
],
"
data:
"
,
arguments
[
2
])
}
\ No newline at end of file
debomatic-webui/public/javascripts/main.js
View file @
b9ee81a2
var
socket
=
io
.
connect
(
'
//
'
+
config
.
hostname
);
/*
General indication for debugging use:
usage: debug(level, args)
args: can be everything
level: 1 - user interaction
2 - automatic changes
3 - socket emit data
4 - socket received data
*/
var
debug
=
function
()
{
if
(
arguments
.
length
==
0
)
{
return
}
var
level
=
1
if
(
arguments
.
length
>
2
)
{
level
=
arguments
[
0
]
arguments
[
0
]
=
"
debug (
"
+
level
+
"
) >
"
if
(
level
<=
config
.
preferences
.
debug
)
{
if
(
console
.
debug
)
console
.
debug
.
apply
(
console
,
arguments
)
else
console
.
log
.
apply
(
console
,
arguments
)
}
}
}
/*
An helper debug function for socket events
usage: debug_socket("emit"|"received", event_name, data)
*/
var
debug_socket
=
function
()
{
if
(
arguments
.
length
!=
3
)
return
var
level
=
3
;
if
(
arguments
[
0
]
==
"
received
"
)
level
=
4
debug
(
level
,
"
socket >
"
,
arguments
[
0
],
"
event:
"
,
arguments
[
1
],
"
data:
"
,
arguments
[
2
])
}
new
Preferences
()
...
...
debomatic-webui/views/layout.ejs
View file @
b9ee81a2
...
...
@@ -69,6 +69,7 @@
</script>
<script
src=
'/javascripts/debug.js'
></script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/preferences.js'
></script>
<script
src=
'/javascripts/page_generic.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