fix лишней рассылки админам
This commit is contained in:
@@ -60,8 +60,6 @@ public class CheckAccount extends Pass<Boolean> {
|
||||
if (Global.componentsServer.db.bugReports.getUI().getCurrent() != null)
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
}
|
||||
if (Global.mainModule.getAccount().isAdmin())
|
||||
Global.mainModule.getPass(PassCode.PublishComponent).setControlsVisible(true);
|
||||
setControlsVisible(false); //если проверка успешна, кнопку больше не показывать.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Passes.Server.ComponentsRepositoryPass;
|
||||
import _VisualDVM.Repository.EmailMessage;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import _VisualDVM.Repository.Server.ServerExchangeUnit_2021;
|
||||
import _VisualDVM.Repository.Subscribes.Subscriber;
|
||||
import _VisualDVM.Utils;
|
||||
|
||||
import java.util.Vector;
|
||||
//http://java-online.ru/javax-mail.xhtml
|
||||
@@ -34,11 +36,13 @@ public class Email extends ComponentsRepositoryPass<EmailMessage> {
|
||||
}
|
||||
}
|
||||
}
|
||||
Utils.addDefaultMails(target.targets);
|
||||
String text_ =
|
||||
"Адресаты: " + String.join(", ", targetsNames) + "\n" +
|
||||
target.text;
|
||||
//нужно разделить сообщение на несколько одинаковых, по числу адресатов.
|
||||
for (String recipient : target.targets) {
|
||||
System.out.println(recipient);
|
||||
EmailMessage part = new EmailMessage();
|
||||
part.subject = target.subject;
|
||||
part.text = text_;
|
||||
|
||||
@@ -21,7 +21,6 @@ public class GetComponentsActualVersions extends ComponentsRepositoryPass {
|
||||
protected void ServerAction() throws Exception {
|
||||
Vector<String> versions = new Vector<>();
|
||||
for (Component component : Global.components.Data.values())
|
||||
//if (component.isVisible())
|
||||
versions.add(component.getComponentType().toString());
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.GetComponentsVersions, String.join("\n", versions)));
|
||||
LinkedHashMap<ComponentType, String> response_actual_versions = (LinkedHashMap<ComponentType, String>) response.object;
|
||||
|
||||
Reference in New Issue
Block a user