Several minor UI tweaks, add live params preview automatic KV field addition

This commit is contained in:
Rohit Awate 2018-08-14 14:23:50 +05:30
parent 42bb97eb42
commit dccaf7e73d
No known key found for this signature in database
GPG key ID: 1051D7B79CF2EE25
21 changed files with 335 additions and 318 deletions

View file

@ -111,7 +111,7 @@ public class BodyTabController implements Initializable {
@FXML @FXML
private void browseFile() { private void browseFile() {
FileChooser fileChooser = new FileChooser(); FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Choose a binary file to add to request..."); fileChooser.setTitle("Choose a binary file to add to the request");
Window dashboardWindow = filePathField.getScene().getWindow(); Window dashboardWindow = filePathField.getScene().getWindow();
String filePath; String filePath;
@ -124,6 +124,11 @@ public class BodyTabController implements Initializable {
filePathField.setText(filePath); filePathField.setText(filePath);
} }
@FXML
private void clearFilePath() {
filePathField.clear();
}
public ComposerState getState() { public ComposerState getState() {
ComposerState state = new ComposerState(); ComposerState state = new ComposerState();

View file

@ -42,7 +42,6 @@ import com.rohitawate.everest.state.FieldState;
import javafx.beans.binding.Bindings; import javafx.beans.binding.Bindings;
import javafx.beans.property.IntegerProperty; import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleIntegerProperty;
import javafx.event.ActionEvent;
import javafx.event.Event; import javafx.event.Event;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
@ -186,7 +185,7 @@ public class DashboardController implements Initializable {
responseTypeBox.valueProperty().addListener(change -> { responseTypeBox.valueProperty().addListener(change -> {
String type = responseTypeBox.getValue(); String type = responseTypeBox.getValue();
if (type.equals("JSON")) { if (type.equals(HTTPConstants.JSON)) {
try { try {
responseArea.setText(responseArea.getText(), responseArea.setText(responseArea.getText(),
FormatterFactory.getHighlighter(type), FormatterFactory.getHighlighter(type),
@ -263,16 +262,16 @@ public class DashboardController implements Initializable {
if (bodyTabController.rawTab.isSelected()) { if (bodyTabController.rawTab.isSelected()) {
String contentType; String contentType;
switch (bodyTabController.rawInputTypeBox.getValue()) { switch (bodyTabController.rawInputTypeBox.getValue()) {
case "PLAIN TEXT": case HTTPConstants.PLAIN_TEXT:
contentType = MediaType.TEXT_PLAIN; contentType = MediaType.TEXT_PLAIN;
break; break;
case "JSON": case HTTPConstants.JSON:
contentType = MediaType.APPLICATION_JSON; contentType = MediaType.APPLICATION_JSON;
break; break;
case "XML": case HTTPConstants.XML:
contentType = MediaType.APPLICATION_XML; contentType = MediaType.APPLICATION_XML;
break; break;
case "HTML": case HTTPConstants.HTML:
contentType = MediaType.TEXT_HTML; contentType = MediaType.TEXT_HTML;
break; break;
default: default:
@ -459,15 +458,15 @@ public class DashboardController implements Initializable {
switch (contentType.toLowerCase()) { switch (contentType.toLowerCase()) {
case "application/json": case "application/json":
simplifiedContentType = "JSON"; simplifiedContentType = HTTPConstants.JSON;
visualizerTab.setDisable(false); visualizerTab.setDisable(false);
visualizer.populate(body); visualizer.populate(body);
break; break;
case "application/xml": case "application/xml":
simplifiedContentType = "XML"; simplifiedContentType = HTTPConstants.XML;
break; break;
case "text/html": case "text/html":
simplifiedContentType = "HTML"; simplifiedContentType = HTTPConstants.HTML;
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
snackbar.show("Open link in browser?", "YES", 5000, e -> { snackbar.show("Open link in browser?", "YES", 5000, e -> {
snackbar.close(); snackbar.close();
@ -482,10 +481,10 @@ public class DashboardController implements Initializable {
} }
break; break;
default: default:
simplifiedContentType = "PLAIN TEXT"; simplifiedContentType = HTTPConstants.PLAIN_TEXT;
} }
} else { } else {
simplifiedContentType = "PLAIN TEXT"; simplifiedContentType = HTTPConstants.PLAIN_TEXT;
} }
responseArea.setText(body, responseArea.setText(body,
@ -564,35 +563,38 @@ public class DashboardController implements Initializable {
} }
private void addParamField() { private void addParamField() {
addParamField("", "", null, false); addParamField("", "", false);
} }
private void addParamField(FieldState state) { private void addParamField(FieldState state) {
addParamField(state.key, state.value, null, state.checked); addParamField(state.key, state.value, state.checked);
}
@FXML
private void addParamField(ActionEvent event) {
addParamField("", "", event, false);
} }
/** /**
* Adds a new URL-parameter field * Adds a new URL-parameter field
*/ */
private void addParamField(String key, String value, ActionEvent event, boolean checked) { private void addParamField(String key, String value, boolean checked) {
/* /*
Re-uses previous field if it is empty, else loads a new one. Re-uses previous field if it is empty, else loads a new one.
A value of null for the 'event' parameter indicates that the method call A value of null for the 'event' parameter indicates that the method call
came from code and not from the user. This call is made while recovering came from code and not from the user. This call is made while recovering
the application state. the application state.
*/ */
if (paramsControllers.size() > 0 && event == null) { if (paramsControllers.size() > 0) {
StringKeyValueFieldController previousController = paramsControllers.get(paramsControllers.size() - 1); StringKeyValueFieldController previousController = paramsControllers.get(paramsControllers.size() - 1);
if (previousController.isKeyFieldEmpty() && if (previousController.isKeyFieldEmpty() &&
previousController.isValueFieldEmpty()) { previousController.isValueFieldEmpty()) {
previousController.setKeyField(key); previousController.setKeyField(key);
previousController.setValueField(value); previousController.setValueField(value);
/*
For when the last field is loaded from setState.
This makes sure an extra blank field is always present.
*/
if (!(key.equals("") && value.equals("")))
addParamField();
return; return;
} }
} }
@ -611,7 +613,12 @@ public class DashboardController implements Initializable {
paramsBox.getChildren().remove(headerField); paramsBox.getChildren().remove(headerField);
paramsControllers.remove(controller); paramsControllers.remove(controller);
paramsCountProperty.set(paramsCountProperty.get() - 1); paramsCountProperty.set(paramsCountProperty.get() - 1);
appendParams();
}); });
controller.setKeyHandler(keyEvent -> addParamField());
controller.getSelectedProperty().addListener(e -> appendParams());
controller.getKeyProperty().addListener(e -> appendParams());
controller.getValueProperty().addListener(e -> appendParams());
paramsBox.getChildren().add(headerField); paramsBox.getChildren().add(headerField);
} catch (IOException e) { } catch (IOException e) {
LoggingService.logSevere("Could not append params field.", e, LocalDateTime.now()); LoggingService.logSevere("Could not append params field.", e, LocalDateTime.now());
@ -691,13 +698,13 @@ public class DashboardController implements Initializable {
// TODO: Get rid of similar switches // TODO: Get rid of similar switches
String contentType; String contentType;
switch (responseTypeBox.getValue()) { switch (responseTypeBox.getValue()) {
case "JSON": case HTTPConstants.JSON:
contentType = MediaType.APPLICATION_JSON; contentType = MediaType.APPLICATION_JSON;
break; break;
case "XML": case HTTPConstants.XML:
contentType = MediaType.APPLICATION_XML; contentType = MediaType.APPLICATION_XML;
break; break;
case "HTML": case HTTPConstants.HTML:
contentType = MediaType.TEXT_HTML; contentType = MediaType.TEXT_HTML;
break; break;
default: default:
@ -815,6 +822,7 @@ public class DashboardController implements Initializable {
if (state.composer.params != null) { if (state.composer.params != null) {
for (FieldState fieldState : state.composer.params) for (FieldState fieldState : state.composer.params)
addParamField(fieldState); addParamField(fieldState);
appendParams();
} }
if (!(state.composer.httpMethod.equals(HTTPConstants.GET) || state.composer.httpMethod.equals(HTTPConstants.DELETE))) if (!(state.composer.httpMethod.equals(HTTPConstants.GET) || state.composer.httpMethod.equals(HTTPConstants.DELETE)))

View file

@ -20,9 +20,11 @@ import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXCheckBox; import com.jfoenix.controls.JFXCheckBox;
import com.rohitawate.everest.state.FieldState; import com.rohitawate.everest.state.FieldState;
import javafx.beans.binding.Bindings; import javafx.beans.binding.Bindings;
import javafx.event.EventHandler;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.input.KeyEvent;
import javafx.stage.FileChooser; import javafx.stage.FileChooser;
import javafx.stage.Window; import javafx.stage.Window;
import javafx.util.Pair; import javafx.util.Pair;
@ -75,7 +77,7 @@ public class FileKeyValueFieldController implements Initializable {
@FXML @FXML
private void browseFile() { private void browseFile() {
FileChooser fileChooser = new FileChooser(); FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Choose a binary file to add to request..."); fileChooser.setTitle("Choose a binary file to add to the request");
Window dashboardWindow = fileValueField.getScene().getWindow(); Window dashboardWindow = fileValueField.getScene().getWindow();
String filePath; String filePath;
try { try {
@ -117,4 +119,9 @@ public class FileKeyValueFieldController implements Initializable {
public void setChecked(boolean checked) { public void setChecked(boolean checked) {
checkBox.setSelected(checked); checkBox.setSelected(checked);
} }
public void setKeyHandler(EventHandler<KeyEvent> handler) {
fileKeyField.setOnKeyPressed(handler);
fileValueField.setOnKeyPressed(handler);
}
} }

View file

@ -61,32 +61,35 @@ public class FormDataTabController implements Initializable {
} }
public void addFileField(FieldState state) { public void addFileField(FieldState state) {
addFileField(state.key, state.value, null, state.checked); addFileField(state.key, state.value, state.checked);
}
@FXML
private void addFileField(ActionEvent event) {
addFileField("", "", event, false);
} }
private void addFileField() { private void addFileField() {
addFileField("", "", null, false); addFileField("", "", false);
} }
private void addFileField(String key, String value, ActionEvent event, boolean checked) { private void addFileField(String key, String value, boolean checked) {
/* /*
Re-uses previous field if it is empty, else loads a new one. Re-uses previous field if it is empty, else loads a new one.
A value of null for the 'event' parameter indicates that the method call A value of null for the 'event' parameter indicates that the method call
came from code and not from the user. This call is made while recovering came from code and not from the user. This call is made while recovering
the application state. the application state.
*/ */
if (fileControllers.size() > 0 && event == null) { if (fileControllers.size() > 0) {
FileKeyValueFieldController previousController = fileControllers.get(fileControllers.size() - 1); FileKeyValueFieldController previousController = fileControllers.get(fileControllers.size() - 1);
if (previousController.isFileKeyFieldEmpty() && if (previousController.isFileKeyFieldEmpty() &&
previousController.isFileValueFieldEmpty()) { previousController.isFileValueFieldEmpty()) {
previousController.setFileKeyField(key); previousController.setFileKeyField(key);
previousController.setFileValueField(value); previousController.setFileValueField(value);
/*
For when the last field is loaded from setState.
This makes sure an extra blank field is always present.
*/
if (!key.equals("") && !value.equals(""))
addFileField();
return; return;
} }
} }
@ -107,6 +110,7 @@ public class FormDataTabController implements Initializable {
fileControllers.remove(controller); fileControllers.remove(controller);
fileControllersCount.set(fileControllersCount.get() - 1); fileControllersCount.set(fileControllersCount.get() - 1);
}); });
controller.setKeyHandler(keyEvent -> addFileField());
fieldsBox.getChildren().add(fileField); fieldsBox.getChildren().add(fileField);
} catch (IOException e) { } catch (IOException e) {
LoggingService.logSevere("Could not add file field.", e, LocalDateTime.now()); LoggingService.logSevere("Could not add file field.", e, LocalDateTime.now());
@ -117,11 +121,6 @@ public class FormDataTabController implements Initializable {
addStringField(state.key, state.value, null, state.checked); addStringField(state.key, state.value, null, state.checked);
} }
@FXML
private void addStringField(ActionEvent event) {
addStringField("", "", event, false);
}
private void addStringField() { private void addStringField() {
addStringField("", "", null, false); addStringField("", "", null, false);
} }
@ -140,6 +139,14 @@ public class FormDataTabController implements Initializable {
previousController.isValueFieldEmpty()) { previousController.isValueFieldEmpty()) {
previousController.setKeyField(key); previousController.setKeyField(key);
previousController.setValueField(value); previousController.setValueField(value);
/*
For when the last field is loaded from setState.
This makes sure an extra blank field is always present.
*/
if (!key.equals("") && !value.equals(""))
addStringField();
return; return;
} }
} }
@ -159,6 +166,7 @@ public class FormDataTabController implements Initializable {
stringControllers.remove(controller); stringControllers.remove(controller);
stringControllersCount.set(stringControllersCount.get() - 1); stringControllersCount.set(stringControllersCount.get() - 1);
}); });
controller.setKeyHandler(keyEvent -> addStringField());
fieldsBox.getChildren().add(stringField); fieldsBox.getChildren().add(stringField);
} catch (IOException e) { } catch (IOException e) {
LoggingService.logSevere("Could not add string field.", e, LocalDateTime.now()); LoggingService.logSevere("Could not add string field.", e, LocalDateTime.now());

View file

@ -22,7 +22,6 @@ import com.rohitawate.everest.state.FieldState;
import javafx.beans.binding.Bindings; import javafx.beans.binding.Bindings;
import javafx.beans.property.IntegerProperty; import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleIntegerProperty;
import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
@ -54,32 +53,35 @@ public class HeaderTabController implements Initializable {
} }
public void addHeader(FieldState state) { public void addHeader(FieldState state) {
addHeader(state.key, state.value, null, state.checked); addHeader(state.key, state.value, state.checked);
} }
private void addHeader() { private void addHeader() {
addHeader("", "", null, false); addHeader("", "", false);
} }
@FXML private void addHeader(String key, String value, boolean checked) {
private void addHeader(ActionEvent event) {
addHeader("", "", event, false);
}
private void addHeader(String key, String value, ActionEvent event, boolean checked) {
/* /*
Re-uses previous field if it is empty, else loads a new one. Re-uses previous field if it is empty, else loads a new one.
A value of null for the 'event' parameter indicates that the method call A value of null for the 'event' parameter indicates that the method call
came from code and not from the user. This call is made while recovering came from code and not from the user. This call is made while recovering
the application state. the application state.
*/ */
if (controllers.size() > 0 && event == null) { if (controllers.size() > 0) {
StringKeyValueFieldController previousController = controllers.get(controllers.size() - 1); StringKeyValueFieldController previousController = controllers.get(controllers.size() - 1);
if (previousController.isKeyFieldEmpty() && if (previousController.isKeyFieldEmpty() &&
previousController.isValueFieldEmpty()) { previousController.isValueFieldEmpty()) {
previousController.setKeyField(key); previousController.setKeyField(key);
previousController.setValueField(value); previousController.setValueField(value);
/*
For when the last field is loaded from setState.
This makes sure an extra blank field is always present.
*/
if (!key.equals("") && !value.equals(""))
addHeader();
return; return;
} }
} }
@ -100,6 +102,7 @@ public class HeaderTabController implements Initializable {
controllers.remove(controller); controllers.remove(controller);
controllersCount.set(controllersCount.get() - 1); controllersCount.set(controllersCount.get() - 1);
}); });
controller.setKeyHandler(keyEvent -> addHeader());
headersBox.getChildren().add(headerField); headersBox.getChildren().add(headerField);
} catch (IOException e) { } catch (IOException e) {
LoggingService.logSevere("Could not add string field.", e, LocalDateTime.now()); LoggingService.logSevere("Could not add string field.", e, LocalDateTime.now());

View file

@ -52,6 +52,23 @@ public class HistoryItemController implements Initializable, Searchable<Composer
public void setState(ComposerState state) { public void setState(ComposerState state) {
this.state = state; this.state = state;
this.requestType.setText(state.httpMethod); this.requestType.setText(state.httpMethod);
switch (state.httpMethod) {
case HTTPConstants.GET:
requestType.setStyle("-fx-text-fill: deeppink");
break;
case HTTPConstants.POST:
requestType.setStyle("-fx-text-fill: cornflowerblue");
break;
case HTTPConstants.PUT:
requestType.setStyle("-fx-text-fill: crimson");
break;
case HTTPConstants.PATCH:
requestType.setStyle("-fx-text-fill: teal");
break;
case HTTPConstants.DELETE:
requestType.setStyle("-fx-text-fill: limegreen");
break;
}
this.address.setText(state.target); this.address.setText(state.target);
} }

View file

@ -20,9 +20,13 @@ import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXCheckBox; import com.jfoenix.controls.JFXCheckBox;
import com.rohitawate.everest.state.FieldState; import com.rohitawate.everest.state.FieldState;
import javafx.beans.binding.Bindings; import javafx.beans.binding.Bindings;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.StringProperty;
import javafx.event.EventHandler;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import javafx.scene.input.KeyEvent;
import javafx.util.Pair; import javafx.util.Pair;
import java.net.URL; import java.net.URL;
@ -100,4 +104,21 @@ public class StringKeyValueFieldController implements Initializable {
public void setChecked(boolean checked) { public void setChecked(boolean checked) {
checkBox.setSelected(checked); checkBox.setSelected(checked);
} }
public void setKeyHandler(EventHandler<KeyEvent> handler) {
keyField.setOnKeyPressed(handler);
valueField.setOnKeyPressed(handler);
}
public BooleanProperty getSelectedProperty() {
return checkBox.selectedProperty();
}
public StringProperty getKeyProperty() {
return keyField.textProperty();
}
public StringProperty getValueProperty() {
return valueField.textProperty();
}
} }

View file

@ -22,7 +22,6 @@ import com.rohitawate.everest.state.FieldState;
import javafx.beans.binding.Bindings; import javafx.beans.binding.Bindings;
import javafx.beans.property.IntegerProperty; import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleIntegerProperty;
import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
@ -54,32 +53,35 @@ public class URLTabController implements Initializable {
public void addField(FieldState state) { public void addField(FieldState state) {
addField(state.key, state.value, null, state.checked); addField(state.key, state.value, state.checked);
} }
private void addField() { private void addField() {
addField("", "", null, false); addField("", "", false);
} }
@FXML private void addField(String key, String value, boolean checked) {
private void addField(ActionEvent event) {
addField("", "", event, false);
}
private void addField(String key, String value, ActionEvent event, boolean checked) {
/* /*
Re-uses previous field if it is empty, else loads a new one. Re-uses previous field if it is empty, else loads a new one.
A value of null for the 'event' parameter indicates that the method call A value of null for the 'event' parameter indicates that the method call
came from code and not from the user. This call is made while recovering came from code and not from the user. This call is made while recovering
the application state. the application state.
*/ */
if (controllers.size() > 0 && event == null) { if (controllers.size() > 0) {
StringKeyValueFieldController previousController = controllers.get(controllers.size() - 1); StringKeyValueFieldController previousController = controllers.get(controllers.size() - 1);
if (previousController.isKeyFieldEmpty() && if (previousController.isKeyFieldEmpty() &&
previousController.isValueFieldEmpty()) { previousController.isValueFieldEmpty()) {
previousController.setKeyField(key); previousController.setKeyField(key);
previousController.setValueField(value); previousController.setValueField(value);
/*
For when the last field is loaded from setState.
This makes sure an extra blank field is always present.
*/
if (!key.equals("") && !value.equals(""))
addField();
return; return;
} }
} }
@ -98,8 +100,9 @@ public class URLTabController implements Initializable {
controller.deleteButton.setOnAction(e -> { controller.deleteButton.setOnAction(e -> {
fieldsBox.getChildren().remove(stringField); fieldsBox.getChildren().remove(stringField);
controllers.remove(controller); controllers.remove(controller);
controllersCount.set(controllersCount.get() + 1); controllersCount.set(controllersCount.get() - 1);
}); });
controller.setKeyHandler(keyEvent -> addField());
fieldsBox.getChildren().add(stringField); fieldsBox.getChildren().add(stringField);
} catch (IOException e) { } catch (IOException e) {
LoggingService.logSevere("Could not add string field.", e, LocalDateTime.now()); LoggingService.logSevere("Could not add string field.", e, LocalDateTime.now());

View file

@ -1,6 +1,7 @@
package com.rohitawate.everest.controllers.codearea.highlighters; package com.rohitawate.everest.controllers.codearea.highlighters;
import com.rohitawate.everest.exceptions.DuplicateHighlighterException; import com.rohitawate.everest.exceptions.DuplicateHighlighterException;
import com.rohitawate.everest.models.requests.HTTPConstants;
import java.util.HashMap; import java.util.HashMap;
@ -15,13 +16,13 @@ public class HighlighterFactory {
static { static {
highlighters = new HashMap<>(); highlighters = new HashMap<>();
highlighters.put("JSON", new JSONHighlighter()); highlighters.put(HTTPConstants.JSON, new JSONHighlighter());
XMLHighlighter xmlHighlighter = new XMLHighlighter(); XMLHighlighter xmlHighlighter = new XMLHighlighter();
highlighters.put("XML", xmlHighlighter); highlighters.put(HTTPConstants.XML, xmlHighlighter);
highlighters.put("HTML", xmlHighlighter); highlighters.put(HTTPConstants.HTML, xmlHighlighter);
highlighters.put("PLAIN TEXT", new PlaintextHighlighter()); highlighters.put(HTTPConstants.PLAIN_TEXT, new PlaintextHighlighter());
} }
public static Highlighter getHighlighter(String name) { public static Highlighter getHighlighter(String name) {

View file

@ -2,6 +2,7 @@ package com.rohitawate.everest.format;
import com.rohitawate.everest.exceptions.DuplicateFormatterException; import com.rohitawate.everest.exceptions.DuplicateFormatterException;
import com.rohitawate.everest.exceptions.DuplicateHighlighterException; import com.rohitawate.everest.exceptions.DuplicateHighlighterException;
import com.rohitawate.everest.models.requests.HTTPConstants;
import java.util.HashMap; import java.util.HashMap;
@ -15,7 +16,7 @@ public class FormatterFactory {
static { static {
formatters = new HashMap<>(); formatters = new HashMap<>();
formatters.put("JSON", new JSONFormatter()); formatters.put(HTTPConstants.JSON, new JSONFormatter());
} }
public static Formatter getHighlighter(String type) { public static Formatter getHighlighter(String type) {

View file

@ -238,6 +238,10 @@ public class RequestManager extends Service<EverestResponse> {
overriddenContentType = MediaType.APPLICATION_OCTET_STREAM; overriddenContentType = MediaType.APPLICATION_OCTET_STREAM;
filePath = dataRequest.getBody(); filePath = dataRequest.getBody();
if (filePath.equals("")) {
throw new FileNotFoundException("No file selected");
}
File check = new File(filePath); File check = new File(filePath);
if (!check.exists()) { if (!check.exists()) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

View file

@ -23,7 +23,7 @@
} }
#addressField { #addressField {
-fx-background-color: #6e6e6e; -fx-background-color: #707070;
-fx-text-fill: white; -fx-text-fill: white;
} }
@ -34,8 +34,8 @@
.combo-box .list-cell { .combo-box .list-cell {
-fx-background-color: #282828; -fx-background-color: #282828;
-fx-pref-height: 40px; -fx-pref-height: 35px;
-fx-font-size: 15px; -fx-font-size: 14px;
-fx-text-fill: #d4d4d4; -fx-text-fill: #d4d4d4;
-fx-padding: 0 0 0 10px; -fx-padding: 0 0 0 10px;
} }
@ -63,8 +63,9 @@
-fx-background-color: transparent; -fx-background-color: transparent;
} }
#sendButton { #sendButton,
-fx-background-color: #c45015; #sendButtonPane {
-fx-background-color: #282828;
} }
#responseDetails { #responseDetails {
@ -209,7 +210,14 @@
-fx-padding: 0px; -fx-padding: 0px;
} }
#keyField, #valueField, #filePathField { #keyField, #valueField {
-fx-prompt-text-fill: #919191;
-fx-background-color: #303030;
-fx-text-fill: white;
}
/* Binary tab */
#filePathBox, #filePathField {
-fx-prompt-text-fill: #919191; -fx-prompt-text-fill: #919191;
-fx-background-color: #303030; -fx-background-color: #303030;
-fx-text-fill: white; -fx-text-fill: white;
@ -238,7 +246,7 @@
} }
#browseButton { #browseButton {
-fx-background-color: #a2a2a2; -fx-background-color: #bababa;
} }
#browseButton:hover { #browseButton:hover {
@ -317,6 +325,10 @@
-fx-background-color: #2a2a2a; -fx-background-color: #2a2a2a;
} }
#responseTypeBox .list-cell {
-fx-font-size: 13px;
}
/* Response Headers Viewer */ /* Response Headers Viewer */
.response-header-label { .response-header-label {
-fx-font-family: "Liberation Mono", "Consolas", "Courier New", "Monaco", "DejaVu Sans Mono", monospace; -fx-font-family: "Liberation Mono", "Consolas", "Courier New", "Monaco", "DejaVu Sans Mono", monospace;
@ -351,7 +363,7 @@
.tree-cell { .tree-cell {
-fx-background-color: #282828; -fx-background-color: #282828;
-fx-text-fill: azure; -fx-text-fill: azure;
-fx-font-size: 15px; -fx-font-size: 14px;
-fx-font-family: "Liberation Mono", monospace; -fx-font-family: "Liberation Mono", monospace;
-fx-border-width: 0px; -fx-border-width: 0px;
} }

View file

@ -23,7 +23,7 @@
.everest-code-area .text { .everest-code-area .text {
-fx-fill: #ababab; -fx-fill: #ababab;
-fx-font-family: "Liberation Mono", "Consolas", "Courier New", "Monaco", "DejaVu Sans Mono", monospace; -fx-font-family: "Liberation Mono", "Consolas", "Courier New", "Monaco", "DejaVu Sans Mono", monospace;
-fx-font-size: 17px; -fx-font-size: 15px;
} }
.everest-code-area .caret { .everest-code-area .caret {

View file

@ -19,9 +19,12 @@
<?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXButton?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<TabPane fx:id="bodyTabPane" stylesheets="@../../css/Adreana.css" tabClosingPolicy="UNAVAILABLE" tabMinWidth="150.0" <TabPane fx:id="bodyTabPane" stylesheets="@../../css/Adreana.css" tabClosingPolicy="UNAVAILABLE" tabMinWidth="150.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.rohitawate.everest.controllers.BodyTabController"> fx:controller="com.rohitawate.everest.controllers.BodyTabController">
<tabs> <tabs>
<Tab fx:id="formTab" text="FORM"/> <Tab fx:id="formTab" text="FORM"/>
@ -41,13 +44,55 @@
</Tab> </Tab>
<Tab fx:id="binaryTab" text="BINARY"> <Tab fx:id="binaryTab" text="BINARY">
<content> <content>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="20.0"> <VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15.0">
<children> <children>
<TextField fx:id="filePathField" maxWidth="700.0" promptText="FILE PATH" HBox.hgrow="ALWAYS"/> <Label text="SELECT A FILE TO ADD TO THE REQUEST" textFill="#9a9a9a">
<JFXButton fx:id="browseButton" buttonType="RAISED" onAction="#browseFile" ripplerFill="WHITE" <font>
text="BROWSE" HBox.hgrow="ALWAYS"/> <Font size="14.0"/>
</font>
</Label>
<HBox alignment="CENTER" maxWidth="700.0" spacing="20.0">
<children>
<HBox fx:id="filePathBox" alignment="CENTER" maxHeight="35.0" minHeight="30.0"
HBox.hgrow="ALWAYS">
<children>
<TextField fx:id="filePathField" maxWidth="700.0" promptText="FILE PATH"
HBox.hgrow="ALWAYS"/>
<JFXButton fx:id="clearFilePathButton" contentDisplay="CENTER"
graphicTextGap="0.0" maxHeight="35.0" onAction="#clearFilePath"
ripplerFill="#ffffff00" textFill="WHITE">
<graphic>
<ImageView fitHeight="25.0" fitWidth="25.0" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@../../assets/BackspaceArrow.png"/>
</image>
</ImageView>
</graphic>
</JFXButton>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
</HBox>
<JFXButton fx:id="browseButton" buttonType="RAISED" graphicTextGap="10.0"
minWidth="80.0" onAction="#browseFile" ripplerFill="BLACK" text="BROWSE">
<graphic>
<ImageView fitHeight="18.0" fitWidth="18.0" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@../../assets/File.png"/>
</image>
</ImageView>
</graphic>
<font>
<Font size="12.0"/>
</font>
</JFXButton>
</children>
</HBox>
</children> </children>
</HBox> </VBox>
</content> </content>
</Tab> </Tab>
</tabs> </tabs>

View file

@ -25,49 +25,58 @@
<VBox fx:id="dashboard" alignment="CENTER" stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141" <VBox fx:id="dashboard" alignment="CENTER" stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.rohitawate.everest.controllers.DashboardController"> xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.rohitawate.everest.controllers.DashboardController">
<children> <children>
<HBox alignment="CENTER" maxHeight="100.0" minHeight="100.0" spacing="20.0" VBox.vgrow="ALWAYS"> <HBox alignment="CENTER" maxHeight="70.0" minHeight="70.0" spacing="20.0" VBox.vgrow="ALWAYS">
<children> <children>
<ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true" <ImageView fitHeight="40.0" fitWidth="40.0" pickOnBounds="true" preserveRatio="true"
HBox.hgrow="ALWAYS"> HBox.hgrow="ALWAYS">
<image> <image>
<Image url="@../../assets/Logo.png"/> <Image url="@../../assets/Logo.png"/>
</image> </image>
</ImageView> </ImageView>
<HBox fx:id="addressSection" alignment="CENTER" maxHeight="40.0" HBox.hgrow="ALWAYS"> <HBox fx:id="addressSection" alignment="CENTER" maxHeight="30.0" maxWidth="800.0" HBox.hgrow="ALWAYS">
<children> <children>
<StackPane fx:id="comboContainer" minHeight="40.0" minWidth="130.0"> <StackPane fx:id="comboContainer" maxHeight="35.0" minHeight="35.0" minWidth="100.0">
<children> <children>
<ComboBox fx:id="httpMethodBox" minHeight="40.0" minWidth="130.0" <ComboBox fx:id="httpMethodBox" minHeight="35.0" minWidth="100.0"
StackPane.alignment="CENTER"/> StackPane.alignment="CENTER"/>
</children> </children>
</StackPane> </StackPane>
<TextField fx:id="addressField" promptText="URL" HBox.hgrow="ALWAYS"> <TextField fx:id="addressField" maxHeight="35.0" minHeight="35.0" promptText="URL"
HBox.hgrow="ALWAYS">
<font> <font>
<Font size="18.0"/> <Font size="15.0"/>
</font> </font>
</TextField> </TextField>
<StackPane fx:id="sendButtonPane" maxHeight="35.0" HBox.hgrow="SOMETIMES">
<HBox.margin>
<Insets/>
</HBox.margin>
<children>
<JFXButton fx:id="sendButton" defaultButton="true" graphicTextGap="10.0" minWidth="80.0"
onAction="#sendRequest" prefHeight="30.0" ripplerFill="WHITE" text="SEND"
textAlignment="CENTER" textFill="WHITE">
<padding>
<Insets bottom="5.0" left="15.0" right="15.0" top="5.0"/>
</padding>
<font>
<Font size="15.0"/>
</font>
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@../../assets/Send.png"/>
</image>
</ImageView>
</graphic>
<StackPane.margin>
<Insets bottom="1.0" left="1.0" right="1.0" top="1.0"/>
</StackPane.margin>
</JFXButton>
</children>
</StackPane>
</children> </children>
</HBox> </HBox>
<JFXButton fx:id="sendButton" buttonType="RAISED" defaultButton="true" minWidth="110.0"
onAction="#sendRequest" prefHeight="39.0" ripplerFill="WHITE" text=" SEND"
textAlignment="CENTER" textFill="WHITE" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="5.0" left="15.0" right="15.0" top="5.0"/>
</padding>
<font>
<Font size="18.0"/>
</font>
<HBox.margin>
<Insets/>
</HBox.margin>
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/Send.png"/>
</image>
</ImageView>
</graphic>
</JFXButton>
</children> </children>
<padding> <padding>
<Insets left="20.0" right="20.0"/> <Insets left="20.0" right="20.0"/>
@ -85,51 +94,14 @@
<content> <content>
<VBox> <VBox>
<children> <children>
<HBox alignment="CENTER" maxHeight="0.0" spacing="20.0"
VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets/>
</VBox.margin>
<children>
<JFXButton fx:id="newParamButton" onAction="#addParamField"
text=" NEW PARAM" textFill="WHITE"
HBox.hgrow="ALWAYS">
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0"
pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/Plus.png"/>
</image>
</ImageView>
</graphic>
<HBox.margin>
<Insets/>
</HBox.margin>
</JFXButton>
<JFXButton fx:id="appendParamsButton" onAction="#appendParams"
ripplerFill="WHITE" text=" APPEND PARAMS"
textFill="WHITE" HBox.hgrow="ALWAYS">
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0"
pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/CheckMark.png"/>
</image>
</ImageView>
</graphic>
<HBox.margin>
<Insets/>
</HBox.margin>
</JFXButton>
</children>
<padding>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0"/>
</padding>
</HBox>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" <ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER"
VBox.vgrow="ALWAYS"> VBox.vgrow="ALWAYS">
<content> <content>
<VBox fx:id="paramsBox" alignment="TOP_CENTER"/> <VBox fx:id="paramsBox" alignment="TOP_CENTER">
<padding>
<Insets bottom="10.0" top="10.0"/>
</padding>
</VBox>
</content> </content>
</ScrollPane> </ScrollPane>
</children> </children>
@ -150,17 +122,17 @@
<children> <children>
<StackPane VBox.vgrow="ALWAYS"> <StackPane VBox.vgrow="ALWAYS">
<children> <children>
<VBox fx:id="responseLayer" visible="false"> <VBox fx:id="responseLayer">
<children> <children>
<HBox fx:id="responseDetails" alignment="CENTER_RIGHT" maxHeight="50.0" <HBox fx:id="responseDetails" alignment="CENTER_RIGHT" maxHeight="40.0"
minHeight="50.0" spacing="30.0" VBox.vgrow="ALWAYS"> minHeight="40.0" spacing="30.0" VBox.vgrow="ALWAYS">
<children> <children>
<HBox alignment="CENTER_LEFT" HBox.hgrow="ALWAYS"> <HBox alignment="CENTER_LEFT" HBox.hgrow="ALWAYS">
<children> <children>
<Label fx:id="statusCode" text="404" textFill="WHITE" <Label fx:id="statusCode" text="404" textFill="WHITE"
HBox.hgrow="ALWAYS"> HBox.hgrow="ALWAYS">
<font> <font>
<Font name="System Bold" size="35.0"/> <Font name="System Bold" size="22.0"/>
</font> </font>
<HBox.margin> <HBox.margin>
<Insets right="10.0"/> <Insets right="10.0"/>
@ -169,32 +141,33 @@
<Label fx:id="statusCodeDescription" text="Not Found" <Label fx:id="statusCodeDescription" text="Not Found"
textFill="WHITE" HBox.hgrow="ALWAYS"> textFill="WHITE" HBox.hgrow="ALWAYS">
<font> <font>
<Font size="30.0"/> <Font size="18.0"/>
</font> </font>
</Label> </Label>
</children> </children>
</HBox> </HBox>
<ComboBox fx:id="responseTypeBox" minHeight="30.0" <ComboBox fx:id="responseTypeBox" maxHeight="25.0"
prefWidth="100.0"/> minHeight="25.0" prefWidth="100.0"/>
<Label fx:id="responseTime" text="151 ms" textFill="WHITE" <Label fx:id="responseTime" text="151 ms" textFill="WHITE"
HBox.hgrow="ALWAYS"> HBox.hgrow="ALWAYS">
<HBox.margin> <HBox.margin>
<Insets/> <Insets/>
</HBox.margin> </HBox.margin>
<font> <font>
<Font name="Liberation Mono" size="17.0"/> <Font name="Liberation Mono" size="15.0"/>
</font> </font>
</Label> </Label>
<Label fx:id="responseSize" layoutX="1187.0" layoutY="23.0" <Label fx:id="responseSize" layoutX="1187.0" layoutY="23.0"
text="1998 B" textFill="WHITE" HBox.hgrow="ALWAYS"> text="1998 B" textFill="WHITE" HBox.hgrow="ALWAYS">
<font> <font>
<Font name="Liberation Mono" size="17.0"/> <Font name="Liberation Mono" size="15.0"/>
</font> </font>
<HBox.margin> <HBox.margin>
<Insets/> <Insets/>
</HBox.margin> </HBox.margin>
</Label> </Label>
<JFXButton fx:id="copyBodyButton" textFill="WHITE"> <JFXButton fx:id="copyBodyButton" textFill="WHITE"
HBox.hgrow="ALWAYS">
<graphic> <graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" <ImageView fitHeight="20.0" fitWidth="20.0"
pickOnBounds="true" preserveRatio="true"> pickOnBounds="true" preserveRatio="true">
@ -203,10 +176,14 @@
</image> </image>
</ImageView> </ImageView>
</graphic> </graphic>
<font>
<Font size="12.0"/>
</font>
</JFXButton> </JFXButton>
<JFXButton fx:id="clearResponseAreaButton" buttonType="RAISED" <JFXButton fx:id="clearResponseAreaButton" buttonType="RAISED"
onAction="#clearResponseArea" ripplerFill="WHITE" maxHeight="20.0" onAction="#clearResponseArea"
text=" CLEAR" textFill="WHITE" HBox.hgrow="ALWAYS"> ripplerFill="WHITE" text=" CLEAR" textFill="WHITE"
HBox.hgrow="ALWAYS">
<graphic> <graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" <ImageView fitHeight="15.0" fitWidth="15.0"
pickOnBounds="true" preserveRatio="true"> pickOnBounds="true" preserveRatio="true">
@ -219,6 +196,9 @@
<Tooltip autoHide="true" <Tooltip autoHide="true"
text="Clears this bar and the response body below."/> text="Clears this bar and the response body below."/>
</tooltip> </tooltip>
<font>
<Font size="12.0"/>
</font>
</JFXButton> </JFXButton>
</children> </children>
<padding> <padding>
@ -256,7 +236,7 @@
</JFXButton> </JFXButton>
</children> </children>
</VBox> </VBox>
<VBox fx:id="promptLayer" alignment="CENTER"> <VBox fx:id="promptLayer" alignment="CENTER" visible="false">
<children> <children>
<Label text="Enter an address, select a method and hit send." <Label text="Enter an address, select a method and hit send."
textFill="WHITE"> textFill="WHITE">

View file

@ -16,58 +16,20 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<?import com.jfoenix.controls.JFXButton?> <?import javafx.geometry.Insets?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.Image?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.*?>
<VBox fx:id="headerTabContent" alignment="CENTER" stylesheets="@../../css/Adreana.css" <VBox fx:id="headerTabContent" alignment="CENTER" stylesheets="@../../css/Adreana.css"
xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.rohitawate.everest.controllers.FormDataTabController"> fx:controller="com.rohitawate.everest.controllers.FormDataTabController">
<children> <children>
<HBox alignment="CENTER" VBox.vgrow="NEVER">
<VBox.margin>
<Insets/>
</VBox.margin>
<children>
<JFXButton fx:id="newStringKVButton" buttonType="RAISED" minWidth="100.0" onAction="#addStringField"
ripplerFill="WHITE" text=" STRING" textFill="WHITE" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0"/>
</padding>
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/Plus.png"/>
</image>
</ImageView>
</graphic>
<HBox.margin>
<Insets right="20.0"/>
</HBox.margin>
</JFXButton>
<JFXButton fx:id="newFileKVButton" buttonType="RAISED" layoutX="35.0" layoutY="25.0" minWidth="100.0"
onAction="#addFileField" ripplerFill="WHITE" text=" FILE" textFill="WHITE">
<padding>
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0"/>
</padding>
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/Plus.png"/>
</image>
</ImageView>
</graphic>
</JFXButton>
</children>
<padding>
<Insets bottom="10.0" left="25.0" right="10.0" top="15.0"/>
</padding>
</HBox>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS"> <ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS">
<content> <content>
<VBox fx:id="fieldsBox" alignment="TOP_CENTER"/> <VBox fx:id="fieldsBox" alignment="TOP_CENTER">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
</VBox>
</content> </content>
</ScrollPane> </ScrollPane>
</children> </children>

View file

@ -16,42 +16,20 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.Image?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.*?>
<VBox fx:id="headerTabContent" alignment="CENTER" stylesheets="@../../css/Adreana.css" <VBox fx:id="headerTabContent" alignment="CENTER" stylesheets="@../../css/Adreana.css"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.rohitawate.everest.controllers.HeaderTabController"> fx:controller="com.rohitawate.everest.controllers.HeaderTabController">
<children> <children>
<HBox alignment="CENTER" VBox.vgrow="NEVER">
<VBox.margin>
<Insets/>
</VBox.margin>
<children>
<JFXButton fx:id="addHeaderButton" buttonType="RAISED" onAction="#addHeader" text=" NEW HEADER"
textFill="WHITE" HBox.hgrow="ALWAYS">
<padding>
<Insets bottom="5.0" left="10.0" right="10.0" top="5.0"/>
</padding>
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/Plus.png"/>
</image>
</ImageView>
</graphic>
</JFXButton>
</children>
<padding>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0"/>
</padding>
</HBox>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS"> <ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS">
<content> <content>
<VBox fx:id="headersBox" alignment="TOP_CENTER"/> <VBox fx:id="headersBox" alignment="TOP_CENTER">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
</VBox>
</content> </content>
</ScrollPane> </ScrollPane>
</children> </children>

View file

@ -20,24 +20,19 @@
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tooltip?> <?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<HBox fx:id="historyItemBox" alignment="CENTER_LEFT" maxHeight="40.0" minHeight="40.0" minWidth="300.0" spacing="20.0" <HBox fx:id="historyItemBox" alignment="CENTER_LEFT" maxHeight="35.0" maxWidth="300.0" minHeight="35.0" minWidth="250.0"
stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" spacing="10.0" stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141"
fx:controller="com.rohitawate.everest.controllers.HistoryItemController"> xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.rohitawate.everest.controllers.HistoryItemController">
<children> <children>
<StackPane maxWidth="80.0" minWidth="80.0" HBox.hgrow="ALWAYS"> <Label fx:id="requestType" minWidth="50.0">
<children> <font>
<Label fx:id="requestType" textFill="ORANGERED" textOverrun="WORD_ELLIPSIS"> <Font name="Liberation Mono Bold" size="13.0"/>
<font> </font>
<Font name="Liberation Mono Bold" size="18.0"/> </Label>
</font> <Label fx:id="address" textFill="#bababa" textOverrun="WORD_ELLIPSIS" HBox.hgrow="ALWAYS">
</Label>
</children>
</StackPane>
<Label fx:id="address" textFill="WHITE" HBox.hgrow="ALWAYS">
<font> <font>
<Font size="15.0" /> <Font size="13.0"/>
</font> </font>
<tooltip> <tooltip>
<Tooltip fx:id="tooltip" text="tooltip"/> <Tooltip fx:id="tooltip" text="tooltip"/>
@ -45,6 +40,6 @@
</Label> </Label>
</children> </children>
<padding> <padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding> </padding>
</HBox> </HBox>

View file

@ -22,34 +22,30 @@
<?import javafx.scene.image.*?> <?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<VBox fx:id="searchPane" alignment="TOP_CENTER" maxWidth="310.0" minWidth="310.0" stylesheets="@../../css/Adreana.css"
<VBox fx:id="searchPane" xmlns="http://javafx.com/javafx/8.0.141" SplitPane.resizableWithParent="false" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1"
xmlns:fx="http://javafx.com/fxml/1" alignment="TOP_CENTER" maxWidth="450.0" fx:controller="com.rohitawate.everest.controllers.HistoryPaneController">
minWidth="400.0" SplitPane.resizableWithParent="false" fx:controller="com.rohitawate.everest.controllers.HistoryPaneController">
<children> <children>
<HBox fx:id="historySearchFieldBox" alignment="CENTER" <HBox fx:id="historySearchFieldBox" alignment="CENTER" fillHeight="false">
fillHeight="false">
<VBox.margin> <VBox.margin>
<Insets /> <Insets />
</VBox.margin> </VBox.margin>
<children> <children>
<ImageView fitHeight="20.0" fitWidth="20.0" <ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true"
pickOnBounds="true" preserveRatio="true" HBox.hgrow="ALWAYS"> HBox.hgrow="ALWAYS">
<image> <image>
<Image url="@../../assets/Search.png" /> <Image url="@../../assets/Search.png" />
</image> </image>
</ImageView> </ImageView>
<TextField fx:id="searchTextField" styleClass="searchTextField" promptText="SEARCH HISTORY" <TextField fx:id="searchTextField" promptText="SEARCH HISTORY" styleClass="searchTextField"
HBox.hgrow="ALWAYS"> HBox.hgrow="ALWAYS">
<padding> <padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding> </padding>
</TextField> </TextField>
<JFXButton fx:id="clearSearchFieldButton" <JFXButton fx:id="clearSearchFieldButton" ripplerFill="WHITE" HBox.hgrow="ALWAYS">
ripplerFill="WHITE" HBox.hgrow="ALWAYS">
<graphic> <graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" <ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
pickOnBounds="true" preserveRatio="true">
<image> <image>
<Image url="@../../assets/BackspaceArrow.png" /> <Image url="@../../assets/BackspaceArrow.png" />
</image> </image>
@ -65,22 +61,19 @@
<children> <children>
<StackPane> <StackPane>
<children> <children>
<ScrollPane fx:id="historyScrollPane" <ScrollPane fx:id="historyScrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER">
fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER">
<content> <content>
<VBox fx:id="searchTab" alignment="TOP_CENTER" <VBox fx:id="searchTab" alignment="TOP_CENTER" spacing="5.0">
spacing="5.0">
<padding> <padding>
<Insets bottom="20.0" left="20.0" right="20.0" <Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
top="20.0" />
</padding> </padding>
</VBox> </VBox>
</content> </content>
</ScrollPane> </ScrollPane>
<StackPane fx:id="searchPromptLayer"> <StackPane fx:id="searchPromptLayer">
<children> <children>
<Label text="YOUR REQUESTS HISTORY WILL APPEAR HERE" <Label text="YOUR REQUESTS HISTORY WILL APPEAR HERE" textAlignment="CENTER"
textAlignment="CENTER" textFill="#575757" wrapText="true"> textFill="#575757" wrapText="true">
<font> <font>
<Font size="25.0" /> <Font size="25.0" />
</font> </font>
@ -96,24 +89,20 @@
<children> <children>
<VBox alignment="TOP_CENTER"> <VBox alignment="TOP_CENTER">
<children> <children>
<Label graphicTextGap="10.0" text="SEARCH RESULTS" <Label graphicTextGap="10.0" text="SEARCH RESULTS" textFill="#199F6F">
textFill="#199F6F">
<VBox.margin> <VBox.margin>
<Insets bottom="10.0" left="10.0" right="10.0" <Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
top="10.0" />
</VBox.margin> </VBox.margin>
<font> <font>
<Font size="19.0" /> <Font size="19.0" />
</font> </font>
</Label> </Label>
<ScrollPane fx:id="searchScrollPane" <ScrollPane fx:id="searchScrollPane" fitToHeight="true" fitToWidth="true"
fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER"> hbarPolicy="NEVER">
<content> <content>
<VBox fx:id="searchBox" alignment="TOP_CENTER" <VBox fx:id="searchBox" alignment="TOP_CENTER" spacing="5.0">
spacing="5.0">
<padding> <padding>
<Insets bottom="20.0" left="20.0" right="20.0" <Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
top="20.0" />
</padding> </padding>
</VBox> </VBox>
</content> </content>
@ -124,14 +113,14 @@
<children> <children>
<VBox alignment="CENTER"> <VBox alignment="CENTER">
<children> <children>
<ImageView fitHeight="100.0" fitWidth="100.0" <ImageView fitHeight="100.0" fitWidth="100.0" opacity="0.51" pickOnBounds="true"
opacity="0.51" pickOnBounds="true" preserveRatio="true"> preserveRatio="true">
<image> <image>
<Image url="@../../assets/Explosion.png" /> <Image url="@../../assets/Explosion.png" />
</image> </image>
</ImageView> </ImageView>
<Label text="NO RESULTS" textAlignment="CENTER" <Label text="NO RESULTS" textAlignment="CENTER" textFill="#bfbfbf"
textFill="#bfbfbf" wrapText="true" VBox.vgrow="ALWAYS"> wrapText="true" VBox.vgrow="ALWAYS">
<font> <font>
<Font size="25.0" /> <Font size="25.0" />
</font> </font>
@ -148,4 +137,4 @@
</children> </children>
</StackPane> </StackPane>
</children> </children>
</VBox> </VBox>

View file

@ -16,41 +16,19 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.image.Image?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.image.ImageView?> <VBox stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1"
<?import javafx.scene.layout.*?>
<VBox stylesheets="@../../css/Adreana.css" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.rohitawate.everest.controllers.URLTabController"> fx:controller="com.rohitawate.everest.controllers.URLTabController">
<children> <children>
<HBox alignment="CENTER" VBox.vgrow="NEVER">
<VBox.margin>
<Insets/>
</VBox.margin>
<children>
<JFXButton fx:id="newStringKVButton" onAction="#addField" text=" NEW FIELD" textFill="WHITE"
HBox.hgrow="ALWAYS">
<graphic>
<ImageView fitHeight="15.0" fitWidth="15.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../assets/Plus.png"/>
</image>
</ImageView>
</graphic>
<HBox.margin>
<Insets/>
</HBox.margin>
</JFXButton>
</children>
<padding>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0"/>
</padding>
</HBox>
<ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS"> <ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" VBox.vgrow="ALWAYS">
<content> <content>
<VBox fx:id="fieldsBox" alignment="TOP_CENTER"/> <VBox fx:id="fieldsBox" alignment="TOP_CENTER">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="15.0"/>
</padding>
</VBox>
</content> </content>
</ScrollPane> </ScrollPane>
</children> </children>