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
c4289870
Commit
c4289870
authored
Mar 13, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored functions name
parent
37f31637
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+22
-23
No files found.
debomatic-webui/public/javascripts/page_generic.js
View file @
c4289870
...
@@ -22,8 +22,8 @@ function Page_Generic()
...
@@ -22,8 +22,8 @@ function Page_Generic()
return
result
.
html
()
return
result
.
html
()
}
}
var
update
=
{
var
distributions
=
{
distributions
:
function
(
distributions
)
{
set
:
function
(
distributions
)
{
$
(
'
#distributions ul
'
).
html
(
''
);
$
(
'
#distributions ul
'
).
html
(
''
);
if
(
distributions
.
length
<
1
)
{
if
(
distributions
.
length
<
1
)
{
$
(
'
#distributions ul
'
).
append
(
'
<li><a title="There is no distribution at the moment" onclick="return false">None</li>
'
)
$
(
'
#distributions ul
'
).
append
(
'
<li><a title="There is no distribution at the moment" onclick="return false">None</li>
'
)
...
@@ -40,8 +40,22 @@ function Page_Generic()
...
@@ -40,8 +40,22 @@ function Page_Generic()
}
}
}
}
},
},
}
status
:
function
(
status_package
)
{
var
status
=
{
set
:
function
(
data_status
)
{
$
(
"
#status ul
"
).
html
(
''
)
if
(
data_status
.
packages
.
length
>
0
)
{
data_status
.
packages
.
forEach
(
function
(
p
){
status
.
append
(
p
)
})
}
},
append
:
function
(
status_package
)
{
$
(
'
#status .idle
'
).
hide
()
$
(
"
#status ul
"
).
html
(
$
(
"
#status ul
"
).
html
()
+
"
"
+
__get_status_html
(
status_package
))
},
update
:
function
(
status_package
)
{
var
li
=
$
(
"
#status li[id='status-
"
+
status_package
.
distribution
+
"
-
"
+
status_package
.
package
+
"
']
"
)
var
li
=
$
(
"
#status li[id='status-
"
+
status_package
.
distribution
+
"
-
"
+
status_package
.
package
+
"
']
"
)
if
(
li
.
length
>
0
if
(
li
.
length
>
0
...
@@ -71,22 +85,7 @@ function Page_Generic()
...
@@ -71,22 +85,7 @@ function Page_Generic()
else
if
(
status_package
.
status
==
config
.
status
.
package
.
building
)
{
else
if
(
status_package
.
status
==
config
.
status
.
package
.
building
)
{
status
.
append
(
status_package
)
status
.
append
(
status_package
)
}
}
}
}
var
status
=
{
set
:
function
(
data_status
)
{
$
(
"
#status ul
"
).
html
(
''
)
if
(
data_status
.
packages
.
length
>
0
)
{
data_status
.
packages
.
forEach
(
function
(
p
){
status
.
append
(
p
)
})
}
},
},
append
:
function
(
status_package
)
{
$
(
'
#status .idle
'
).
hide
()
$
(
"
#status ul
"
).
html
(
$
(
"
#status ul
"
).
html
()
+
"
"
+
__get_status_html
(
status_package
))
}
}
}
this
.
init
=
function
(
mysocket
)
{
this
.
init
=
function
(
mysocket
)
{
...
@@ -95,18 +94,18 @@ function Page_Generic()
...
@@ -95,18 +94,18 @@ function Page_Generic()
socket
=
mysocket
socket
=
mysocket
// update distributions
// update distributions
socket
.
on
(
_e
.
broadcast
.
distributions
,
function
(
distributions
)
{
socket
.
on
(
_e
.
broadcast
.
distributions
,
function
(
socket_
distributions
)
{
update
.
distributions
(
distributions
)
distributions
.
set
(
socket_
distributions
)
});
});
socket
.
on
(
'
error
'
,
function
(
data
)
{
consol_e
.
error
(
data
)
});
socket
.
on
(
'
error
'
,
function
(
data
)
{
consol_e
.
error
(
data
)
});
socket
.
on
(
_e
.
client
.
status
,
function
(
packages
)
{
socket
.
on
(
_e
.
client
.
status
,
function
(
packages
_status
)
{
status
.
set
(
packages
)
status
.
set
(
packages
_status
)
})
})
socket
.
on
(
_e
.
broadcast
.
status_update
,
function
(
package_status
)
{
socket
.
on
(
_e
.
broadcast
.
status_update
,
function
(
package_status
)
{
update
.
status
(
package_status
)
status
.
update
(
package_status
)
})
})
}
}
}
}
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