Merge pull request #2261 from eclipse/ARTIK-108
Artik #108 Cannot open the terminal of ARTIK board, after connect multiple boards6.19.x
commit
f6172aeecc
|
|
@ -173,7 +173,7 @@ public interface MachineResources extends ClientBundle {
|
|||
|
||||
String badgeVisible();
|
||||
|
||||
String processButton();
|
||||
String newTerminalButton();
|
||||
|
||||
String sshButton();
|
||||
|
||||
|
|
@ -181,6 +181,8 @@ public interface MachineResources extends ClientBundle {
|
|||
|
||||
String processOutputPanel();
|
||||
|
||||
String machineMonitors();
|
||||
|
||||
/** Returns the CSS class name for close button of process in 'Consoles' panel. */
|
||||
String processesPanelCloseButtonForProcess();
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@
|
|||
*/
|
||||
.consolePanel {
|
||||
background-color: outputBackgroundColor;
|
||||
border-top: 1px solid separatorColor;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class ProcessTreeRenderer implements NodeRenderer<ProcessTreeNode> {
|
|||
MIDDLE,
|
||||
locale.viewMachineRunningTooltip());
|
||||
|
||||
SpanElement newTerminalButton = Elements.createSpanElement(resources.getCss().processButton());
|
||||
SpanElement newTerminalButton = Elements.createSpanElement(resources.getCss().newTerminalButton());
|
||||
newTerminalButton.appendChild((Node)new SVGImage(resources.addTerminalIcon()).getElement());
|
||||
root.appendChild(newTerminalButton);
|
||||
|
||||
|
|
@ -195,9 +195,7 @@ public class ProcessTreeRenderer implements NodeRenderer<ProcessTreeNode> {
|
|||
newTerminalButton.addEventListener(Event.CLICK, blockMouseListener, true);
|
||||
newTerminalButton.addEventListener(Event.DBLCLICK, blockMouseListener, true);
|
||||
|
||||
Element monitorsElement = Elements.createSpanElement();
|
||||
monitorsElement.getStyle().setProperty("float", "right");
|
||||
monitorsElement.getStyle().setProperty("cursor", "default");
|
||||
Element monitorsElement = Elements.createSpanElement(resources.getCss().machineMonitors());
|
||||
root.appendChild(monitorsElement);
|
||||
|
||||
Node monitorNode = (Node)machineMonitors.getMonitorWidget(machine.getId(), this).getElement();
|
||||
|
|
@ -245,6 +243,8 @@ public class ProcessTreeRenderer implements NodeRenderer<ProcessTreeNode> {
|
|||
private SpanElement createTerminalElement(ProcessTreeNode node) {
|
||||
SpanElement root = Elements.createSpanElement();
|
||||
|
||||
root.appendChild(createCloseElement(node));
|
||||
|
||||
SVGResource icon = node.getTitleIcon();
|
||||
if (icon != null) {
|
||||
SpanElement iconElement = Elements.createSpanElement(resources.getCss().processIcon());
|
||||
|
|
@ -256,8 +256,6 @@ public class ProcessTreeRenderer implements NodeRenderer<ProcessTreeNode> {
|
|||
divElement.appendChild((Node)new SVGImage(icon).getElement());
|
||||
}
|
||||
|
||||
root.appendChild(createCloseElement(node));
|
||||
|
||||
Element nameElement = Elements.createSpanElement();
|
||||
nameElement.setTextContent(node.getName());
|
||||
root.appendChild(nameElement);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.che.ide.extension.machine.client.processes.panel;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.user.client.ui.AcceptsOneWidget;
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
|
|
@ -711,6 +712,13 @@ public class ProcessesPanelPresenter extends BasePresenter implements ProcessesP
|
|||
@Override
|
||||
public void apply(List<MachineProcessDto> arg) throws OperationException {
|
||||
for (MachineProcessDto machineProcessDto : arg) {
|
||||
/**
|
||||
* Do not show the process if the command line has prefix #hidden
|
||||
*/
|
||||
if (!Strings.isNullOrEmpty(machineProcessDto.getCommandLine()) && machineProcessDto.getCommandLine().startsWith("#hidden")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final CommandDto commandDto = dtoFactory.createDto(CommandDto.class)
|
||||
.withName(machineProcessDto.getName())
|
||||
.withAttributes(machineProcessDto.getAttributes())
|
||||
|
|
|
|||
|
|
@ -300,9 +300,12 @@
|
|||
margin-right: 2px;
|
||||
color: categoryHeaderButtonColor;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.processTree .processButton {
|
||||
.processTree .newTerminalButton {
|
||||
float: right;
|
||||
margin: 3px 6px 0 5px;
|
||||
width: 12px;
|
||||
|
|
@ -313,23 +316,34 @@
|
|||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.processTree .processButton > svg {
|
||||
.processTree .newTerminalButton > svg {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.processButton span:hover {
|
||||
.newTerminalButton span:hover {
|
||||
fill: categoryHeaderButtonHoverColor;
|
||||
stroke: categoryHeaderButtonHoverColor;
|
||||
}
|
||||
|
||||
.processButton:hover,
|
||||
.newTerminalButton:hover,
|
||||
.sshButton:hover {
|
||||
filter: brightness(120%);
|
||||
-webkit-filter: brightness(120%);
|
||||
}
|
||||
|
||||
.processTree .machineMonitors {
|
||||
float: right;
|
||||
cursor: default;
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.processTree .processIcon {
|
||||
height: 16px;
|
||||
margin-top: 1px;
|
||||
|
|
@ -404,6 +418,9 @@
|
|||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.processesPanelStopButtonForProcess:hover {
|
||||
|
|
@ -423,6 +440,9 @@
|
|||
padding-right: 9px;
|
||||
float: right;
|
||||
fill: editorTabIconColor;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.processesPanelCloseButtonForProcess svg g,
|
||||
|
|
|
|||
Loading…
Reference in New Issue