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
2f3adf58
Commit
2f3adf58
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed Page to Page_Distribution
parent
6550b051
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
38 deletions
+37
-38
debomatic-webui/public/javascripts/main.js
debomatic-webui/public/javascripts/main.js
+7
-8
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+29
-29
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+1
-1
No files found.
debomatic-webui/public/javascripts/main.js
View file @
2f3adf58
...
@@ -33,35 +33,35 @@ var socket = io.connect('//localhost:3000');
...
@@ -33,35 +33,35 @@ var socket = io.connect('//localhost:3000');
var
old_data
=
Utils
.
from_hash_to_data
()
var
old_data
=
Utils
.
from_hash_to_data
()
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
socket
.
on
(
'
distributions
'
,
function
(
distributions
)
{
Page
.
navbar
.
update
(
distributions
)
Page
_Distrubion
.
navbar
.
update
(
distributions
)
});
});
socket
.
on
(
'
distribution_packages
'
,
function
(
data
){
socket
.
on
(
'
distribution_packages
'
,
function
(
data
){
Page
.
packages
.
set
(
data
)
Page
_Distrubion
.
packages
.
set
(
data
)
})
})
socket
.
on
(
'
package_file_list
'
,
function
(
data
){
socket
.
on
(
'
package_file_list
'
,
function
(
data
){
Page
.
files
.
set
(
data
)
Page
_Distrubion
.
files
.
set
(
data
)
})
})
socket
.
on
(
'
file
'
,
function
(
data
)
{
socket
.
on
(
'
file
'
,
function
(
data
)
{
Page
.
file
.
set
(
data
)
Page
_Distrubion
.
file
.
set
(
data
)
})
})
socket
.
on
(
'
file_newcontent
'
,
function
(
data
)
{
socket
.
on
(
'
file_newcontent
'
,
function
(
data
)
{
Page
.
file
.
append
(
data
)
Page
_Distrubion
.
file
.
append
(
data
)
})
})
socket
.
on
(
'
error
'
,
function
()
{
console
.
error
(
arguments
)
});
socket
.
on
(
'
error
'
,
function
()
{
console
.
error
(
arguments
)
});
$
(
window
).
on
(
'
hashchange
'
,
function
()
{
$
(
window
).
on
(
'
hashchange
'
,
function
()
{
data
=
Utils
.
from_hash_to_data
()
data
=
Utils
.
from_hash_to_data
()
Page
.
update
(
data
,
old_data
)
Page
_Distrubion
.
update
(
data
,
old_data
)
old_data
=
data
old_data
=
data
});
});
$
(
window
).
on
(
'
load
'
,
function
(){
$
(
window
).
on
(
'
load
'
,
function
(){
Page
.
update
(
old_data
)
Page
_Distrubion
.
update
(
old_data
)
$
(
window
).
scroll
(
function
()
{
$
(
window
).
scroll
(
function
()
{
var
offset
=
$
(
"
#file
"
).
offset
();
var
offset
=
$
(
"
#file
"
).
offset
();
if
(
$
(
window
).
scrollTop
()
>
offset
.
top
+
220
)
{
if
(
$
(
window
).
scrollTop
()
>
offset
.
top
+
220
)
{
...
@@ -71,5 +71,4 @@ $(window).on('load', function (){
...
@@ -71,5 +71,4 @@ $(window).on('load', function (){
$
(
"
#sticky
"
).
stop
().
removeClass
(
'
fixed
'
);
$
(
"
#sticky
"
).
stop
().
removeClass
(
'
fixed
'
);
}
}
});
});
});
});
debomatic-webui/public/javascripts/page.js
→
debomatic-webui/public/javascripts/page
_distribution
.js
View file @
2f3adf58
var
Page
=
{
var
Page
_Distrubion
=
{
title
:
{
title
:
{
set
:
function
(
data
)
{
set
:
function
(
data
)
{
...
@@ -27,7 +27,7 @@ var Page = {
...
@@ -27,7 +27,7 @@ var Page = {
tmp
.
package
=
p
tmp
.
package
=
p
$
(
'
#packages ul
'
).
append
(
'
<li id="package-
'
+
p
.
orig_name
+
'
"><a href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
$
(
'
#packages ul
'
).
append
(
'
<li id="package-
'
+
p
.
orig_name
+
'
"><a href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
p
.
name
+
'
<span>
'
+
p
.
version
+
'
</span></a></li>
'
)
})
})
Page
.
select
()
Page
_Distrubion
.
select
()
},
},
clean
:
function
()
{
clean
:
function
()
{
...
@@ -43,7 +43,7 @@ var Page = {
...
@@ -43,7 +43,7 @@ var Page = {
files
:
{
files
:
{
set
:
function
(
data
)
{
set
:
function
(
data
)
{
Page
.
files
.
clean
()
Page
_Distrubion
.
files
.
clean
()
tmp
=
data
tmp
=
data
if
(
data
.
package
.
files
)
{
if
(
data
.
package
.
files
)
{
selected_file
=
Utils
.
check_data_file
(
data
)
selected_file
=
Utils
.
check_data_file
(
data
)
...
@@ -51,12 +51,12 @@ var Page = {
...
@@ -51,12 +51,12 @@ var Page = {
tmp
.
file
=
f
tmp
.
file
=
f
file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
"><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
file
=
$
(
'
<li id="file-
'
+
f
.
orig_name
+
'
"><a title="
'
+
f
.
orig_name
+
'
" href="
'
+
Utils
.
from_data_to_hash
(
tmp
)
+
'
">
'
+
f
.
name
+
'
</a></li>
'
)
file
.
on
(
"
click
"
,
function
(){
file
.
on
(
"
click
"
,
function
(){
Page
.
files
.
select
(
this
)
Page
_Distrubion
.
files
.
select
(
this
)
})
})
$
(
'
#logs ul
'
).
append
(
file
)
$
(
'
#logs ul
'
).
append
(
file
)
})
})
$
(
'
#logs
'
).
show
()
$
(
'
#logs
'
).
show
()
Page
.
select
()
Page
_Distrubion
.
select
()
}
}
if
(
data
.
package
.
debs
)
{
if
(
data
.
package
.
debs
)
{
...
@@ -99,7 +99,7 @@ var Page = {
...
@@ -99,7 +99,7 @@ var Page = {
set
:
function
(
data
)
{
set
:
function
(
data
)
{
$
(
"
#file pre
"
).
html
(
data
.
file
.
content
)
$
(
"
#file pre
"
).
html
(
data
.
file
.
content
)
$
(
"
#file
"
).
show
()
$
(
"
#file
"
).
show
()
Page
.
select
()
Page
_Distrubion
.
select
()
},
},
clean
:
function
()
{
clean
:
function
()
{
$
(
'
#file pre
'
).
html
(
''
)
$
(
'
#file pre
'
).
html
(
''
)
...
@@ -168,20 +168,20 @@ var Page = {
...
@@ -168,20 +168,20 @@ var Page = {
},
},
clean
:
function
()
{
clean
:
function
()
{
Page
.
title
.
clean
()
Page
_Distrubion
.
title
.
clean
()
Page
.
packages
.
clean
()
Page
_Distrubion
.
packages
.
clean
()
Page
.
files
.
clean
()
Page
_Distrubion
.
files
.
clean
()
Page
.
file
.
clean
()
Page
_Distrubion
.
file
.
clean
()
Page
.
select
()
Page
_Distrubion
.
select
()
Page
.
breadcrumb
.
update
()
Page
_Distrubion
.
breadcrumb
.
update
()
},
},
update
:
function
(
data
,
old_data
)
{
update
:
function
(
data
,
old_data
)
{
if
(
!
old_data
)
{
if
(
!
old_data
)
{
if
(
!
data
)
if
(
!
data
)
Page
.
populate
()
Page
_Distrubion
.
populate
()
else
else
Page
.
populate
(
data
)
Page
_Distrubion
.
populate
(
data
)
return
;
return
;
}
}
else
{
else
{
...
@@ -189,16 +189,16 @@ var Page = {
...
@@ -189,16 +189,16 @@ var Page = {
!
Utils
.
check_data_distribution
(
data
)
||
!
Utils
.
check_data_distribution
(
data
)
||
data
.
distribution
.
name
!=
old_data
.
distribution
.
name
)
data
.
distribution
.
name
!=
old_data
.
distribution
.
name
)
{
{
Page
.
clean
()
Page
_Distrubion
.
clean
()
Page
.
populate
(
data
)
Page
_Distrubion
.
populate
(
data
)
}
}
else
if
(
else
if
(
!
Utils
.
check_data_package
(
old_data
)
||
!
Utils
.
check_data_package
(
old_data
)
||
!
Utils
.
check_data_package
(
data
)
||
!
Utils
.
check_data_package
(
data
)
||
data
.
package
.
orig_name
!=
old_data
.
package
.
orig_name
)
data
.
package
.
orig_name
!=
old_data
.
package
.
orig_name
)
{
{
Page
.
file
.
clean
()
Page
_Distrubion
.
file
.
clean
()
Page
.
files
.
get
(
data
)
Page
_Distrubion
.
files
.
get
(
data
)
// I will always get dataestamp from package
// I will always get dataestamp from package
window
.
location
.
hash
+=
'
/datestamp
'
window
.
location
.
hash
+=
'
/datestamp
'
}
}
...
@@ -208,23 +208,23 @@ var Page = {
...
@@ -208,23 +208,23 @@ var Page = {
data
.
file
.
name
!=
old_data
.
file
.
name
data
.
file
.
name
!=
old_data
.
file
.
name
)
)
{
{
Page
.
file
.
get
()
Page
_Distrubion
.
file
.
get
()
}
}
Page
.
title
.
set
(
data
)
Page
_Distrubion
.
title
.
set
(
data
)
Page
.
breadcrumb
.
update
()
Page
_Distrubion
.
breadcrumb
.
update
()
Page
.
select
(
data
)
Page
_Distrubion
.
select
(
data
)
}
}
},
},
populate
:
function
(
data
)
{
populate
:
function
(
data
)
{
Page
.
clean
()
Page
_Distrubion
.
clean
()
if
(
!
data
)
if
(
!
data
)
data
=
Utils
.
from_hash_to_data
()
data
=
Utils
.
from_hash_to_data
()
Page
.
packages
.
get
(
data
)
Page
_Distrubion
.
packages
.
get
(
data
)
Page
.
files
.
get
(
data
)
Page
_Distrubion
.
files
.
get
(
data
)
Page
.
file
.
get
(
data
)
Page
_Distrubion
.
file
.
get
(
data
)
Page
.
select
(
data
)
Page
_Distrubion
.
select
(
data
)
Page
.
breadcrumb
.
update
()
Page
_Distrubion
.
breadcrumb
.
update
()
Page
.
title
.
set
(
data
)
Page
_Distrubion
.
title
.
set
(
data
)
}
}
}
}
debomatic-webui/views/layout.ejs
View file @
2f3adf58
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<script
src=
"/libs/bootstrap/3.1.1/js/bootstrap.min.js"
></script>
<script
src=
"/libs/bootstrap/3.1.1/js/bootstrap.min.js"
></script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/utils.js'
></script>
<script
src=
'/javascripts/page.js'
></script>
<script
src=
'/javascripts/page
_distribution
.js'
></script>
<script
src=
'/javascripts/main.js'
></script>
<script
src=
'/javascripts/main.js'
></script>
</head>
</head>
<body>
<body>
...
...
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