2024-09-19 23:05:04 +03:00
|
|
|
package Common.UI.Tables;
|
2024-09-20 00:22:42 +03:00
|
|
|
import Common.Global;
|
|
|
|
|
import Common.UI.VisualCache.VisualCaches;
|
2024-09-19 23:05:04 +03:00
|
|
|
import TestingSystem.Common.Configuration.Configuration;
|
2024-09-20 00:22:42 +03:00
|
|
|
import TestingSystem.Common.TestingServer;
|
|
|
|
|
import TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
|
|
|
|
|
import Visual_DVM_2021.Passes.Pass_2021;
|
|
|
|
|
import Visual_DVM_2021.Passes.Server.EditServerObject;
|
2024-09-19 23:05:04 +03:00
|
|
|
public class ConfigurationAutoSwitcher extends DBObjectEditor<Configuration> {
|
|
|
|
|
@Override
|
|
|
|
|
public void Action() {
|
|
|
|
|
value.SwitchAuto();
|
|
|
|
|
setIcon(value.GetAutoIcon());
|
2024-09-20 00:22:42 +03:00
|
|
|
///-
|
|
|
|
|
Pass_2021 pass = new EditServerObject<TestingServer,Configuration> (Global.testingServer, Configuration.class){
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) throws Exception {
|
|
|
|
|
target = (Configuration) args[0];
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return "Обновить флаг автоматического тестирования";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void showDone() throws Exception {
|
|
|
|
|
VisualCaches.RefreshCache(target);
|
|
|
|
|
if (target instanceof SapforConfiguration)
|
|
|
|
|
Global.testingServer.db.sapforConfigurations.ShowUI(target.id);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
pass.Do(value);
|
2024-09-19 23:05:04 +03:00
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public Object getCellEditorValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|