промежуточный.заложил вкладку для админа
This commit is contained in:
30
.idea/workspace.xml
generated
30
.idea/workspace.xml
generated
@@ -7,34 +7,14 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/AdministrationForm.form" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/AdministrationForm.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/AdministrationWindow.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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/_VisualDVM/ComponentsServer/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/ComponentsServer.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/Subscriber.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/Subscriber.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberDialog.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberFields.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubsribersForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubsribersForm.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountDialog.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountFields.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccount.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Account/Account.java" beforeDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Account/AccountRole.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/AccountRole.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Account/AccountsDBTable.java" beforeDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/MainModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/MainModule.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/NormalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/NormalProperties.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AddBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AddBugReport.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckAccount.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckAccount.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckRegistrationOnServer.java" beforeDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ServerCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ServerCode.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestsDatabase.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/DVMPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/DVMPackage.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/SapforPackage.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainWindow.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ public class CheckAccount extends ComponentsServerPass {
|
|||||||
@Override
|
@Override
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
Global.mainModule.getAccount().role = AccountRole.Undefined;
|
Global.mainModule.getAccount().role = AccountRole.Undefined;
|
||||||
keyFile = new File(Global.KeyDirectory, "key");
|
|
||||||
Global.normalProperties.Update();
|
Global.normalProperties.Update();
|
||||||
|
keyFile = new File(Global.KeyDirectory, "key");
|
||||||
//--
|
//--
|
||||||
//1. Ищем ключ.
|
//1. Ищем ключ.
|
||||||
if (keyFile.exists()) {
|
if (keyFile.exists()) {
|
||||||
|
|||||||
11
src/_VisualDVM/Visual/Windows/AdministrationForm.form
Normal file
11
src/_VisualDVM/Visual/Windows/AdministrationForm.form
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.Visual.Windows.AdministrationForm">
|
||||||
|
<grid id="27dc6" binding="content" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||||
|
<constraints>
|
||||||
|
<xy x="20" y="20" width="500" height="400"/>
|
||||||
|
</constraints>
|
||||||
|
<properties/>
|
||||||
|
<border type="none"/>
|
||||||
|
<children/>
|
||||||
|
</grid>
|
||||||
|
</form>
|
||||||
14
src/_VisualDVM/Visual/Windows/AdministrationForm.java
Normal file
14
src/_VisualDVM/Visual/Windows/AdministrationForm.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package _VisualDVM.Visual.Windows;
|
||||||
|
import Common.Visual.FormWithSplitters;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
public class AdministrationForm implements FormWithSplitters,AdministrationWindow {
|
||||||
|
private JPanel content;
|
||||||
|
@Override
|
||||||
|
public JPanel getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void ShowAll() {
|
||||||
|
}
|
||||||
|
}
|
||||||
5
src/_VisualDVM/Visual/Windows/AdministrationWindow.java
Normal file
5
src/_VisualDVM/Visual/Windows/AdministrationWindow.java
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package _VisualDVM.Visual.Windows;
|
||||||
|
import Common.Visual.VisualizerForm;
|
||||||
|
public interface AdministrationWindow extends VisualizerForm {
|
||||||
|
void ShowAll();
|
||||||
|
}
|
||||||
@@ -363,7 +363,6 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
|||||||
public void EnableBugreports() {
|
public void EnableBugreports() {
|
||||||
UI.Clear(accountPanel);
|
UI.Clear(accountPanel);
|
||||||
accountPanel.add(SC10);
|
accountPanel.add(SC10);
|
||||||
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(true);
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void setUdefinedRights(){
|
public void setUdefinedRights(){
|
||||||
@@ -371,28 +370,37 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
|||||||
UI.Clear(accountPanel);
|
UI.Clear(accountPanel);
|
||||||
accountPanel.add(new CallbackWelcomeForm().content);
|
accountPanel.add(new CallbackWelcomeForm().content);
|
||||||
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(false);
|
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(false);
|
||||||
|
Global.mainModule.getUI().getMainWindow().SwitchAdministrationTab(false);
|
||||||
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(false);
|
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(false);
|
||||||
adminLabel.setVisible(false);
|
adminLabel.setVisible(false);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void setUserRights() {
|
public void setUserRights() {
|
||||||
|
EnableBugreports();
|
||||||
LockMyOnly();
|
LockMyOnly();
|
||||||
Global.mainModule.SetUserPassesAccess();
|
Global.mainModule.SetUserPassesAccess();
|
||||||
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(false);
|
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(false);
|
||||||
|
Global.mainModule.getUI().getMainWindow().SwitchAdministrationTab(false);
|
||||||
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(false);
|
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(false);
|
||||||
adminLabel.setVisible(false);
|
adminLabel.setVisible(false);
|
||||||
}
|
}
|
||||||
private void setDeveloperRights() {
|
private void setDeveloperRights() {
|
||||||
|
EnableBugreports();
|
||||||
UnlockMyOnly();
|
UnlockMyOnly();
|
||||||
Global.mainModule.SetDeveloperPassesAccess();
|
Global.mainModule.SetDeveloperPassesAccess();
|
||||||
|
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(true);
|
||||||
|
Global.mainModule.getUI().getMainWindow().SwitchAdministrationTab(false);
|
||||||
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(false);
|
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(false);
|
||||||
adminLabel.setVisible(false);
|
adminLabel.setVisible(false);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void setAdminRights() {
|
public void setAdminRights() {
|
||||||
|
EnableBugreports();
|
||||||
UnlockMyOnly();
|
UnlockMyOnly();
|
||||||
Global.mainModule.SetAdminPassesAccess();
|
Global.mainModule.SetAdminPassesAccess();
|
||||||
//--
|
//--
|
||||||
|
Global.mainModule.getUI().getMainWindow().SwitchTestingTabs(true);
|
||||||
|
Global.mainModule.getUI().getMainWindow().SwitchAdministrationTab(true);
|
||||||
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(true);
|
Global.mainModule.getUI().getTestingMenuBar().showServerAdminLabel(true);
|
||||||
adminLabel.setVisible(true);
|
adminLabel.setVisible(true);
|
||||||
}
|
}
|
||||||
@@ -435,19 +443,15 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
|||||||
break;
|
break;
|
||||||
case User:
|
case User:
|
||||||
//видит только свои баги.
|
//видит только свои баги.
|
||||||
EnableBugreports();
|
|
||||||
setUserRights();
|
setUserRights();
|
||||||
break;
|
break;
|
||||||
case Developer:
|
case Developer:
|
||||||
EnableBugreports();
|
|
||||||
setDeveloperRights();
|
setDeveloperRights();
|
||||||
break;
|
break;
|
||||||
case Admin:
|
case Admin:
|
||||||
EnableBugreports();
|
|
||||||
setAdminRights();
|
setAdminRights();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
EnableBugreports();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
private TestsForm testsForm;
|
private TestsForm testsForm;
|
||||||
//---
|
//---
|
||||||
private TestingForm testingForm;
|
private TestingForm testingForm;
|
||||||
|
private AdministrationForm administrationForm;
|
||||||
//-----------------
|
//-----------------
|
||||||
private JPanel Content;
|
private JPanel Content;
|
||||||
private JTabbedPane globalTabs;
|
private JTabbedPane globalTabs;
|
||||||
@@ -35,6 +36,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
InstallCredentialsPanel();
|
InstallCredentialsPanel();
|
||||||
InstallTestsPanel();
|
InstallTestsPanel();
|
||||||
InstallTestingPanel();
|
InstallTestingPanel();
|
||||||
|
InstallAdministrationPanel();
|
||||||
ShowUpdatesIcon();
|
ShowUpdatesIcon();
|
||||||
//----------------------
|
//----------------------
|
||||||
}
|
}
|
||||||
@@ -67,6 +69,7 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
SaveCredentialsPanel();
|
SaveCredentialsPanel();
|
||||||
SaveTestsPanel();
|
SaveTestsPanel();
|
||||||
SaveTestingPanel();
|
SaveTestingPanel();
|
||||||
|
SaveAdministrationPanel();
|
||||||
//--
|
//--
|
||||||
if (Global.mainModule.getUI().getDebugWindow() != null)
|
if (Global.mainModule.getUI().getDebugWindow() != null)
|
||||||
((FormWithSplitters) Global.mainModule.getUI().getDebugWindow()).SaveSplitters();
|
((FormWithSplitters) Global.mainModule.getUI().getDebugWindow()).SaveSplitters();
|
||||||
@@ -220,10 +223,18 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
globalTabs.setEnabledAt(4, flag);
|
globalTabs.setEnabledAt(4, flag);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public void SwitchAdministrationTab(boolean flag) {
|
||||||
|
globalTabs.setEnabledAt(5, flag);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public TestingWindow getTestingWindow() {
|
public TestingWindow getTestingWindow() {
|
||||||
return testingForm;
|
return testingForm;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public AdministrationWindow getAdministrationWindow() {
|
||||||
|
return administrationForm;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public void Show() {
|
public void Show() {
|
||||||
//приходится идти на это только ПОСЛЕ создания главного окна.
|
//приходится идти на это только ПОСЛЕ создания главного окна.
|
||||||
// иначе ссылка на главное окно в методах пустая.
|
// иначе ссылка на главное окно в методах пустая.
|
||||||
@@ -258,4 +269,16 @@ public class MainForm extends Form implements MainWindow {
|
|||||||
restoreGlobalTab();
|
restoreGlobalTab();
|
||||||
Global.mainModule.getUI().mainMenuBar.ShowProject(false);
|
Global.mainModule.getUI().mainMenuBar.ShowProject(false);
|
||||||
}
|
}
|
||||||
|
private void InstallAdministrationPanel() {
|
||||||
|
globalTabs.insertTab("Администрирование",
|
||||||
|
Utils_.getIcon("/icons/Subscribe.png"),
|
||||||
|
(administrationForm = new AdministrationForm()).getContent(),
|
||||||
|
"Подписчики", 5);
|
||||||
|
}
|
||||||
|
private void SaveAdministrationPanel() {
|
||||||
|
if (administrationForm != null) {
|
||||||
|
administrationForm.SaveSplitters();
|
||||||
|
administrationForm = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public interface MainWindow {
|
|||||||
CredentialsWindow getCredentialsWindow();
|
CredentialsWindow getCredentialsWindow();
|
||||||
TestsWindow getTestsWindow();
|
TestsWindow getTestsWindow();
|
||||||
TestingWindow getTestingWindow();
|
TestingWindow getTestingWindow();
|
||||||
|
AdministrationWindow getAdministrationWindow();
|
||||||
//-
|
//-
|
||||||
void ShowUpdatesIcon();
|
void ShowUpdatesIcon();
|
||||||
void FocusProject();
|
void FocusProject();
|
||||||
@@ -17,6 +18,7 @@ public interface MainWindow {
|
|||||||
void FocusTests();
|
void FocusTests();
|
||||||
void FocusTesting();
|
void FocusTesting();
|
||||||
void SwitchTestingTabs(boolean flag);
|
void SwitchTestingTabs(boolean flag);
|
||||||
|
void SwitchAdministrationTab(boolean flag);
|
||||||
//-
|
//-
|
||||||
void ShowCheckedTestsCount();
|
void ShowCheckedTestsCount();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user