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
3fb306f7
Commit
3fb306f7
authored
Mar 13, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed variable data to view - refactored utils as well
parent
d25f6fb6
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
95 deletions
+95
-95
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+67
-67
debomatic-webui/public/javascripts/page_generic.js
debomatic-webui/public/javascripts/page_generic.js
+3
-3
debomatic-webui/public/javascripts/utils.js
debomatic-webui/public/javascripts/utils.js
+25
-25
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
3fb306f7
This diff is collapsed.
Click to expand it.
debomatic-webui/public/javascripts/page_generic.js
View file @
3fb306f7
...
@@ -33,8 +33,8 @@ function Page_Generic()
...
@@ -33,8 +33,8 @@ function Page_Generic()
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
'
+
config
.
paths
.
distribution
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
$
(
'
#distributions ul
'
).
append
(
'
<li id="distribution-
'
+
name
+
'
"><a href="
'
+
config
.
paths
.
distribution
+
'
#
'
+
name
+
'
">
'
+
name
+
'
</li>
'
);
});
});
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
if
(
window
.
location
.
pathname
==
config
.
paths
.
distribution
)
{
data
=
Utils
.
from_hash_to_data
()
var
data
=
Utils
.
from_hash_to_view
()
if
(
Utils
.
check_
data
_distribution
(
data
))
{
if
(
Utils
.
check_
view
_distribution
(
data
))
{
$
(
"
#distributions li[id='distribution-
"
+
data
.
distribution
.
name
+
"
']
"
).
addClass
(
'
active
'
)
$
(
"
#distributions li[id='distribution-
"
+
data
.
distribution
.
name
+
"
']
"
).
addClass
(
'
active
'
)
}
}
}
}
...
@@ -98,7 +98,7 @@ function Page_Generic()
...
@@ -98,7 +98,7 @@ function Page_Generic()
distributions
.
set
(
socket_distributions
)
distributions
.
set
(
socket_distributions
)
});
});
socket
.
on
(
'
error
'
,
function
(
data
)
{
consol_e
.
error
(
data
)
});
socket
.
on
(
'
error
'
,
function
(
socket_data_error
)
{
console
.
error
(
socket_data_error
)
});
socket
.
on
(
_e
.
client
.
status
,
function
(
packages_status
)
{
socket
.
on
(
_e
.
client
.
status
,
function
(
packages_status
)
{
status
.
set
(
packages_status
)
status
.
set
(
packages_status
)
...
...
debomatic-webui/public/javascripts/utils.js
View file @
3fb306f7
var
Utils
=
{
var
Utils
=
{
from_hash_to_
data
:
function
(
hash
)
{
from_hash_to_
view
:
function
(
hash
)
{
if
(
!
hash
)
if
(
!
hash
)
hash
=
window
.
location
.
hash
hash
=
window
.
location
.
hash
hash
=
hash
.
replace
(
'
#
'
,
''
)
hash
=
hash
.
replace
(
'
#
'
,
''
)
info
=
hash
.
split
(
'
/
'
);
info
=
hash
.
split
(
'
/
'
);
data
=
{}
var
view
=
{}
if
(
info
.
length
>=
1
)
{
if
(
info
.
length
>=
1
)
{
data
.
distribution
=
{}
view
.
distribution
=
{}
data
.
distribution
.
name
=
info
[
0
];
view
.
distribution
.
name
=
info
[
0
];
}
}
if
(
info
.
length
>=
3
){
if
(
info
.
length
>=
3
){
data
.
package
=
{}
view
.
package
=
{}
data
.
package
.
name
=
info
[
1
];
view
.
package
.
name
=
info
[
1
];
data
.
package
.
version
=
info
[
2
];
view
.
package
.
version
=
info
[
2
];
data
.
package
.
orig_name
=
data
.
package
.
name
+
'
_
'
+
data
.
package
.
version
view
.
package
.
orig_name
=
view
.
package
.
name
+
'
_
'
+
view
.
package
.
version
}
}
if
(
info
.
length
>=
4
)
{
if
(
info
.
length
>=
4
)
{
data
.
file
=
{}
view
.
file
=
{}
data
.
file
.
name
=
info
[
3
]
view
.
file
.
name
=
info
[
3
]
data
.
file
.
orig_name
=
data
.
package
.
orig_name
+
'
.
'
+
data
.
file
.
name
view
.
file
.
orig_name
=
view
.
package
.
orig_name
+
'
.
'
+
view
.
file
.
name
}
}
return
data
return
view
},
},
from_
data_to_hash
:
function
(
data
)
{
from_
view_to_hash
:
function
(
view
)
{
hash
=
"
#
"
hash
=
"
#
"
if
(
Utils
.
check_
data_distribution
(
data
))
{
if
(
Utils
.
check_
view_distribution
(
view
))
{
hash
=
hash
+
data
.
distribution
.
name
hash
=
hash
+
view
.
distribution
.
name
if
(
Utils
.
check_
data_package
(
data
))
{
if
(
Utils
.
check_
view_package
(
view
))
{
hash
=
hash
+
'
/
'
+
data
.
package
.
name
+
"
/
"
+
data
.
package
.
version
hash
=
hash
+
'
/
'
+
view
.
package
.
name
+
"
/
"
+
view
.
package
.
version
if
(
Utils
.
check_
data_file
(
data
))
if
(
Utils
.
check_
view_file
(
view
))
hash
=
hash
+
'
/
'
+
data
.
file
.
name
hash
=
hash
+
'
/
'
+
view
.
file
.
name
}
}
}
}
return
hash
return
hash
},
},
check_
data_distribution
:
function
(
data
)
{
check_
view_distribution
:
function
(
view
)
{
return
data
&&
data
.
distribution
&&
data
.
distribution
.
name
return
view
&&
view
.
distribution
&&
view
.
distribution
.
name
},
},
check_
data_package
:
function
(
data
)
{
check_
view_package
:
function
(
view
)
{
return
Utils
.
check_
data_distribution
(
data
)
&&
data
.
package
&&
data
.
package
.
name
&&
data
.
package
.
version
&&
data
.
package
.
orig_name
return
Utils
.
check_
view_distribution
(
view
)
&&
view
.
package
&&
view
.
package
.
name
&&
view
.
package
.
version
&&
view
.
package
.
orig_name
},
},
check_
data_file
:
function
(
data
)
{
check_
view_file
:
function
(
view
)
{
return
Utils
.
check_
data_package
(
data
)
&&
data
.
file
&&
data
.
file
.
name
return
Utils
.
check_
view_package
(
view
)
&&
view
.
file
&&
view
.
file
.
name
},
},
get_status_icon_and_class
:
function
(
status_data
)
{
get_status_icon_and_class
:
function
(
status_data
)
{
...
...
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