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

Initial Machinery interface for Phoenix Apps #14

Merged
merged 21 commits into from
Jan 2, 2018
Merged

Conversation

joaomdmoura
Copy link
Owner

Related to: #4

This is a major feature for Machinery before 1.0.

The idea is to provide a GUI that represents the states and the resources at each state.
This will provide a helpful and good way for developers to debug or even as an internal (admin like) tool.

Merging this will add a bunch of new dependencies to Machinery, because of that I've been considering spinning it off as its own project, but not sure about it yet.

This is how it looks so far:
screen shot 2017-12-26 at 12 48 57


$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings must use singlequote.

Read more about it here.


$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings must use singlequote.

Read more about it here.


$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible undefined variable: '$' is not defined.

If this is intended to be a global variable, you can supress this warning by adding a /*global [VARIABLE NAME] */ comment on this file or set it under the globals section of your .eslintrc configuration.

Read more about it here.

// If you no longer want to use a dependency, remember
// to also remove its path from "config.paths.watched".

$("#menu-toggle").click(function(e) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings must use singlequote.

Read more about it here.

// If you no longer want to use a dependency, remember
// to also remove its path from "config.paths.watched".

$("#menu-toggle").click(function(e) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible undefined variable: '$' is not defined.

If this is intended to be a global variable, you can supress this warning by adding a /*global [VARIABLE NAME] */ comment on this file or set it under the globals section of your .eslintrc configuration.

Read more about it here.

}
}

.topbar h1 {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heading (h1) should not be qualified.

margin: 0px 10px;
}

nav.topbar {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule doesn't have all its properties in alphabetical ordered.

padding: 15px 15px;
background-color: rgb(241, 239, 239);
border-radius: .3rem;
margin: 0px 10px;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Values of 0 shouldn't have units specified.

color: #666;
}

div.filled {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Element (div.filled) is overqualified, just use .filled without element name.

color: #666;
}

div.filled {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule doesn't have all its properties in alphabetical ordered.

Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 26, 2017
Repository owner deleted a comment from coveralls Dec 27, 2017
Repository owner deleted a comment from coveralls Dec 27, 2017
@joaomdmoura joaomdmoura force-pushed the state-gui branch 2 times, most recently from e719eae to 7ab2340 Compare December 28, 2017 18:43
Repository owner deleted a comment from coveralls Dec 28, 2017
Repository owner deleted a comment from coveralls Dec 28, 2017
Repository owner deleted a comment from coveralls Dec 28, 2017
resourcesLists.insertAdjacentHTML('beforeend', template);
})
});
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.

</div>
`
resourcesLists.insertAdjacentHTML('beforeend', template);
})
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.

</div>
</div>
`
resourcesLists.insertAdjacentHTML('beforeend', template);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible undefined variable: 'template' is not defined.

If this is intended to be a global variable, you can supress this warning by adding a /*global [VARIABLE NAME] */ comment on this file or set it under the globals section of your .eslintrc configuration.

Read more about it here.

</div>
</div>
</div>
`
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.

<table class="table table-striped">
<tbody>
${
"lol"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings must use singlequote.

Read more about it here.

list.parentNode.querySelector('.info').innerHTML = error_alert_markup
}
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.

if (xhr.status === OK) {
callback(JSON.parse(xhr.response))
} else {
list.parentNode.querySelector('.info').innerHTML = error_alert_markup
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.

if (xhr.status === OK) {
callback(JSON.parse(xhr.response))
} else {
list.parentNode.querySelector('.info').innerHTML = error_alert_markup
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier 'error_alert_markup' is not in camel case.

Enforce the usage of camel case to have a consistent codebase.

Read more about it here.


if (xhr.readyState === DONE) {
if (xhr.status === OK) {
callback(JSON.parse(xhr.response))
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.


getResourcesForState(list, callback) {
let xhr = new XMLHttpRequest();
let state = list.dataset.state
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

Read more about it here.

Repository owner deleted a comment from coveralls Jan 1, 2018
Repository owner deleted a comment from coveralls Jan 1, 2018
@joaomdmoura joaomdmoura force-pushed the state-gui branch 2 times, most recently from a8ca7d9 to 5db5740 Compare January 1, 2018 18:29
Repository owner deleted a comment from coveralls Jan 1, 2018
Repository owner deleted a comment from coveralls Jan 1, 2018
Repository owner deleted a comment from coveralls Jan 2, 2018
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 98.649% when pulling 3014b59 on state-gui into c28442f on master.

@joaomdmoura joaomdmoura changed the title [WIP] Initial Machinery interface for Phoenix Apps Initial Machinery interface for Phoenix Apps Jan 2, 2018
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 98.649% when pulling d32d4ec on state-gui into c28442f on master.

@joaomdmoura joaomdmoura merged commit da9b62d into master Jan 2, 2018
@joaomdmoura joaomdmoura deleted the state-gui branch January 2, 2018 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants