1 | # -*- coding: utf-8 -*-
|
---|
2 | # $Id: wuiadminsystemdbdump.py 83422 2020-03-25 17:16:29Z vboxsync $
|
---|
3 |
|
---|
4 | """
|
---|
5 | Test Manager WUI - System DB - Partial Dumping
|
---|
6 | """
|
---|
7 |
|
---|
8 | __copyright__ = \
|
---|
9 | """
|
---|
10 | Copyright (C) 2012-2020 Oracle Corporation
|
---|
11 |
|
---|
12 | This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
13 | available from http://www.virtualbox.org. This file is free software;
|
---|
14 | you can redistribute it and/or modify it under the terms of the GNU
|
---|
15 | General Public License (GPL) as published by the Free Software
|
---|
16 | Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
17 | VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
18 | hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
19 |
|
---|
20 | The contents of this file may alternatively be used under the terms
|
---|
21 | of the Common Development and Distribution License Version 1.0
|
---|
22 | (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
23 | VirtualBox OSE distribution, in which case the provisions of the
|
---|
24 | CDDL are applicable instead of those of the GPL.
|
---|
25 |
|
---|
26 | You may elect to license modified versions of this file under the
|
---|
27 | terms and conditions of either the GPL or the CDDL or both.
|
---|
28 | """
|
---|
29 | __version__ = "$Revision: 83422 $"
|
---|
30 |
|
---|
31 |
|
---|
32 | # Validation Kit imports.
|
---|
33 | from testmanager.core.base import ModelDataBase;
|
---|
34 | from testmanager.webui.wuicontentbase import WuiFormContentBase;
|
---|
35 |
|
---|
36 |
|
---|
37 | class WuiAdminSystemDbDumpForm(WuiFormContentBase):
|
---|
38 | """
|
---|
39 | WUI Partial DB Dump HTML content generator.
|
---|
40 | """
|
---|
41 |
|
---|
42 | def __init__(self, cDaysBack, oDisp):
|
---|
43 | WuiFormContentBase.__init__(self, ModelDataBase(),
|
---|
44 | WuiFormContentBase.ksMode_Edit, 'DbDump', oDisp, 'Partial DB Dump',
|
---|
45 | sSubmitAction = oDisp.ksActionSystemDbDumpDownload);
|
---|
46 | self._cDaysBack = cDaysBack;
|
---|
47 |
|
---|
48 | def _generateTopRowFormActions(self, oData):
|
---|
49 | _ = oData;
|
---|
50 | return [];
|
---|
51 |
|
---|
52 | def _populateForm(self, oForm, oData): # type: (WuiHlpForm, SchedGroupDataEx) -> bool
|
---|
53 | """
|
---|
54 | Construct an HTML form
|
---|
55 | """
|
---|
56 | _ = oData;
|
---|
57 |
|
---|
58 | oForm.addInt(self._oDisp.ksParamDaysBack, self._cDaysBack, 'How many days back to dump');
|
---|
59 | oForm.addSubmit('Produce & Download');
|
---|
60 |
|
---|
61 | return True;
|
---|
62 |
|
---|