本文整理汇总了Python中testmanager.webui.wuicontentbase.WuiFormContentBase类的典型用法代码示例。如果您正苦于以下问题:Python WuiFormContentBase类的具体用法?Python WuiFormContentBase怎么用?Python WuiFormContentBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WuiFormContentBase类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, oData, sMode, oDisp):
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Create Build Category';
elif sMode == WuiFormContentBase.ksMode_Edit:
assert False, 'not possible'
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Build Category- %s' % (oData.idBuildCategory,);
WuiFormContentBase.__init__(self, oData, sMode, 'BuildCategory', oDisp, sTitle, fEditable = False);
示例2: __init__
def __init__(self, oData, sMode, oDisp):
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Add Build'
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Modify Build - #%s' % (oData.idBuild,);
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Build - #%s' % (oData.idBuild,);
WuiFormContentBase.__init__(self, oData, sMode, 'Build', oDisp, sTitle);
示例3: __init__
def __init__(self, oData, sMode, oDisp):
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Add User Account';
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Modify User Account';
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'User Account';
WuiFormContentBase.__init__(self, oData, sMode, 'User', oDisp, sTitle);
示例4: __init__
def __init__(self, oData, sMode, oDisp):
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = "Add Build"
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = "Modify Build - #%s" % (oData.idBuild,)
else:
assert sMode == WuiFormContentBase.ksMode_Show
sTitle = "Build - #%s" % (oData.idBuild,)
WuiFormContentBase.__init__(self, oData, sMode, "Build", oDisp, sTitle)
示例5: __init__
def __init__(self, oData, sMode, oDisp):
assert isinstance(oData, BuildSourceData);
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'New Build Source';
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit Build Source - %s (#%s)' % (oData.sName, oData.idBuildSrc,);
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Build Source - %s (#%s)' % (oData.sName, oData.idBuildSrc,);
WuiFormContentBase.__init__(self, oData, sMode, 'BuildSrc', oDisp, sTitle);
示例6: __init__
def __init__(self, oData, sMode, oDisp):
assert isinstance(oData, SchedGroupData);
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'New Scheduling Group';
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit Scheduling Group'
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Scheduling Group';
WuiFormContentBase.__init__(self, oData, sMode, 'SchedGroup', oDisp, sTitle);
# Read additional bits form the DB.
self._aoAllTestGroups = TestGroupLogic(oDisp.getDb()).getAll();
示例7: __init__
def __init__(self, oData, sMode, oDisp):
"""
Prepare & initialize parent
"""
sTitle = "Failure Category"
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = "Add " + sTitle
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = "Edit " + sTitle
else:
assert sMode == WuiFormContentBase.ksMode_Show
WuiFormContentBase.__init__(self, oData, sMode, "FailureCategory", oDisp, sTitle)
示例8: __init__
def __init__(self, oData, sMode, oDisp):
"""
Prepare & initialize parent
"""
sTitle = 'Failure Category';
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Add ' + sTitle;
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit ' + sTitle;
else:
assert sMode == WuiFormContentBase.ksMode_Show;
WuiFormContentBase.__init__(self, oData, sMode, 'FailureCategory', oDisp, sTitle);
示例9: __init__
def __init__(self, oData, sMode, oDisp):
assert isinstance(oData, TestCaseDataEx);
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'New Test Case';
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit Test Case - %s (#%s)' % (oData.sName, oData.idTestCase);
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Test Case - %s (#%s)' % (oData.sName, oData.idTestCase);
WuiFormContentBase.__init__(self, oData, sMode, 'TestCase', oDisp, sTitle);
# Read additional bits form the DB.
oDepLogic = TestCaseDependencyLogic(oDisp.getDb());
self._aoAllTestCases = oDepLogic.getApplicableDepTestCaseData(-1 if oData.idTestCase is None else oData.idTestCase);
self._aoAllGlobalRsrcs = GlobalResourceLogic(oDisp.getDb()).getAll();
示例10: __init__
def __init__(self, oFailureReasonData, sMode, oDisp):
"""
Prepare & initialize parent
"""
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Add Failure Reason'
sSubmitAction = oDisp.ksActionFailureReasonAdd
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit Failure Reason'
sSubmitAction = oDisp.ksActionFailureReasonEdit
else:
raise WuiException('Unknown parameter')
WuiFormContentBase.__init__(self, oFailureReasonData, sMode, 'FailureReason', oDisp, sTitle,
sSubmitAction = sSubmitAction, fEditable = False); ## @todo non-standard action names.
示例11: __init__
def __init__(self, oData, sMode, oDisp):
"""
Prepare & initialize parent
"""
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Add Build Blacklist Entry'
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit Build Blacklist Entry'
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Build Black';
WuiFormContentBase.__init__(self, oData, sMode, 'BuildBlacklist', oDisp, sTitle);
#
# Additional data.
#
self.asTypes = coreconsts.g_kasBuildTypesAll
self.asOsArches = coreconsts.g_kasOsDotCpusAll
示例12: __init__
def __init__(self, oData, sMode, oDisp):
assert isinstance(oData, TestGroupDataEx);
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Add Test Group';
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Modify Test Group';
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'Test Group';
WuiFormContentBase.__init__(self, oData, sMode, 'TestGroup', oDisp, sTitle);
#
# Fetch additional data.
#
if sMode in [WuiFormContentBase.ksMode_Add, WuiFormContentBase.ksMode_Edit]:
self.aoAllTestCases = TestCaseLogic(oDisp.getDb()).fetchForListing(0, 0x7fff, None);
else:
self.aoAllTestCases = [oMember.oTestCase for oMember in oData.aoMembers];
示例13: __init__
def __init__(self, oData, sMode, oDisp):
if sMode == WuiFormContentBase.ksMode_Add:
sTitle = 'Create TextBox';
if oData.uuidSystem is not None and len(oData.uuidSystem) > 10:
sTitle += ' - ' + oData.uuidSystem;
elif sMode == WuiFormContentBase.ksMode_Edit:
sTitle = 'Edit TestBox - %s (#%s)' % (oData.sName, oData.idTestBox);
else:
assert sMode == WuiFormContentBase.ksMode_Show;
sTitle = 'TestBox - %s (#%s)' % (oData.sName, oData.idTestBox);
WuiFormContentBase.__init__(self, oData, sMode, 'TestBox', oDisp, sTitle);
# Try enter sName as hostname (no domain) when creating the testbox.
if sMode == WuiFormContentBase.ksMode_Add \
and self._oData.sName in [None, ''] \
and self._oData.ip not in [None, '']:
try:
(self._oData.sName, _, _) = socket.gethostbyaddr(self._oData.ip);
except:
pass;
offDot = self._oData.sName.find('.');
if offDot > 0:
self._oData.sName = self._oData.sName[:offDot];