Skip to content

Commit

Permalink
Merge pull request #701 from mesosphere/tooltip-and-error-text
Browse files Browse the repository at this point in the history
edits to tooltips and errors
  • Loading branch information
Poltergeist committed Mar 21, 2016
2 parents 8dd8db6 + 665a2b2 commit 4861791
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
5 changes: 3 additions & 2 deletions src/js/components/LocalVolumesComponent.jsx
Expand Up @@ -55,8 +55,9 @@ var LocalVolumesComponent = React.createClass({
var containerPathTooltipMessage = (
<span>
The path to the directory where your application will
read and write data. The path must be non-nested and cannot contain slashes, e.g. `data`,
but not `../../../etc/opt` or `/user/data/`.
read and write data. The path must be non-nested and
cannot contain slashes, e.g. `data`, but not
`../../../etc/opt` or `/user/data/`.
<a href={ExternalLinks.CONTAINER_PATH} target="_blank">Read more</a>.
</span>
);
Expand Down
21 changes: 10 additions & 11 deletions src/js/components/OptionalPortsAndServiceDiscoveryComponent.jsx
Expand Up @@ -114,11 +114,11 @@ var OptionalPortsAndServiceDiscoveryComponent = React.createClass({
.join(", ")
.replace(/(.*), (.*)$/, "$1 and $2");

var message = "Your application will need to be configured to listen to" +
var message = "Configure your application to listen to" +
` ${portIdentifiers}${dynamicPortText}.`;

if (type === ContainerConstants.NETWORK.HOST) {
message = "Your Docker container will need to be configured to listen" +
message = "Configure your Docker container to listen" +
` to ${portIdentifiers}${dynamicPortText}.`;
} else if (type === ContainerConstants.NETWORK.BRIDGE) {
message = "Your Docker container will bind to the requested ports and" +
Expand Down Expand Up @@ -159,9 +159,8 @@ var OptionalPortsAndServiceDiscoveryComponent = React.createClass({

var fieldTooltipMessage = (
<span>
Port configuration for applications in Marathon can be confusing,
to Learn more visit the
docs: <a href={ExternalLinks.PORTS} target="_blank">Read more</a>.
Enter the port you want to assign to your
VIP. <a href={ExternalLinks.PORTS} target="_blank">Read more</a>.
</span>
);

Expand Down Expand Up @@ -284,12 +283,12 @@ var OptionalPortsAndServiceDiscoveryComponent = React.createClass({
if (!hasPluginComponent && isTooComplexStructure(this.props.fields)) {
return (
<div>
Looks like your ports &amp; service discovery configuration
is a little bit too sophisticated for our form to handle.
Please switch
to <a className="json-link clickable"
onClick={this.props.handleModeToggle}>JSON mode</a> if
you want to view or modify.
Switch to <a
className="json-link clickable"
onClick={this.props.handleModeToggle}>
JSON mode
</a> to make advanced port and service discovery configuration
changes.
</div>
);
}
Expand Down
8 changes: 4 additions & 4 deletions src/js/constants/AppFormErrorMessages.js
Expand Up @@ -27,7 +27,7 @@ const applicationFieldValidationErrors = Util.deepFreeze({
"Container Path must be a valid path",
"Container Path and Size must be set"
],
cpus: ["CPUs must be a number greater or equal to 0.01"],
cpus: ["CPUs must be a number greater than or equal to 0.01"],
disk: ["Disk Space must be a non-negative number"],
dockerImage: ["Image cannot contain whitespaces"],
dockerParameters: ["Key cannot be blank"],
Expand All @@ -46,10 +46,10 @@ const applicationFieldValidationErrors = Util.deepFreeze({
],
instances: ["Instances must be a non-negative number"],
labels: ["Key cannot be blank"],
mem: ["Memory must be a number greater or equal to 32"],
mem: ["Memory must be a number greater than or equal to 32"],
portDefinitions: [
"Port must be a valid port",
"Protocol must be of type 'tcp' or 'udp'"
"Protocol must be either 'tcp' or 'udp'"
],
});

Expand All @@ -69,7 +69,7 @@ const serverResponseMappings = Util.deepFreeze({
"error.path.missing": "Specify a path",
"error.minLength": "Command may not be blank",
"error.expected.jsnumber": "A number is expected",
"error.expected.jsstring": "A string is expect"
"error.expected.jsstring": "A string is expected"
});

const AppFormErrorMessages = {
Expand Down
6 changes: 4 additions & 2 deletions src/js/constants/ExternalLinks.js
Expand Up @@ -3,8 +3,10 @@ const ExternalLinks = {
"marathon-ui.html#application-status-reference",
DOCS_HEALTH: "https://mesosphere.github.io/marathon/docs/" +
"marathon-ui.html#application-health-reference",
LOCAL_VOLUMES: "https://mesosphere.github.io/marathon/docs/persistent-volumes.html",
CONTAINER_PATH: "http://mesosphere.github.io/marathon/docs/persistent-volumes.html",
LOCAL_VOLUMES:
"https://mesosphere.github.io/marathon/docs/persistent-volumes.html",
CONTAINER_PATH:
"http://mesosphere.github.io/marathon/docs/persistent-volumes.html",
PORTS: "https://mesosphere.github.io/marathon/docs/ports.html",
JSON_EDITOR: "about:blank"
};
Expand Down

0 comments on commit 4861791

Please sign in to comment.