Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8349fd0a
authored
Apr 04, 2015
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
html tag got data- prefix
parent
b57ec70b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
+1
-1
circle/dashboard/tests/selenium/util.py
+14
-13
No files found.
circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html
View file @
8349fd0a
...
...
@@ -5,7 +5,7 @@
{% for a in activities %}
<div
class=
"activity{% if a.pk == active.pk %} activity-active{%endif%}"
data-activity-id=
"{{ a.pk }}"
data-activity-code=
"{{ a.activity_code }}"
timestamp=
"{{ a.started|date:"
U
"
}}"
>
data-activity-id=
"{{ a.pk }}"
data-activity-code=
"{{ a.activity_code }}"
data-
timestamp=
"{{ a.started|date:"
U
"
}}"
>
<span
class=
"timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}"
>
<i
class=
"fa {% if not a.finished %}fa-refresh fa-spin {% else %}fa-{{a.icon}}{% endif %}"
></i>
</span>
...
...
circle/dashboard/tests/selenium/util.py
View file @
8349fd0a
...
...
@@ -37,6 +37,17 @@ logger = logging.getLogger(SeleniumConfig.logger_name)
class
SeleniumMixin
(
object
):
def
current_url
(
self
):
url_base
=
urlparse
.
urlparse
(
self
.
driver
.
current_url
)
url_save
=
(
"
%(host)
s
%(url)
s"
%
{
'host'
:
self
.
conf
.
host
,
'url'
:
urlparse
.
urljoin
(
url_base
.
path
,
url_base
.
query
)})
if
url_base
.
fragment
:
url_save
=
(
"
%(url)
s#
%(fragment)
s"
%
{
'url'
:
url_save
,
'fragment'
:
url_base
.
fragment
})
return
url_save
def
list_options
(
self
,
select
):
try
:
option_dic
=
{}
...
...
@@ -244,10 +255,7 @@ class CircleSeleniumMixin(SeleniumMixin):
def
save_template_from_vm
(
self
,
name
):
try
:
url_base
=
urlparse
.
urlparse
(
self
.
driver
.
current_url
)
url_save
=
(
"
%(host)
s
%(url)
s"
%
{
'host'
:
self
.
conf
.
host
,
'url'
:
urlparse
.
urljoin
(
url_base
.
path
,
url_base
.
query
)})
url_save
=
self
.
current_url
()
WebDriverWait
(
self
.
driver
,
self
.
conf
.
wait_max_sec
)
.
until
(
ec
.
element_to_be_clickable
((
By
.
CSS_SELECTOR
,
...
...
@@ -404,14 +412,7 @@ class CircleSeleniumMixin(SeleniumMixin):
"""
try
:
if
restore
:
url_base
=
urlparse
.
urlparse
(
self
.
driver
.
current_url
)
url_save
=
(
"
%(host)
s
%(url)
s"
%
{
'host'
:
self
.
conf
.
host
,
'url'
:
urlparse
.
urljoin
(
url_base
.
path
,
url_base
.
query
)})
if
url_base
.
fragment
:
url_save
=
(
"
%(url)
s#
%(fragment)
s"
%
{
'url'
:
url_save
,
'fragment'
:
url_base
.
fragment
})
url_save
=
self
.
current_url
()
self
.
driver
.
get
(
'
%(host)
s/dashboard/vm/activity/
%(id)
s/'
%
{
'host'
:
self
.
conf
.
host
,
'id'
:
operation_id
})
...
...
@@ -512,7 +513,7 @@ class CircleSeleniumMixin(SeleniumMixin):
logger
.
warning
(
"Found activity list for
%
s:"
%
code_text
)
for
activity
in
searched_activity
:
activity_id
=
activity
.
get_attribute
(
'data-activity-id'
)
key
=
activity
.
get_attribute
(
'timestamp'
)
key
=
activity
.
get_attribute
(
'
data-
timestamp'
)
logger
.
warning
(
"
%(id)
s @
%(activity)
s"
%
{
'id'
:
activity_id
,
'activity'
:
datetime
.
fromtimestamp
(
...
...
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