Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
e8a72c8c
Commit
e8a72c8c
authored
Jan 01, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改一些翻译
parent
73a99de5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
28 deletions
+2
-28
django.po
apps/locale/zh/LC_MESSAGES/django.po
+1
-1
task_list.html
apps/ops/templates/ops/task_list.html
+0
-6
view_urls.py
apps/ops/urls/view_urls.py
+0
-1
views.py
apps/ops/views.py
+1
-17
signals_handler.py
apps/terminal/signals_handler.py
+0
-3
No files found.
apps/locale/zh/LC_MESSAGES/django.po
View file @
e8a72c8c
...
...
@@ -1310,7 +1310,7 @@ msgstr "ID"
#: ops/templates/ops/adhoc_detail.html:94 ops/templates/ops/task_list.html:40
msgid "Run times"
msgstr "执行
时间
"
msgstr "执行
次数
"
#: ops/templates/ops/adhoc_detail.html:98 ops/templates/ops/task_detail.html:72
msgid "Last run"
...
...
apps/ops/templates/ops/task_list.html
View file @
e8a72c8c
...
...
@@ -3,11 +3,6 @@
{% load static %}
{% block content_left_head %}
<link
href=
"{% static 'css/plugins/datepicker/datepicker3.css' %}"
rel=
"stylesheet"
>
<style>
#search_btn
{
margin-bottom
:
0
;
}
</style>
{% endblock %}
...
...
@@ -72,7 +67,6 @@
{% endif %}
</td>
<td
class=
"text-center"
>
<a
href=
"{% url 'ops:task-run' pk=object.id %}"
class=
"btn btn-xs btn-info"
>
{% trans "Run" %}
</a>
<a
data-uid=
"{{ object.id }}"
class=
"btn btn-xs btn-danger btn-del"
>
{% trans "Delete" %}
</a>
</td>
</tr>
...
...
apps/ops/urls/view_urls.py
View file @
e8a72c8c
...
...
@@ -15,7 +15,6 @@ urlpatterns = [
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]{36})/$'
,
views
.
TaskDetailView
.
as_view
(),
name
=
'task-detail'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]{36})/adhoc/$'
,
views
.
TaskAdhocView
.
as_view
(),
name
=
'task-adhoc'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]{36})/history/$'
,
views
.
TaskHistoryView
.
as_view
(),
name
=
'task-history'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]{36})/run/$'
,
views
.
TaskRunView
.
as_view
(),
name
=
'task-run'
),
url
(
r'^adhoc/(?P<pk>[0-9a-zA-Z\-]{36})/$'
,
views
.
AdHocDetailView
.
as_view
(),
name
=
'adhoc-detail'
),
url
(
r'^adhoc/(?P<pk>[0-9a-zA-Z\-]{36})/history/$'
,
views
.
AdHocHistoryView
.
as_view
(),
name
=
'adhoc-history'
),
url
(
r'^adhoc/history/(?P<pk>[0-9a-zA-Z\-]{36})/$'
,
views
.
AdHocHistoryDetailView
.
as_view
(),
name
=
'adhoc-history-detail'
),
...
...
apps/ops/views.py
View file @
e8a72c8c
# ~*~ coding: utf-8 ~*~
from
__future__
import
unicode_literals
import
time
from
datetime
import
datetime
from
django.utils.translation
import
ugettext
as
_
from
django.conf
import
settings
from
django.views.generic
import
ListView
,
DetailView
,
View
from
django.utils
import
timezone
from
django.shortcuts
import
redirect
,
reverse
from
django.views.generic
import
ListView
,
DetailView
from
common.mixins
import
DatetimeSearchMixin
from
.models
import
Task
,
AdHoc
,
AdHocRunHistory
from
ops.tasks
import
rerun_task
class
TaskListView
(
DatetimeSearchMixin
,
ListView
):
...
...
@@ -87,16 +81,6 @@ class TaskHistoryView(DetailView):
return
super
()
.
get_context_data
(
**
kwargs
)
class
TaskRunView
(
View
):
pk_url_kwarg
=
'pk'
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
pk
=
kwargs
.
get
(
self
.
pk_url_kwarg
)
rerun_task
.
delay
(
pk
)
time
.
sleep
(
0.5
)
return
redirect
(
reverse
(
'ops:task-detail'
,
kwargs
=
{
'pk'
:
pk
}))
class
AdHocDetailView
(
DetailView
):
model
=
AdHoc
template_name
=
'ops/adhoc_detail.html'
...
...
apps/terminal/signals_handler.py
View file @
e8a72c8c
# -*- coding: utf-8 -*-
#
import
threading
import
time
from
celery
import
shared_task
from
django.core.cache
import
cache
from
django.db.utils
import
ProgrammingError
,
OperationalError
...
...
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