Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# download maven from :
# https://maven.apache.org

if [ ! -z "${JAVA_11_HOME}" ]; then
echo JAVA_11_HOME: ${JAVA_11_HOME}
JAVA_HOME=${JAVA_11_HOME}
if [ ! -z "${JAVA_21_HOME}" ]; then
echo JAVA_21_HOME: ${JAVA_21_HOME}
JAVA_HOME=${JAVA_21_HOME}
fi

MVN="`which mvn`"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
<packaging>pom</packaging>

<name>SCOUTER APM</name>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-agent-batch</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.host/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-agent-host</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.agent.java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-agent-java</artifactId>
Expand Down
14 changes: 7 additions & 7 deletions scouter.client.build/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>scouter.client</groupId>
Expand All @@ -13,15 +13,15 @@
<module>../scouter.client.product</module>
</modules>
<properties>
<tycho-version>2.7.0</tycho-version>
<tycho-version>5.0.1</tycho-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>eclipse-simultaneous-2022-03</id>
<layout>p2</layout>
<url>https://download.eclipse.org/releases/2022-03/</url>
</repository>
<repository>
<id>eclipse-2025-12</id>
<layout>p2</layout>
<url>https://download.eclipse.org/releases/2025-12/</url>
</repository>
</repositories>

<build>
Expand Down
7 changes: 0 additions & 7 deletions scouter.client.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
[Enter License Description here.]
</license>

<plugin
id="javax.servlet"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.compare.core"
download-size="0"
Expand Down
10 changes: 8 additions & 2 deletions scouter.client.product/scouter.client.product
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<vmArgs>-Xms128m
-Xmx1024m
-XX:+UseG1GC
-Dosgi.requiredJavaVersion=11
-Dosgi.requiredJavaVersion=21
</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
Expand All @@ -52,10 +52,16 @@
</vm>

<plugins>
<plugin id="org.eclipse.equinox.launcher"/>
<plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" fragment="true"/>
<plugin id="org.eclipse.equinox.launcher.cocoa.macosx.aarch64" fragment="true"/>
<plugin id="org.eclipse.equinox.launcher.gtk.linux.x86_64" fragment="true"/>
<plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64" fragment="true"/>
</plugins>

<features>
<feature id="org.eclipse.rcp"/>
<feature id="org.eclipse.platform"/>
<feature id="org.eclipse.equinox.executable"/>
<feature id="scouter.client.feature"/>
<feature id="org.eclipse.emf.ecore"/>
<feature id="org.eclipse.emf.common"/>
Expand Down
2 changes: 1 addition & 1 deletion scouter.client/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Require-Bundle:
org.eclipse.swt,
org.eclipse.e4.core.commands,
org.eclipse.e4.ui.services
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/scouter.common.jar,
Expand Down
6 changes: 3 additions & 3 deletions scouter.client/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
<modelVersion>4.0.0</modelVersion>

Expand All @@ -20,8 +20,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
</plugins>
Expand Down
101 changes: 64 additions & 37 deletions scouter.client/src/scouter/client/popup/ManageGroupDialog.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -40,6 +40,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;

import scouter.client.Images;
import scouter.client.group.GroupManager;
Expand All @@ -57,6 +58,7 @@ public class ManageGroupDialog {

Set<Integer> noSelectedSet = new HashSet<Integer>();
Set<Integer> selectedSet = new HashSet<Integer>();
Set<Integer> currentAllSet = new HashSet<Integer>();

public ManageGroupDialog(Display display, String groupName, String objType,
IManageGroup callback) {
Expand All @@ -78,33 +80,46 @@ public void show() {
title.setFont(new Font(null, "Arial", 10, SWT.BOLD));
title.setImage(Images.getObjectIcon(objType, true, 0));
title.setText(groupName + "(" + getDisplayObjtype(objType) + ")");


Composite searchComp = new Composite(dialog, SWT.NONE);
searchComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
searchComp.setLayout(new GridLayout(2, false));

CLabel searchLabel = new CLabel(searchComp, SWT.NONE);
searchLabel.setText("Search:");
final Text searchText = new Text(searchComp, SWT.BORDER);
searchText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
searchText.setMessage("Enter keyword to filter...");

new CLabel(dialog, SWT.NONE);
new CLabel(dialog, SWT.NONE);

final Table allObjects = new Table(dialog, SWT.BORDER | SWT.MULTI);
gr = new GridData(SWT.FILL, SWT.FILL, true, true);
gr.widthHint = 250;
gr.heightHint = 300;
gr.widthHint = 375;
gr.heightHint = 450;
allObjects.setLayoutData(gr);

Composite centerComp = new Composite(dialog, SWT.NONE);
gr = new GridData(SWT.FILL, SWT.FILL, true, true);
gr.widthHint = 100;
gr.widthHint = 150;
centerComp.setLayoutData(gr);
centerComp.setLayout(new GridLayout(1, true));

Button addBtn = new Button(centerComp, SWT.PUSH);
addBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
addBtn.setImage(Images.arrow_right);
addBtn.setText("Add");

Button removeBtn = new Button(centerComp, SWT.PUSH);
removeBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
removeBtn.setImage(Images.arrow_left);
removeBtn.setText("Remove");

final Table selectedObjects = new Table(dialog, SWT.BORDER | SWT.MULTI);
gr = new GridData(SWT.FILL, SWT.FILL, true, true);
gr.widthHint = 250;
gr.heightHint = 300;
gr.widthHint = 375;
gr.heightHint = 450;
selectedObjects.setLayoutData(gr);

addBtn.addListener(SWT.Selection, new Listener(){
Expand All @@ -115,14 +130,16 @@ public void handleEvent(Event event) {
}
for (int i = 0; i < items.length; i++) {
TableItem item = items[i];
int objHash = (Integer) item.getData();
currentAllSet.remove(objHash);
TableItem newItem = new TableItem(selectedObjects, SWT.NONE);
newItem.setData(item.getData());
newItem.setText(item.getText());
newItem.setImage(item.getImage());
allObjects.remove(allObjects.indexOf(item));
item.dispose();
}
sortTable(allObjects);
String filter = searchText.getText();
refreshTable(allObjects, currentAllSet, filter);
sortTable(selectedObjects);
}
});
Expand All @@ -135,15 +152,12 @@ public void handleEvent(Event event) {
}
for (int i = 0; i < items.length; i++) {
TableItem item = items[i];
TableItem newItem = new TableItem(allObjects, SWT.NONE);
newItem.setData(item.getData());
newItem.setText(item.getText());
newItem.setImage(item.getImage());
selectedObjects.remove(selectedObjects.indexOf(item));
int objHash = (Integer) item.getData();
currentAllSet.add(objHash);
item.dispose();
}
sortTable(allObjects);
sortTable(selectedObjects);
String filter = searchText.getText();
refreshTable(allObjects, currentAllSet, filter);
}
});

