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
0154eeef
Commit
0154eeef
authored
Mar 08, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client emit only one event: get-view
parent
3e408d77
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
debomatic-webui/app.js
debomatic-webui/app.js
+7
-5
debomatic-webui/send.js
debomatic-webui/send.js
+3
-3
debomatic-webui/views/layout.ejs
debomatic-webui/views/layout.ejs
+3
-4
No files found.
debomatic-webui/app.js
View file @
0154eeef
...
...
@@ -39,11 +39,13 @@ app.get('/', routes.index);
io
.
sockets
.
on
(
'
connection
'
,
function
(
socket
)
{
send
.
distributions
(
socket
);
socket
.
on
(
'
get-packages-list
'
,
function
(
distro
)
{
send
.
packages_list
(
socket
,
distro
);
});
socket
.
on
(
'
get-package
'
,
function
(
package_info
)
{
send
.
package
(
socket
,
package_info
);
socket
.
on
(
'
get-view
'
,
function
(
data
)
{
if
(
!
data
.
package
)
{
send
.
packages_list
(
socket
,
data
);
}
else
{
send
.
package
(
socket
,
data
);
}
});
});
...
...
debomatic-webui/send.js
View file @
0154eeef
...
...
@@ -36,11 +36,11 @@ debomatic_sender = {
});
},
packages_list
:
function
(
socket
,
d
istro
)
{
distro_path
=
path
.
join
(
BASE_DIR
,
d
istro
,
'
pool
'
);
packages_list
:
function
(
socket
,
d
ata
)
{
distro_path
=
path
.
join
(
BASE_DIR
,
d
ata
.
distribution
,
'
pool
'
);
get_files_list
(
distro_path
,
true
,
function
(
packages
)
{
result
=
{}
result
.
distribution
=
d
istro
;
result
.
distribution
=
d
ata
.
distribution
;
result
.
packages
=
[]
packages
.
forEach
(
function
(
p
)
{
pack
=
{}
...
...
debomatic-webui/views/layout.ejs
View file @
0154eeef
...
...
@@ -8,16 +8,15 @@
<script>
function
get_path
(
path
)
{
info
=
path
.
split
(
'
/
'
);
data
=
{}
if
(
info
.
length
>=
1
)
{
socket
.
emit
(
"
get-packages-list
"
,
info
[
0
])
;
data
.
distribution
=
info
[
0
]
;
}
if
(
info
.
length
>=
3
){
data
=
{}
data
.
distribution
=
info
[
0
];
data
.
package
=
info
[
1
];
data
.
version
=
info
[
2
];
socket
.
emit
(
"
get-package
"
,
data
);
}
socket
.
emit
(
'
get-view
'
,
data
);
}
var
socket
=
io
.
connect
(
'
//localhost:3000
'
);
...
...
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