|
|
|
@ -45,6 +45,8 @@ class SH (ClassSerializer):
|
|
|
|
|
Steps = Array(Array(String))
|
|
|
|
|
isopath = Array(String)
|
|
|
|
|
|
|
|
|
|
comboLang = String
|
|
|
|
|
|
|
|
|
|
# for check parameters without call method
|
|
|
|
|
CheckOnly = Boolean
|
|
|
|
|
|
|
|
|
@ -64,8 +66,8 @@ class ApiWsdl:
|
|
|
|
|
# Учёт процесса выполнения
|
|
|
|
|
perc = 0
|
|
|
|
|
while self.getProgress() < 100:
|
|
|
|
|
time.sleep(0.6)
|
|
|
|
|
perc += 20
|
|
|
|
|
time.sleep(1.6)
|
|
|
|
|
perc += 10
|
|
|
|
|
# Увеличение процента выполнения процесса
|
|
|
|
|
self.setProgress (perc)
|
|
|
|
|
#question = self.askQuestion('enter name: ', None)
|
|
|
|
@ -133,7 +135,8 @@ class ApiWsdl:
|
|
|
|
|
@rpc(Integer, SH, _returns = Array(ReturnedMessage))
|
|
|
|
|
@Dec.check_permissions(["test"])
|
|
|
|
|
@Dec.console('cl-test')
|
|
|
|
|
@Dec.gui('Utilities.Тестовые.Подгруппа', 'Первый тест','/usr/share/wallpapers/Horos/contents/screenshot.png')
|
|
|
|
|
@Dec.gui('Utilities.Тестовые.Подгруппа', 'Первый тест', \
|
|
|
|
|
'/usr/share/wallpapers/Horos/contents/screenshot.png,system-log-out')
|
|
|
|
|
def test ( self, sid, rrr):
|
|
|
|
|
#print '>>>>>>>', sid, rrr
|
|
|
|
|
name_meth = 'test'
|
|
|
|
@ -182,6 +185,7 @@ class ApiWsdl:
|
|
|
|
|
say_hello_meth = type("CommonInstall",(self.Common, ApiWsdl, object), {})
|
|
|
|
|
name = sh.name
|
|
|
|
|
pid = self.startprocess(sid, target=say_hello_meth, method="say_hello_meth",\
|
|
|
|
|
method_name='test', \
|
|
|
|
|
args_proc = (name, times, town))
|
|
|
|
|
returnmess = ReturnedMessage(type = 'pid', message = pid)
|
|
|
|
|
#returnmess.type = "pid"
|
|
|
|
@ -266,12 +270,13 @@ class ApiWsdl:
|
|
|
|
|
type = 'steps',
|
|
|
|
|
# Table
|
|
|
|
|
tablevalue = Table(
|
|
|
|
|
head = ['Табличка','Завершение'],
|
|
|
|
|
head = ['Табличка','Второй шаг','Завершение'],
|
|
|
|
|
body = [['times','name','isopath','Partition_table',\
|
|
|
|
|
'boolvariable2','boolvariable', 'combovariable', \
|
|
|
|
|
'combovariable2'],\
|
|
|
|
|
['radiovariable2','radiovariable','comboEdit1', \
|
|
|
|
|
'comboEdit2', 'multichoice_add', 'multichoice']]
|
|
|
|
|
'comboEdit2', 'multichoice_add', 'multichoice'], \
|
|
|
|
|
['comboLang']]
|
|
|
|
|
)))
|
|
|
|
|
if expert:
|
|
|
|
|
group.fields.append(Field(
|
|
|
|
@ -384,7 +389,7 @@ class ApiWsdl:
|
|
|
|
|
elif step == 1:
|
|
|
|
|
view = ViewInfo(groups=[])
|
|
|
|
|
|
|
|
|
|
group = GroupField(name=_("TEST_METHOD"),nextlabel=_("Next"),last=True)
|
|
|
|
|
group = GroupField(name=_("TEST_METHOD"),nextlabel=_("Next"))
|
|
|
|
|
group.fields = []
|
|
|
|
|
|
|
|
|
|
group.fields.append(Field(
|
|
|
|
@ -469,7 +474,38 @@ class ApiWsdl:
|
|
|
|
|
#opt = Option(longopt="--bot",
|
|
|
|
|
#metavalue="BOT"),
|
|
|
|
|
#element = "button"))
|
|
|
|
|
|
|
|
|
|
view.groups.append(group)
|
|
|
|
|
elif step == 2:
|
|
|
|
|
view = ViewInfo(groups=[])
|
|
|
|
|
|
|
|
|
|
return view
|
|
|
|
|
group = GroupField(name=_("Gratulations!"),nextlabel=_("Next"),last=True)
|
|
|
|
|
group.fields = []
|
|
|
|
|
|
|
|
|
|
group.fields.append(Field(
|
|
|
|
|
name = "final_label",
|
|
|
|
|
label = _("Final step in system install!!! Congratulation!\n"\
|
|
|
|
|
"Please, select language now!"),
|
|
|
|
|
#default = "border-style: solid; border-width: "
|
|
|
|
|
#"2px;border-color: #ff2222;",
|
|
|
|
|
default = 'border: 0px outset gray;'
|
|
|
|
|
'border-radius: 6px;'
|
|
|
|
|
'subcontrol-origin: margin;'
|
|
|
|
|
'color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1,'
|
|
|
|
|
'stop: 0.1 #bb1111, stop: 0.5 #11bb11, stop: 0.9 #1111bb);'
|
|
|
|
|
'subcontrol-position: top left; ',
|
|
|
|
|
element = "label"))
|
|
|
|
|
group.fields.append(Field(
|
|
|
|
|
name = "comboLang",
|
|
|
|
|
label = _("check language: "),
|
|
|
|
|
choice = ['Russian','English'],
|
|
|
|
|
type = "str",
|
|
|
|
|
#default = 'London',
|
|
|
|
|
opt = Option(longopt="--bot",
|
|
|
|
|
metavalue="BOT"),
|
|
|
|
|
help = \
|
|
|
|
|
_("you not human? This is a anti-bot test"),
|
|
|
|
|
element = "combo"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
view.groups.append(group)
|
|
|
|
|
|
|
|
|
|
return view
|
|
|
|
|