промежутоный. все же, вывел число ядер в конфигурации. иначе автоматическое тестирование обзаведется лишней настройкой.

This commit is contained in:
2024-09-20 01:52:39 +03:00
parent ae379ea196
commit 12c4eaf33d
19 changed files with 176 additions and 61 deletions

View File

@@ -37,11 +37,11 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
}
@Override
protected void AdditionalInitColumns() {
columns.get(4).setRenderer(TableRenderers.RendererAutoConfiguration);
columns.get(4).setEditor(TableEditors.EditorAutoConfiguration);
columns.get(4).setMinWidth(25);
columns.get(4).setMaxWidth(25);
columns.get(5).setMaxWidth(300);
columns.get(5).setRenderer(TableRenderers.RendererAutoConfiguration);
columns.get(5).setEditor(TableEditors.EditorAutoConfiguration);
columns.get(5).setMinWidth(25);
columns.get(5).setMaxWidth(25);
columns.get(6).setMaxWidth(300);
}
};
}
@@ -50,10 +50,11 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
return new String[]{
"имя",
"автор",
"ядра",
"",
"группы",
"тестов",
"флаги"
"флаги",
};
}
@Override
@@ -65,13 +66,16 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
case 3:
return object.sender_name;
case 4:
return object.printAuto();
return object.kernels;
case 5:
return cache.getGroupsDescriptions();
return object.printAuto();
case 6:
return cache.getTestsCount();
return cache.getGroupsDescriptions();
case 7:
return cache.getTestsCount();
case 8:
return object.getFlags();
default:
return null;
}
@@ -99,6 +103,7 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
fields.cbKEEP_SPF_DIRECTIVES.setSelected(Result.KEEP_SPF_DIRECTIVES != 0);
fields.cbSTATIC_SHADOW_ANALYSIS.setSelected(Result.STATIC_SHADOW_ANALYSIS != 0);
fields.sMAX_SHADOW_WIDTH.setValue(Result.MAX_SHADOW_WIDTH);
fields.sKernels.setValue(Result.kernels);
}
@Override
public void ProcessResult() {
@@ -108,6 +113,7 @@ public class SapforConfigurationDBTable extends iDBTable<SapforConfiguration> {
Result.KEEP_SPF_DIRECTIVES = Utils.fromBoolean(fields.cbKEEP_SPF_DIRECTIVES.isSelected());
Result.STATIC_SHADOW_ANALYSIS = Utils.fromBoolean(fields.cbSTATIC_SHADOW_ANALYSIS.isSelected());
Result.MAX_SHADOW_WIDTH = fields.sMAX_SHADOW_WIDTH.getValue();
Result.kernels= (int)fields.sKernels.getValue();
}
@Override
public void SetReadonly() {

View File

@@ -8,7 +8,7 @@
<properties/>
<border type="none"/>
<children>
<grid id="d1d6e" layout-manager="GridLayoutManager" row-count="8" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="d1d6e" layout-manager="GridLayoutManager" row-count="9" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -29,7 +29,7 @@
</component>
<vspacer id="224d6">
<constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
<preferred-size width="284" height="14"/>
</grid>
</constraints>
@@ -46,7 +46,7 @@
</component>
<component id="b644a" class="javax.swing.JCheckBox" binding="cbFREE_FORM">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/>
</grid>
</constraints>
@@ -59,7 +59,7 @@
</component>
<component id="7721e" class="javax.swing.JCheckBox" binding="cbKEEP_SPF_DIRECTIVES">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/>
</grid>
</constraints>
@@ -72,7 +72,7 @@
</component>
<component id="f44c1" class="javax.swing.JLabel">
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="3" use-parent-layout="false">
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="3" use-parent-layout="false">
<preferred-size width="284" height="17"/>
</grid>
</constraints>
@@ -83,7 +83,7 @@
</component>
<component id="54e77" class="javax.swing.JCheckBox" binding="cbSTATIC_SHADOW_ANALYSIS">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/>
</grid>
</constraints>
@@ -96,7 +96,7 @@
</component>
<component id="4e865" class="javax.swing.JCheckBox" binding="cbKEEP_DVM_DIRECTIVES">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="284" height="25"/>
</grid>
</constraints>
@@ -109,7 +109,7 @@
</component>
<component id="14243" class="javax.swing.JSlider" binding="sMAX_SHADOW_WIDTH">
<constraints>
<grid row="6" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<grid row="7" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="500" height="40"/>
<preferred-size width="500" height="40"/>
<maximum-size width="500" height="40"/>
@@ -123,6 +123,26 @@
<snapToTicks value="false"/>
</properties>
</component>
<component id="1eea4" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="ядра"/>
<toolTipText value="количество ядер, задействованное при тестировани"/>
</properties>
</component>
<component id="2a173" class="javax.swing.JSpinner" binding="sKernels">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<minimum-size width="100" height="30"/>
<preferred-size width="100" height="30"/>
<maximum-size width="100" height="30"/>
</grid>
</constraints>
<properties/>
</component>
</children>
</grid>
</children>

View File

@@ -1,6 +1,7 @@
package TestingSystem.SAPFOR.SapforConfiguration.UI;
import Common.UI.TextField.StyledTextField;
import Common.UI.Windows.Dialog.DialogFields;
import Common.Utils.Utils;
import javax.swing.*;
import java.awt.*;
@@ -13,6 +14,7 @@ public class SapforConfigurationFields implements DialogFields {
public JCheckBox cbSTATIC_SHADOW_ANALYSIS;
public JCheckBox cbKEEP_SPF_DIRECTIVES;
public JCheckBox cbKEEP_DVM_DIRECTIVES;
public JSpinner sKernels;
//--
@Override
public Component getContent() {
@@ -22,4 +24,9 @@ public class SapforConfigurationFields implements DialogFields {
// TODO: place custom component creation code here
tfName = new StyledTextField();
}
public SapforConfigurationFields(){
sKernels.setModel(new SpinnerNumberModel(1, 1,
Utils.getTestingMaxKernels(),
1));
}
}

View File

@@ -21,7 +21,7 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
public SapforPackage(SapforPackage sapforPackage) {
SynchronizeFields(sapforPackage);
}
public SapforPackage(Account account, ServerSapfor serverSapfor) {
public SapforPackage(Account account, ServerSapfor serverSapfor, int kernels_in) {
id = Constants.Nan;
//-
sender_name = account.name;
@@ -31,7 +31,7 @@ public class SapforPackage extends TestingPackage<SapforPackage_json> {
//-
drv = serverSapfor.call_command;
version = serverSapfor.version;
kernels = Global.properties.TestingKernels;
kernels = kernels_in;//Global.properties.TestingKernels;
needsEmail = Global.properties.EmailOnTestingProgress ? 1 : 0;
///-------------------------------
package_json = new SapforPackage_json();