no message
This commit is contained in:
21
.idea/workspace.xml
generated
21
.idea/workspace.xml
generated
@@ -7,8 +7,25 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/icons/versions/Unknown.png" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Global.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/GlobalProperties.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Machine/Machine.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Machine/Machine.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Server/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Server/ComponentsServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/Json/SapforPackage_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/Json/SapforPackage_json.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/MatchesSummary.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/MatchesSummary.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/PackageSummary.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/PackageSummary.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackageTreeNode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackageTreeNode.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CheckAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CheckAccount.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/InstallServerSapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/InstallServerSapfor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Server/RepositoryPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Server/RepositoryPass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/CallbackForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -86,7 +103,7 @@
|
||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.SHOW" value="true" />
|
||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="509" />
|
||||
<property name="extract.method.default.visibility" value="public" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons/Transformations" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons/versions" />
|
||||
<property name="project.structure.last.edited" value="Modules" />
|
||||
<property name="project.structure.proportion" value="0.15" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
@@ -99,11 +116,11 @@
|
||||
<recent name="controls.Trees" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\files" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\libs" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" />
|
||||
</key>
|
||||
<key name="MoveMembersDialog.RECENTS_KEY">
|
||||
<recent name="Repository.Component.Sapfor.Sapfor" />
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"Mode": "Normal",
|
||||
"ServerAddress": "alex-freenas.ddns.net",
|
||||
"ServerUserName": "testuser",
|
||||
"ComponentsServerPort": 7995,
|
||||
"TestingServerPort": 7998,
|
||||
"SocketTimeout": 5000,
|
||||
"OldServer": false,
|
||||
"SMTPHost": "smtp.mail.ru",
|
||||
@@ -9,7 +13,7 @@
|
||||
"BackupHour": 5,
|
||||
"BackupMinute": 0,
|
||||
"EmailAdminsOnStart": false,
|
||||
"AutoUpdateSearch": true,
|
||||
"AutoUpdateSearch": false,
|
||||
"ConfirmPassesStart": true,
|
||||
"ShowPassesDone": true,
|
||||
"FocusPassesResult": true,
|
||||
|
||||
@@ -111,7 +111,6 @@ public class Constants {
|
||||
//testuser ALL=NOPASSWD:/sbin/reboot
|
||||
//0 2 2,15 * * reboot &>/var/log/reboot.log
|
||||
//https://unix.stackexchange.com/questions/117148/how-can-i-run-reboot-as-a-normal-user-without-needing-to-enter-a-password
|
||||
public static final String ServerAddress = "alex-freenas.ddns.net";
|
||||
//--
|
||||
//https://losst.ru/komandy-terminala-linux
|
||||
public static String[] linux_system_commands = new String[]{
|
||||
@@ -467,6 +466,4 @@ public class Constants {
|
||||
};
|
||||
//все запретные символы через пробел.
|
||||
public static String all_forbidden_characters_string = "";
|
||||
public static final Machine repository_machine = new Machine("Ubuntu", "alex-freenas.ddns.net", 23, MachineType.Server);
|
||||
public static final User repository_user = new User("testuser", "mprit_2011", "");
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ public class Global {
|
||||
//---
|
||||
ActivateDB(); //тут current getAccount; роль по умолчанию всегда неизвестна.
|
||||
///--------------
|
||||
|
||||
/*
|
||||
Current.set(Current.Account, new Account(){
|
||||
{
|
||||
name = "M";
|
||||
@@ -329,6 +329,7 @@ public class Global {
|
||||
role = AccountRole.Admin;
|
||||
}
|
||||
});
|
||||
*/
|
||||
Pass_2021.passes.get(PassCode_2021.CheckAccount).Do();
|
||||
//---------------
|
||||
componentsServer.ActivateDB();
|
||||
|
||||
@@ -20,9 +20,13 @@ public class GlobalProperties extends Properties {
|
||||
@Expose
|
||||
public Current.Mode Mode = Current.Mode.Normal;
|
||||
@Expose
|
||||
public int ComponentsServerPort = 7995; //пока не используется
|
||||
public String ServerAddress="alex-freenas.ddns.net";
|
||||
@Expose
|
||||
public int TestingServerPort = 7998; //пока не используется
|
||||
public String ServerUserName ="testuser";
|
||||
@Expose
|
||||
public int ComponentsServerPort = 7995;
|
||||
@Expose
|
||||
public int TestingServerPort = 7998;
|
||||
//---
|
||||
@Expose
|
||||
public int SocketTimeout = 5000;
|
||||
|
||||
@@ -24,7 +24,8 @@ public class Machine extends iDBObject {
|
||||
return type.equals(MachineType.Local) ? name : (address + ":" + port);
|
||||
}
|
||||
public String getFullDescription() {
|
||||
return this.equals(Constants.repository_machine) ? "Репозиторий визуализатора" : "Машина по адресу " + Utils.Brackets(getURL());
|
||||
return //this.equals(Constants.repository_machine) ? "Репозиторий визуализатора" :
|
||||
"Машина по адресу " + Utils.Brackets(getURL());
|
||||
}
|
||||
public LinkedHashMap<Integer, Compiler> getCompilers() {
|
||||
return Global.db.getMapByFKi(this, Compiler.class);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Visualiser extends Component {
|
||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
version = 1064;
|
||||
version = 1066;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
}
|
||||
@Override
|
||||
public int getPort() {
|
||||
return 7995;
|
||||
return Global.properties.ComponentsServerPort;
|
||||
}
|
||||
@Override
|
||||
protected void checkTargets(EmailMessage message_in) {
|
||||
|
||||
@@ -131,7 +131,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//основа
|
||||
@Override
|
||||
public int getPort() {
|
||||
return 7998;
|
||||
return Global.properties.TestingServerPort;
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package TestingSystem.SAPFOR.Json;
|
||||
import Common.UI.UI;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
|
||||
import TestingSystem.SAPFOR.SapforTask.MatchState;
|
||||
@@ -40,6 +41,7 @@ public class SapforPackage_json implements Serializable {
|
||||
//----
|
||||
//---------
|
||||
public void DropComparison() {
|
||||
// UI.Info("DROP COMPARISON");
|
||||
comparison_root = null;
|
||||
comparisonSortedTasks.clear();
|
||||
for (SapforTask task : allTasks.values())
|
||||
@@ -89,6 +91,7 @@ public class SapforPackage_json implements Serializable {
|
||||
comparisonSortedTasks.clear();
|
||||
//раскидать задачи по состояниям, конфигам, группам
|
||||
for (MatchState matchState : MatchState.values()) {
|
||||
System.out.println("match_state="+matchState.toString());
|
||||
LinkedHashMap<TaskState, LinkedHashMap<Integer, LinkedHashMap<String, Vector<SapforTask>>>> state_tasks = new LinkedHashMap<>();
|
||||
comparisonSortedTasks.put(matchState, state_tasks);
|
||||
//--
|
||||
@@ -97,6 +100,7 @@ public class SapforPackage_json implements Serializable {
|
||||
state_tasks.put(state, configuration_tasks);
|
||||
//--
|
||||
for (SapforTask task : tasks) {
|
||||
// if (matchState.equals(MatchState.Unknown)) {
|
||||
if (task.match.equals(matchState) && task.state.equals(state)) {
|
||||
LinkedHashMap<String, Vector<SapforTask>> groups_tasks = null;
|
||||
if (configuration_tasks.containsKey(task.sapfor_configuration_id)) {
|
||||
@@ -114,6 +118,7 @@ public class SapforPackage_json implements Serializable {
|
||||
}
|
||||
tasks.add(task);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
//--
|
||||
|
||||
@@ -54,7 +54,8 @@ public class SapforTask extends DBObject {
|
||||
public Vector<SapforVersion_json> variants = new Vector<>();
|
||||
//----------
|
||||
@Description("IGNORE")
|
||||
public MatchState match = MatchState.Unknown;
|
||||
public MatchState match = MatchState.NotMatch;
|
||||
// MatchState.Unknown;
|
||||
//-----------
|
||||
public String getUniqueKey() {
|
||||
return sapfor_configuration_id + "_" + group_description + "_" + test_description;
|
||||
|
||||
@@ -18,7 +18,7 @@ public class MatchesSummary extends SapforPackageTreeNode {
|
||||
case NotMatch:
|
||||
return "NotMatch";
|
||||
default:
|
||||
return "TestVersion";
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package TestingSystem.SAPFOR.SapforTasksPackage.UI;
|
||||
import Common.UI.UI;
|
||||
public class PackageSummary extends SapforPackageTreeNode {
|
||||
public int count = 0;
|
||||
@Override
|
||||
public String getImageKey() {
|
||||
return null;
|
||||
// System.out.println("PACKAGE_SUMMARY "+ this.count);
|
||||
return "UnknownStateSummary";
|
||||
// return null;
|
||||
}
|
||||
public PackageSummary() {
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import java.util.Objects;
|
||||
public abstract class SapforPackageTreeNode extends DefaultMutableTreeNode {
|
||||
public ImageIcon getIcon() {
|
||||
return (getImageKey() != null) ?
|
||||
new ImageIcon(Objects.requireNonNull(getClass().getResource("/icons/versions/" + getImageKey() + ".png")))
|
||||
: null;
|
||||
// System.out.println(getImageKey());
|
||||
ImageIcon res = new ImageIcon(Objects.requireNonNull(getClass().getResource("/icons/versions/" + getImageKey() + ".png")));
|
||||
// System.out.println(res);
|
||||
return (getImageKey() != null) ? res : null;
|
||||
}
|
||||
public abstract String getImageKey();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.UI.UI;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
public class CheckAccount extends Pass_2021<Boolean> {
|
||||
@@ -19,10 +20,36 @@ public class CheckAccount extends Pass_2021<Boolean> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
switch (Current.getAccount().email){
|
||||
case "vmk-post@yandex.ru":
|
||||
case "79854210702@ya.ru":
|
||||
Current.getAccount().role = AccountRole.Admin;
|
||||
target = true;
|
||||
break;
|
||||
case "npodderyugina@gmail.com":
|
||||
case "savol@keldysh.ru":
|
||||
case "mkocharmin@yandex.ru":
|
||||
case "juk.06@list.ru":
|
||||
Current.getAccount().role = AccountRole.Developer;
|
||||
target = true;
|
||||
break;
|
||||
case "?":
|
||||
Current.getAccount().role = AccountRole.Undefined;
|
||||
target = false;
|
||||
break;
|
||||
default:
|
||||
Current.getAccount().role =AccountRole.User;
|
||||
target = true;
|
||||
break;
|
||||
}
|
||||
|
||||
//временно. оффлайн проверка по почте
|
||||
/*
|
||||
target = Current.getAccount().email.equals("?") ?
|
||||
(Pass_2021.passes.get(PassCode_2021.EditAccount).Do() &&
|
||||
Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do()) :
|
||||
(Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do());
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import GlobalData.User.User;
|
||||
import ProjectData.LanguageName;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -27,8 +31,8 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
|
||||
}
|
||||
@Override
|
||||
public void Connect() throws Exception {
|
||||
machine = Constants.repository_machine;
|
||||
user = Constants.repository_user;
|
||||
machine = new Machine("Ubuntu", Global.properties.ServerAddress, 23, MachineType.Server);
|
||||
user = new User(Global.properties.ServerUserName, "mprit_2011", "");
|
||||
super.Connect();
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
|
||||
}
|
||||
//-
|
||||
protected void connect() throws Exception {
|
||||
clientSocket = Utils.createClientSocket(InetAddress.getByName(Constants.ServerAddress),
|
||||
clientSocket = Utils.createClientSocket(InetAddress.getByName(Global.properties.ServerAddress),
|
||||
server.getPort(),
|
||||
getTimeout()
|
||||
);
|
||||
|
||||
@@ -403,15 +403,15 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
lAccountRole.setText(Utils.Brackets(Current.getAccount().role.getDescription()));
|
||||
switch (Current.getAccount().role) {
|
||||
case Undefined:
|
||||
UI.Clear(accountPanel);
|
||||
accountPanel.add(new CallbackWelcomeForm().content);
|
||||
UI.getMainWindow().SwitchTestingTabs(false);
|
||||
break;
|
||||
/// UI.Clear(accountPanel);
|
||||
// accountPanel.add(new CallbackWelcomeForm().content);
|
||||
// UI.getMainWindow().SwitchTestingTabs(false);
|
||||
// break;
|
||||
case User:
|
||||
//видит только свои баги.
|
||||
EnableBugreports();
|
||||
setUserRights();
|
||||
break;
|
||||
// EnableBugreports();
|
||||
// setUserRights();
|
||||
// break;
|
||||
case Developer:
|
||||
EnableBugreports();
|
||||
setDeveloperRights();
|
||||
|
||||
BIN
src/icons/versions/Unknown.png
Normal file
BIN
src/icons/versions/Unknown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user