Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#7549 displaying additional sparkUI form properties above add button #7556

Merged
merged 3 commits into from
Jun 20, 2018
Merged
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
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