Skip to content

Commit

Permalink
#7549 displaying additional sparkUI form properties above add button (#…
Browse files Browse the repository at this point in the history
…7556)

* #7549 displaying additional sparkUI form properties above add button

* #7549 changed available properties link position

* #7549 fix available properties alignment
  • Loading branch information
lmitusinski authored and scottdraves committed Jun 20, 2018
1 parent adc8fd2 commit c818464
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
11 changes: 9 additions & 2 deletions js/notebook/src/shared/style/spark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,18 @@
.bx-spark-connect-error {
margin-left: 20px;
}

.bx-spark-configuration {
.bx-properties-add-label {
width: 298px;
text-align: right;
}
}
}

.bx-spark-save-button {
margin-left: 10px;
width: 80px;
margin-left: 10px;
width: 80px;
}

.bx-toolbar-spark-widget {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class SparkConfiguration extends VBox {
SparkConfiguration(Map<String, String> advancedSettings, String sparkVersion) {
super(new ArrayList<>());
this.add = createAddButton();
this.header = new HBox(asList(this.add, sparkVersionWidget(sparkVersion)));
this.header = new HBox(asList(sparkVersionWidget(sparkVersion), this.add));
List<PropertyItem> propertyItems = createPropertyItems(advancedSettings);
this.properties = new PropertiesWidget(propertyItems);
VBox configuration = new VBox(asList(this.header, this.properties.getWidget()));
VBox configuration = new VBox(asList(this.properties.getWidget(), this.header));
configuration.setDomClasses(new ArrayList<>(asList("bx-spark-configuration")));
add(configuration);
}
Expand All @@ -47,6 +47,7 @@ private HTML sparkVersionWidget(String version) {
HTML html = new HTML();
String ap = String.format("https://spark.apache.org/docs/%s/configuration.html#available-properties", version);
html.setValue("<a target=\"_blank\" href=\"" + ap + "\">Available properties" + "</a>");
html.setDomClasses(new ArrayList<>(asList("bx-properties-add-label")));
return html;
}

Expand All @@ -59,7 +60,7 @@ private List<PropertyItem> createPropertyItems(Map<String, String> advancedSetti
private Button createAddButton() {
Button add = new Button();
add.setTooltip("Add property");
add.setDomClasses(new ArrayList<>(asList("bx-button", "icon-add")));
add.setDomClasses(new ArrayList<>(asList("bx-button", "icon-add", "bx-properties-add-button")));
add.registerOnClick((content, message) -> addProperty());
return add;
}
Expand Down Expand Up @@ -122,7 +123,7 @@ public void setConfiguration(Map<String, String> advancedSettings) {
List<PropertyItem> propertyItems = createPropertyItems(advancedSettings);
this.properties = new PropertiesWidget(propertyItems);
this.remove(this.getChildren().get(0));
add(new VBox(asList(this.header, this.properties.getWidget())));
add(new VBox(asList(this.properties.getWidget(), this.header)));
}

public void setDisabledToAll() {
Expand Down

0 comments on commit c818464

Please sign in to comment.