Expand Down Expand Up @@ -175,10 +189,8 @@ public void handleEvent(Event event) {
addedObjHashs.add(objHash);
}
}
TableItem[] noSelectedItems = allObjects.getItems();
List<Integer> removedObjHashs = new ArrayList<Integer>();
for (TableItem item : noSelectedItems) {
int objHash = (Integer) item.getData();
for (Integer objHash : currentAllSet) {
if (noSelectedSet.contains(objHash) == false) {
removedObjHashs.add(objHash);
}
Expand All @@ -200,22 +212,14 @@ public void handleEvent(Event event) {
selectedSet.add(objHash);
} else {
noSelectedSet.add(objHash);
currentAllSet.add(objHash);
}
}
}
}

for (Integer objHash : noSelectedSet) {
AgentObject agent = AgentModelThread.getInstance().getAgentObject(objHash);
if (agent == null) {
continue;
}
TableItem item = new TableItem(allObjects, SWT.NONE);
item.setData(objHash);
item.setText(agent.getObjName() + "(" + ServerManager.getInstance().getServer(agent.getServerId()).getName() + ")");
item.setImage(agent.isAlive() ? Images.active : Images.dead);
}


refreshTable(allObjects, currentAllSet, null);

for (Integer objHash : selectedSet) {
AgentObject agent = AgentModelThread.getInstance().getAgentObject(objHash);
if (agent == null) {
Expand All @@ -226,9 +230,14 @@ public void handleEvent(Event event) {
item.setText(agent.getObjName() + "(" + ServerManager.getInstance().getServer(agent.getServerId()).getName() + ")");
item.setImage(agent.isAlive() ? Images.active : Images.dead);
}

sortTable(allObjects);
sortTable(selectedObjects);

searchText.addListener(SWT.Modify, new Listener(){
public void handleEvent(Event event) {
String filter = searchText.getText();
refreshTable(allObjects, currentAllSet, filter);
}
});

dialog.pack();
dialog.open();
Expand Down Expand Up @@ -256,6 +265,24 @@ public int[] toIntArray(List<Integer> list) {
return ret;
}

private void refreshTable(Table table, Set<Integer> objHashSet, String filter) {
table.removeAll();
for (Integer objHash : objHashSet) {
AgentObject agent = AgentModelThread.getInstance().getAgentObject(objHash);
if (agent == null) {
continue;
}
String displayText = agent.getObjName() + "(" + ServerManager.getInstance().getServer(agent.getServerId()).getName() + ")";
if (filter == null || filter.isEmpty() || displayText.toLowerCase().contains(filter.toLowerCase())) {
TableItem item = new TableItem(table, SWT.NONE);
item.setData(objHash);
item.setText(displayText);
item.setImage(agent.isAlive() ? Images.active : Images.dead);
}
}
sortTable(table);
}

private void sortTable(Table table) {
TableItem[] items = table.getItems();
Collator collator = Collator.getInstance(Locale.getDefault());
Expand Down
2 changes: 1 addition & 1 deletion scouter.common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.deploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-deploy</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.extra.java20/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion scouter.server.boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-server-boot</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion scouter.server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.scouter-project</groupId>
<artifactId>scouter-parent</artifactId>
<version>2.20.0</version> <!--scouter-->
<version>2.21.1</version> <!--scouter-->
</parent>

<artifactId>scouter-server</artifactId>
Expand Down
Loading