add key --stop-consoled, changed color

develop
Спиридонов Денис 12 years ago
parent e078d723b4
commit c44ea9b949

@ -180,11 +180,18 @@ def parse():
parser.add_argument(
'--update-crl', action='store_true', default=False,
dest='update_crl', help=_("update the certificate revocation lists"))
parser.add_argument(
'--stop-consoled', action='store_true', default=False,
dest='stop_consoled', help=_("stop cl-consoled"))
return parser
def https_server(client, args, unknown_args, url, clVarsCore):
client_post_auth(client)
if args.stop_consoled:
os.system('cl-consoled --stop')
return 0
if args.session_clean:
session_clean(client)

@ -83,7 +83,7 @@ def print_brief_group(Fields, group_name):
print group_name
uncompatible_count = 0
green = '\033[32m * \033[0m'
red = '\033[31m * \033[0m'
red = '\033[91m * \033[0m'
for field in Fields:
if field.uncompatible:
uncompatible_count += 1
@ -281,23 +281,21 @@ def show_table(table, item):
sys.stdout.flush()
sys.stdout.write(res)
#HEADER = '\033[95m'
#OKBLUE = '\033[94m'
#OKGREEN = '\033[92m'
#ENDC = '\033[0m'
def show_error(item):
FAIL = '\033[31m'
ENDC = '\033[0m'
print FAIL + _("Error")
print FAIL + item.message
print ENDC
red = '\033[91m * \033[0m'
# FAIL = '\033[31m'
# ENDC = '\033[0m'
print red + _("Error")
print red + item.message
# print ENDC
def show_warning(item):
WARNING = '\033[91m'
print WARNING + _("Warning")
print WARNING + item.message
ENDC = '\033[0m'
print ENDC
yellow = '\033[93m * \033[0m'
# WARNING = '\033[91m'
print yellow + _("Warning")
print yellow + item.message
# ENDC = '\033[0m'
# print ENDC
def show_group(item):
print "Group"

@ -107,7 +107,7 @@ def call_method(client, args):
if method_result.ReturnedMessage[0].type and \
method_result.ReturnedMessage[0].type != "pid":
for error in method_result.ReturnedMessage:
red = '\033[31m * \033[0m'
red = '\033[91m * \033[0m'
print red + error.message
return None
@ -118,10 +118,10 @@ def call_method(client, args):
while True:
try:
ask = raw_input('\n' + _('Run process? (yes/no): '))
red = '\033[31m * \033[0m'
red = '\033[91m * \033[0m'
except KeyboardInterrupt:
ask = 'no'
red = '\n'+'\033[31m * \033[0m'
red = '\n'+'\033[91m * \033[0m'
if ask.lower() in ['n', 'no']:
print red + _('Interrupted by user')
return None
@ -158,7 +158,7 @@ def collect_object(client, param_object, view, args):
elif field.element in ['multichoice', 'multichoice_add', \
'selecttable', 'selecttable_add']:
val = _getattr(args, field.name)
if val == 'off':
if val in ['off', 'none']:
param_object[field.name] = listToArray(client, [None])
else:
param_object[field.name] = listToArray(client, \

@ -47,7 +47,7 @@ def client_list_pid(client):
""" get all process id for this session """
sid = get_sid(client.SID_FILE)
red = '\033[31m * \033[0m'
red = '\033[91m * \033[0m'
green = '\033[32m * \033[0m'
try:
list_pid = client.service.list_pid(sid = sid)

@ -61,7 +61,7 @@ def client_del_sid(client):
return 0
def sid_inf(client, sid):
red = '\033[31m * \033[0m'
red = '\033[91m * \033[0m'
green = '\033[32m * \033[0m'
""" get information about selected session """
s = client.service.sid_info(sid)
@ -93,7 +93,7 @@ def client_session_info(client, sid = None):
return 1
def client_session_list(client):
red = '\033[31m * \033[0m'
red = '\033[91m * \033[0m'
green = '\033[32m * \033[0m'
res = client.service.get_sessions(client.sid)
if hasattr (res, 'string'):

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: console_gui_translate\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-07 11:36+0300\n"
"PO-Revision-Date: 2012-06-07 11:36+0300\n"
"POT-Creation-Date: 2012-06-08 12:12+0300\n"
"PO-Revision-Date: 2012-06-08 12:12+0300\n"
"Last-Translator: Denis <ds@mail.ru>\n"
"Language-Team: \n"
"Language: \n"
@ -171,45 +171,45 @@ msgid "Clear Cache error! "
msgstr "Ошибка очистки кэша!"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:132
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:158
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:166
msgid "yes"
msgstr "да"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:134
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:160
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:168
msgid "no"
msgstr "нет"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:136
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:162
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:170
msgid "auto"
msgstr "авто"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:181
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:189
msgid "Not used"
msgstr "Не используется"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:283
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:288
msgid "Error"
msgstr "Ошибка"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:289
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:295
msgid "Warning"
msgstr "Предепреждение"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:327
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:333
msgid "Method not found: "
msgstr "Метод не найден: "
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:359
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:365
msgid "server send pid = "
msgstr "сервер послал идентификатор процесса = "
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:449
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:455
msgid "Process not exist or not belong to your session"
msgstr "Процесс не существует или принадлежит не вашей сессии"
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:501
#: /var/calculate/mydir/git/calculate-console/console/application/function.py:507
#, python-format
msgid "Error task by %s"
msgstr "Ошибка задачи на %s"
@ -286,28 +286,32 @@ msgstr "просмотр списка активных сессий на сер
msgid "update the certificate revocation lists"
msgstr "обновить список отзыва сертификатов"
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:286
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:185
msgid "stop cl-consoled"
msgstr "остановить cl-consoled"
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:293
#, python-format
msgid "cannot create directory %s"
msgstr "Не удалось создать директорию %s"
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:320
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:327
#: /var/calculate/mydir/git/calculate-console/console/application/methods_func.py:29
msgid "Failed to connect"
msgstr "Не удалось подключиться"
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:381
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:388
msgid "Password is invalid"
msgstr "Неверный пароль"
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:386
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:402
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:393
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:409
msgid "Error: "
msgstr "Ошибка: "
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:408
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:411
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:413
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:415
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:418
#: /var/calculate/mydir/git/calculate-console/console/application/cl_client.py:420
#, python-format
msgid "Exception: %s"
msgstr "Исключение: %s"
@ -320,12 +324,12 @@ msgstr "Запустить процесс? (yes/no): "
msgid "Interrupted by user"
msgstr "Прервано пользователем"
#: /var/calculate/mydir/git/calculate-console/console/application/methods_func.py:199
#: /var/calculate/mydir/git/calculate-console/console/application/methods_func.py:197
#, python-format
msgid "Password for %s: "
msgstr "Пароль для %s: "
#: /var/calculate/mydir/git/calculate-console/console/application/methods_func.py:200
#: /var/calculate/mydir/git/calculate-console/console/application/methods_func.py:198
#, python-format
msgid "Repeat password for %s: "
msgstr "Повтор пароля для %s: "

Loading…
Cancel
Save