fix services & processes; improve UI

This commit is contained in:
Iuri Matias 2018-10-17 18:36:46 -04:00 committed by Pascal Precht
parent 88c610208c
commit b06d224883
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
25 changed files with 231303 additions and 59 deletions

View File

@ -520,7 +520,7 @@
},
"axios": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "^1.3.0",
@ -801,7 +801,7 @@
},
"babel-plugin-istanbul": {
"version": "4.1.6",
"resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
"resolved": "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz",
"integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==",
"requires": {
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
@ -847,7 +847,7 @@
},
"babel-plugin-syntax-object-rest-spread": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
"resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
"integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U="
},
"babel-plugin-syntax-trailing-function-commas": {
@ -1605,7 +1605,7 @@
},
"browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
"requires": {
"buffer-xor": "^1.0.3",
@ -1639,7 +1639,7 @@
},
"browserify-rsa": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
"resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
"requires": {
"bn.js": "^4.1.0",
@ -1695,7 +1695,7 @@
},
"buffer": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
"resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
"requires": {
"base64-js": "^1.0.2",
@ -2366,7 +2366,7 @@
},
"create-hash": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
"requires": {
"cipher-base": "^1.0.1",
@ -2378,7 +2378,7 @@
},
"create-hmac": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"requires": {
"cipher-base": "^1.0.3",
@ -2857,7 +2857,7 @@
},
"diffie-hellman": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
"resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
"integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
"requires": {
"bn.js": "^4.1.0",
@ -2986,7 +2986,7 @@
},
"duplexer": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E="
},
"duplexer3": {
@ -3414,7 +3414,7 @@
},
"load-json-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"requires": {
"graceful-fs": "^4.1.2",
@ -3592,7 +3592,7 @@
},
"events": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz",
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
},
"eventsource": {
@ -3727,7 +3727,7 @@
},
"express": {
"version": "4.16.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz",
"resolved": "http://registry.npmjs.org/express/-/express-4.16.3.tgz",
"integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=",
"requires": {
"accepts": "~1.3.5",
@ -4029,7 +4029,7 @@
},
"finalhandler": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
"integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
"requires": {
"debug": "2.6.9",
@ -4721,7 +4721,7 @@
},
"get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-value": {
@ -5197,7 +5197,7 @@
},
"http-errors": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
@ -5460,7 +5460,7 @@
},
"inline-style-prefixer": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-2.0.5.tgz",
"resolved": "http://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-2.0.5.tgz",
"integrity": "sha1-wVPH6I/YT+9cYC6VqBaLJ3BnH+c=",
"requires": {
"bowser": "^1.0.0",
@ -5592,7 +5592,7 @@
},
"is-builtin-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"requires": {
"builtin-modules": "^1.0.0"
@ -5734,7 +5734,7 @@
},
"is-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
},
"is-path-cwd": {
@ -6663,7 +6663,7 @@
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
},
"jsonfile": {
@ -6759,7 +6759,7 @@
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "^4.1.2",
@ -7215,7 +7215,7 @@
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mixin-deep": {
@ -7239,7 +7239,7 @@
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
@ -7927,7 +7927,7 @@
},
"parse-asn1": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz",
"resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz",
"integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==",
"requires": {
"asn1.js": "^4.0.0",
@ -8114,7 +8114,7 @@
"dependencies": {
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
}
}
@ -9804,7 +9804,7 @@
},
"react-redux": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz",
"resolved": "http://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz",
"integrity": "sha512-5VI8EV5hdgNgyjfmWzBbdrqUkrVRKlyTKk1sGH3jzM2M2Mhj/seQgPXaz6gVAj2lz/nz688AdTqMO18Lr24Zhg==",
"requires": {
"hoist-non-react-statics": "^2.5.0",
@ -10407,7 +10407,7 @@
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
}
}
@ -10590,7 +10590,7 @@
},
"sha.js": {
"version": "2.4.11",
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
"resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
@ -10647,6 +10647,11 @@
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"simple-line-icons": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/simple-line-icons/-/simple-line-icons-2.4.1.tgz",
"integrity": "sha1-t1vFoNh+UwkowszaVzUnS7JW8jQ="
},
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
@ -11055,7 +11060,7 @@
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
@ -11161,7 +11166,7 @@
},
"table": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz",
"resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz",
"integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==",
"requires": {
"ajv": "^6.0.1",
@ -11262,7 +11267,7 @@
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"thunky": {
@ -12366,7 +12371,7 @@
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"string-width": "^1.0.1",

View File

@ -66,6 +66,7 @@
"redux": "^4.0.0",
"redux-saga": "^0.16.0",
"resolve": "1.6.0",
"simple-line-icons": "^2.4.1",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"tabler-react": "^1.18.0",

View File

@ -108,6 +108,13 @@ export const processes = {
failure: (error) => action(PROCESSES[FAILURE], {error})
};
export const SERVICES = createRequestTypes('SERVICES');
export const services = {
request: () => action(SERVICES[REQUEST]),
success: (services) => action(SERVICES[SUCCESS], {services}),
failure: (error) => action(SERVICES[FAILURE], {error})
};
export const COMMANDS = createRequestTypes('COMMANDS');
export const commands = {
post: (command) => action(COMMANDS[REQUEST], {command}),

View File

@ -73,7 +73,7 @@ const Layout = ({children, logout, credentials, location, toggleTheme, currentTh
<SearchBar searchSubmit={searchValue => searchTheExplorer(searchValue)}/>
<AppHeaderDropdown direction="down">
<DropdownToggle nav>
<i className="fa fa-user fa-3x" />
<i className="icon-settings" />
</DropdownToggle>
<DropdownMenu right style={{ right: 'auto' }}>
<DropdownItem className="text-capitalize" onClick={() => toggleTheme()}>

View File

@ -2,33 +2,27 @@ import PropTypes from "prop-types";
import React from 'react';
import {Row, Col, Card} from 'reactstrap';
import classNames from 'classnames';
import Widget02 from './Widget02';
function badgeClasses(state){
return classNames('badge p-1 mr-3', {
'bg-success': state === 'running',
'bg-danger': state !== 'running'
function colorClasses(state){
return classNames('', {
'success': state === 'on',
'danger': state !== 'on'
});
}
function iconClasses(state){
return classNames('fa', {
'fa-check': state === 'running',
'fa-x': state !== 'running'
'fa-check': state === 'on',
'fa-times': state !== 'on'
});
}
// processList.push({state: service.status, name: serviceName, description: service.name})
const Process = ({process}) => (
<Col sm={6} lg={3}>
<Card className="p-3">
<div className="d-flex align-items-center">
<span className={badgeClasses(process.state)}>
<i className={iconClasses(process.state)}></i>
</span>
<div>
<h4 className="text-capitalize m-0">{process.name} ({process.state})</h4>
</div>
</div>
</Card>
<Col sm={6} lg={2}>
<Widget02 header={process.name} mainText={process.description} icon={iconClasses(process.state)} color={colorClasses(process.state)} variant="1" />
</Col>
);

View File

@ -0,0 +1,76 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Card, CardBody, CardFooter } from 'reactstrap';
import classNames from 'classnames';
import { mapToCssModules } from 'reactstrap/lib/utils';
const propTypes = {
header: PropTypes.string,
mainText: PropTypes.string,
icon: PropTypes.string,
color: PropTypes.string,
variant: PropTypes.string,
footer: PropTypes.bool,
link: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
};
const defaultProps = {
header: '$1,999.50',
mainText: 'Income',
icon: 'fa fa-cogs',
color: 'primary',
variant: '0',
link: '#',
};
class Widget02 extends Component {
render() {
const { className, cssModule, header, mainText, icon, color, footer, link, children, variant, ...attributes } = this.props;
// demo purposes only
const padding = (variant === '0' ? { card: 'p-3', icon: 'p-3', lead: 'mt-2' } : (variant === '1' ? {
card: 'p-0', icon: 'p-4', lead: 'pt-3',
} : { card: 'p-0', icon: 'p-4 px-5', lead: 'pt-3' }));
const card = { style: 'clearfix', color: color, icon: icon, classes: '' };
card.classes = mapToCssModules(classNames(className, card.style, padding.card), cssModule);
const lead = { style: 'h5 mb-0', color: color, classes: '' };
lead.classes = classNames(lead.style, 'text-' + card.color, padding.lead);
const blockIcon = function (icon) {
const classes = classNames(icon, 'bg-' + card.color, padding.icon, 'font-2xl mr-3 float-left');
return (<i className={classes}></i>);
};
const cardFooter = function () {
if (footer) {
return (
<CardFooter className="px-3 py-2">
<a className="font-weight-bold font-xs btn-block text-muted" href={link}>View More
<i className="fa fa-angle-right float-right font-lg"></i></a>
</CardFooter>
);
}
};
return (
<Card>
<CardBody className={card.classes} {...attributes}>
{blockIcon(card.icon)}
<div className={lead.classes}>{header}</div>
<div className="text-muted text-uppercase font-weight-bold font-xs">{mainText}</div>
</CardBody>
{cardFooter()}
</Card>
);
}
}
Widget02.propTypes = propTypes;
Widget02.defaultProps = defaultProps;
export default Widget02;

View File

@ -56,6 +56,7 @@ class AppContainer extends Component {
if (this.props.credentials.authenticated && !this.props.initialized) {
this.props.fetchProcesses();
this.props.fetchServices();
this.props.fetchPlugins();
}
}
@ -100,6 +101,7 @@ AppContainer.propTypes = {
fetchCredentials: PropTypes.func,
initBlockHeader: PropTypes.func,
fetchProcesses: PropTypes.func,
fetchServices: PropTypes.func,
fetchPlugins: PropTypes.func,
fetchVersions: PropTypes.func,
location: PropTypes.object,
@ -124,6 +126,7 @@ export default withRouter(connect(
logout: logout.request,
fetchCredentials: fetchCredentials.request,
fetchProcesses: processesAction.request,
fetchServices: processesAction.request,
fetchVersions: versionsAction.request,
fetchPlugins: pluginsAction.request,
changeTheme: changeTheme.request,

View File

@ -22,7 +22,7 @@ import Processes from '../components/Processes';
import Console from '../components/Console';
import {EMBARK_PROCESS_NAME, LOG_LIMIT} from '../constants';
import ContractsList from '../components/ContractsList';
import {getContracts, getProcesses, getProcessLogs, getCommandSuggestions} from "../reducers/selectors";
import {getContracts, getProcesses, getProcessLogs, getServices, getCommandSuggestions} from "../reducers/selectors";
class HomeContainer extends Component {
constructor(props) {
@ -59,8 +59,8 @@ class HomeContainer extends Component {
render() {
return (
<React.Fragment>
<DataWrapper shouldRender={this.props.processes.length > 0 } {...this.props} render={({processes}) => (
<Processes processes={processes} />
<DataWrapper shouldRender={this.props.services.length > 0 } {...this.props} render={({services}) => (
<Processes processes={services} />
)} />
<DataWrapper shouldRender={this.props.contracts.length > 0} {...this.props} render={({contracts}) => (
<Card>
@ -108,6 +108,7 @@ HomeContainer.propTypes = {
function mapStateToProps(state) {
return {
processes: getProcesses(state),
services: getServices(state),
contracts: getContracts(state),
error: state.errorMessage,
processLogs: getProcessLogs(state),

View File

@ -3,8 +3,14 @@ import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
// CoreUI Icons Set
import '@coreui/icons/css/coreui-icons.min.css';
// Import Flag Icons Set
// import 'flag-icon-css/css/flag-icon.min.css';
// Icons
import 'font-awesome/css/font-awesome.min.css';
// Import Simple Line Icons Set
import 'simple-line-icons/css/simple-line-icons.css';
// Light theme
import '@coreui/coreui/dist/css/coreui.min.css';
// Dark theme

View File

@ -14,6 +14,7 @@ const entitiesDefaultState = {
blocks: [],
transactions: [],
processes: [],
services: [],
processLogs: [],
commandSuggestions: [],
contracts: [],

View File

@ -52,6 +52,10 @@ export function getProcesses(state) {
return state.entities.processes;
}
export function getServices(state) {
return state.entities.services;
}
export function getProcessLogs(state) {
return state.entities.processLogs;
}

View File

@ -25,6 +25,7 @@ export const fetchAccounts = doRequest.bind(null, actions.accounts, api.fetchAcc
export const fetchBlocks = doRequest.bind(null, actions.blocks, api.fetchBlocks);
export const fetchTransactions = doRequest.bind(null, actions.transactions, api.fetchTransactions);
export const fetchProcesses = doRequest.bind(null, actions.processes, api.fetchProcesses);
export const fetchServices = doRequest.bind(null, actions.services, api.fetchServices);
export const postCommand = doRequest.bind(null, actions.commands, api.postCommand);
export const postCommandSuggestions = doRequest.bind(null, actions.commandSuggestions, api.postCommandSuggestions);
export const fetchProcessLogs = doRequest.bind(null, actions.processLogs, api.fetchProcessLogs);
@ -88,6 +89,10 @@ export function *watchFetchProcesses() {
yield takeEvery(actions.PROCESSES[actions.REQUEST], fetchProcesses);
}
export function *watchFetchServices() {
yield takeLatest(actions.PROCESSES[actions.REQUEST], fetchServices);
}
export function *watchPostCommand() {
yield takeEvery(actions.COMMANDS[actions.REQUEST], postCommand);
}
@ -357,6 +362,7 @@ export default function *root() {
fork(watchFetchAccounts),
fork(watchFetchAccount),
fork(watchFetchProcesses),
fork(watchFetchServices),
fork(watchFetchProcessLogs),
fork(watchFetchContractLogs),
fork(watchFetchContractEvents),

View File

@ -87,6 +87,10 @@ export function fetchProcesses() {
return get('/processes', ...arguments);
}
export function fetchServices() {
return get('/services', ...arguments);
}
export function fetchProcessLogs(payload) {
return get(`/process-logs/${payload.processName}`, {params: payload, credentials: payload.credentials});
}

View File

@ -99,7 +99,7 @@ class Engine {
events: this.events
});
}
loggerApiService(_options){
this.registerModule('logger_api', {
logger: this.logger
@ -141,7 +141,7 @@ class Engine {
const self = this;
const ServicesMonitor = require('./services_monitor.js');
this.servicesMonitor = new ServicesMonitor({events: this.events, logger: this.logger, plugins: this.plugins});
this.servicesMonitor.addCheck('embarkVersion', function (cb) {
this.servicesMonitor.addCheck('Embark', function (cb) {
return cb({name: 'Embark ' + self.version, status: 'on'});
}, 0);
this.servicesMonitor.startMonitor();

View File

@ -20,6 +20,26 @@ class ProcessManager {
_registerAsPlugin() {
const self = this;
self.plugin = this.plugins.createPlugin('processManager', {});
this.servicesState = {}
this.events.on("servicesState", (servicesState) => {
this.servicesState = servicesState;
//console.dir(this.servicesState)
})
self.plugin.registerAPICall(
'get',
'/embark-api/services',
(req, res) => {
let processList = []
for (let serviceName in this.servicesState) {
let service = this.servicesState[serviceName]
processList.push({state: service.status, name: serviceName, description: service.name})
}
res.send(processList)
}
);
self.plugin.registerAPICall(
'get',
'/embark-api/processes',

View File

@ -32,7 +32,7 @@ ServicesMonitor.prototype.initCheck = function (checkName) {
if (check && check.status === 'on' && obj.status === 'off') {
self.events.emit('check:wentOffline:' + checkName);
}
self.checkState[checkName] = {name: obj.name, status: obj.status};
self.checkState[checkName] = {name: obj.name, status: obj.status, serviceName: checkName};
check.status = obj.status;
self.events.emit("servicesState", self.checkState);
});

View File

@ -0,0 +1,235 @@
{
"deploy": false,
"silent": true,
"className": "ENS",
"args": [],
"code": "",
"runtimeBytecode": "",
"realRuntimeBytecode": "",
"swarmHash": "",
"gasEstimates": null,
"functionHashes": {
"owner(bytes32)": "02571be3",
"resolver(bytes32)": "0178b8bf",
"setOwner(bytes32,address)": "5b0fc9c3",
"setResolver(bytes32,address)": "1896f70a",
"setSubnodeOwner(bytes32,bytes32,address)": "06ab5923",
"setTTL(bytes32,uint64)": "14ab9038",
"ttl(bytes32)": "16a25cbd"
},
"abiDefinition": [
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "resolver",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "label",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setSubnodeOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "ttl",
"type": "uint64"
}
],
"name": "setTTL",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "ttl",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "resolver",
"type": "address"
}
],
"name": "setResolver",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": true,
"name": "label",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "NewOwner",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "resolver",
"type": "address"
}
],
"name": "NewResolver",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "ttl",
"type": "uint64"
}
],
"name": "NewTTL",
"type": "event"
}
],
"filename": "/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/ENS.sol",
"originalFilename": "contracts//Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/ENS.sol",
"path": "/Users/iurimatias/Projects/Status/embark/test_apps/embark_demo/contracts/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/ENS.sol",
"gas": "auto",
"type": "file",
"_gasLimit": false,
"error": false
}

View File

@ -0,0 +1,271 @@
{
"deploy": true,
"silent": true,
"args": [],
"className": "ENSRegistry",
"code": "608060405234801561001057600080fd5b5060008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb58054600160a060020a03191633179055610684806100596000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461008757806302571be3146100bb57806306ab5923146100d357806314ab9038146100fc57806316a25cbd146101215780631896f70a146101565780635b0fc9c31461017a575b600080fd5b34801561009357600080fd5b5061009f60043561019e565b60408051600160a060020a039092168252519081900360200190f35b3480156100c757600080fd5b5061009f6004356101bc565b3480156100df57600080fd5b506100fa600435602435600160a060020a03604435166101d7565b005b34801561010857600080fd5b506100fa60043567ffffffffffffffff6024351661033c565b34801561012d57600080fd5b5061013960043561044d565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561016257600080fd5b506100fa600435600160a060020a0360243516610484565b34801561018657600080fd5b506100fa600435600160a060020a036024351661056f565b600090815260208190526040902060010154600160a060020a031690565b600090815260208190526040902054600160a060020a031690565b60008381526020819052604081205484908390600160a060020a031615806102155750600082815260208190526040902054600160a060020a031633145b806102395750600082815260208190526040902054600160a060020a038281169116145b151561024457600080fd5b604080516020808201899052818301889052825180830384018152606090920192839052815191929182918401908083835b602083106102955780518252601f199092019160209182019101610276565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600160a060020a038b16835293519398508a95508b94507fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e829391829003019150a350506000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600082815260208190526040812054839190600160a060020a031615806103795750600082815260208190526040902054600160a060020a031633145b8061039d5750600082815260208190526040902054600160a060020a038281169116145b15156103a857600080fd5b6040805167ffffffffffffffff85168152905185917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68919081900360200190a25050600091825260208290526040909120600101805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60009081526020819052604090206001015474010000000000000000000000000000000000000000900467ffffffffffffffff1690565b600082815260208190526040812054839190600160a060020a031615806104c15750600082815260208190526040902054600160a060020a031633145b806104e55750600082815260208190526040902054600160a060020a038281169116145b15156104f057600080fd5b60408051600160a060020a0385168152905185917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0919081900360200190a25050600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b60008281526020819052604090205482908290600160a060020a031615806105ad5750600082815260208190526040902054600160a060020a031633145b806105d15750600082815260208190526040902054600160a060020a038281169116145b15156105dc57600080fd5b60408051600160a060020a0385168152905185917fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266919081900360200190a25050600091825260208290526040909120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555600a165627a7a723058208297e7f6579053ad609b1558f075456841dd8665c4b94b674b670b7bbf68762f0029",
"runtimeBytecode": "6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461008757806302571be3146100bb57806306ab5923146100d357806314ab9038146100fc57806316a25cbd146101215780631896f70a146101565780635b0fc9c31461017a575b600080fd5b34801561009357600080fd5b5061009f60043561019e565b60408051600160a060020a039092168252519081900360200190f35b3480156100c757600080fd5b5061009f6004356101bc565b3480156100df57600080fd5b506100fa600435602435600160a060020a03604435166101d7565b005b34801561010857600080fd5b506100fa60043567ffffffffffffffff6024351661033c565b34801561012d57600080fd5b5061013960043561044d565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561016257600080fd5b506100fa600435600160a060020a0360243516610484565b34801561018657600080fd5b506100fa600435600160a060020a036024351661056f565b600090815260208190526040902060010154600160a060020a031690565b600090815260208190526040902054600160a060020a031690565b60008381526020819052604081205484908390600160a060020a031615806102155750600082815260208190526040902054600160a060020a031633145b806102395750600082815260208190526040902054600160a060020a038281169116145b151561024457600080fd5b604080516020808201899052818301889052825180830384018152606090920192839052815191929182918401908083835b602083106102955780518252601f199092019160209182019101610276565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600160a060020a038b16835293519398508a95508b94507fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e829391829003019150a350506000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600082815260208190526040812054839190600160a060020a031615806103795750600082815260208190526040902054600160a060020a031633145b8061039d5750600082815260208190526040902054600160a060020a038281169116145b15156103a857600080fd5b6040805167ffffffffffffffff85168152905185917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68919081900360200190a25050600091825260208290526040909120600101805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60009081526020819052604090206001015474010000000000000000000000000000000000000000900467ffffffffffffffff1690565b600082815260208190526040812054839190600160a060020a031615806104c15750600082815260208190526040902054600160a060020a031633145b806104e55750600082815260208190526040902054600160a060020a038281169116145b15156104f057600080fd5b60408051600160a060020a0385168152905185917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0919081900360200190a25050600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b60008281526020819052604090205482908290600160a060020a031615806105ad5750600082815260208190526040902054600160a060020a031633145b806105d15750600082815260208190526040902054600160a060020a038281169116145b15156105dc57600080fd5b60408051600160a060020a0385168152905185917fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266919081900360200190a25050600091825260208290526040909120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555600a165627a7a723058208297e7f6579053ad609b1558f075456841dd8665c4b94b674b670b7bbf68762f0029",
"realRuntimeBytecode": "6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461008757806302571be3146100bb57806306ab5923146100d357806314ab9038146100fc57806316a25cbd146101215780631896f70a146101565780635b0fc9c31461017a575b600080fd5b34801561009357600080fd5b5061009f60043561019e565b60408051600160a060020a039092168252519081900360200190f35b3480156100c757600080fd5b5061009f6004356101bc565b3480156100df57600080fd5b506100fa600435602435600160a060020a03604435166101d7565b005b34801561010857600080fd5b506100fa60043567ffffffffffffffff6024351661033c565b34801561012d57600080fd5b5061013960043561044d565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561016257600080fd5b506100fa600435600160a060020a0360243516610484565b34801561018657600080fd5b506100fa600435600160a060020a036024351661056f565b600090815260208190526040902060010154600160a060020a031690565b600090815260208190526040902054600160a060020a031690565b60008381526020819052604081205484908390600160a060020a031615806102155750600082815260208190526040902054600160a060020a031633145b806102395750600082815260208190526040902054600160a060020a038281169116145b151561024457600080fd5b604080516020808201899052818301889052825180830384018152606090920192839052815191929182918401908083835b602083106102955780518252601f199092019160209182019101610276565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600160a060020a038b16835293519398508a95508b94507fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e829391829003019150a350506000908152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b600082815260208190526040812054839190600160a060020a031615806103795750600082815260208190526040902054600160a060020a031633145b8061039d5750600082815260208190526040902054600160a060020a038281169116145b15156103a857600080fd5b6040805167ffffffffffffffff85168152905185917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68919081900360200190a25050600091825260208290526040909120600101805467ffffffffffffffff90921674010000000000000000000000000000000000000000027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60009081526020819052604090206001015474010000000000000000000000000000000000000000900467ffffffffffffffff1690565b600082815260208190526040812054839190600160a060020a031615806104c15750600082815260208190526040902054600160a060020a031633145b806104e55750600082815260208190526040902054600160a060020a038281169116145b15156104f057600080fd5b60408051600160a060020a0385168152905185917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0919081900360200190a25050600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b60008281526020819052604090205482908290600160a060020a031615806105ad5750600082815260208190526040902054600160a060020a031633145b806105d15750600082815260208190526040902054600160a060020a038281169116145b15156105dc57600080fd5b60408051600160a060020a0385168152905185917fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266919081900360200190a25050600091825260208290526040909120805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555600a165627a7a72305820",
"swarmHash": "8297e7f6579053ad609b1558f075456841dd8665c4b94b674b670b7bbf68762f",
"gasEstimates": {
"creation": {
"codeDepositCost": "333600",
"executionCost": "20684",
"totalCost": "354284"
},
"external": {
"owner(bytes32)": "634",
"resolver(bytes32)": "618",
"setOwner(bytes32,address)": "23389",
"setResolver(bytes32,address)": "23370",
"setSubnodeOwner(bytes32,bytes32,address)": "infinite",
"setTTL(bytes32,uint64)": "23130",
"ttl(bytes32)": "579"
}
},
"functionHashes": {
"owner(bytes32)": "02571be3",
"resolver(bytes32)": "0178b8bf",
"setOwner(bytes32,address)": "5b0fc9c3",
"setResolver(bytes32,address)": "1896f70a",
"setSubnodeOwner(bytes32,bytes32,address)": "06ab5923",
"setTTL(bytes32,uint64)": "14ab9038",
"ttl(bytes32)": "16a25cbd"
},
"abiDefinition": [
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "resolver",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0x0178b8bf"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0x02571be3"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "label",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setSubnodeOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function",
"signature": "0x06ab5923"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "ttl",
"type": "uint64"
}
],
"name": "setTTL",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function",
"signature": "0x14ab9038"
},
{
"constant": true,
"inputs": [
{
"name": "node",
"type": "bytes32"
}
],
"name": "ttl",
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0x16a25cbd"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "resolver",
"type": "address"
}
],
"name": "setResolver",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function",
"signature": "0x1896f70a"
},
{
"constant": false,
"inputs": [
{
"name": "node",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "setOwner",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function",
"signature": "0x5b0fc9c3"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": true,
"name": "label",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "NewOwner",
"type": "event",
"signature": "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "owner",
"type": "address"
}
],
"name": "Transfer",
"type": "event",
"signature": "0xd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "resolver",
"type": "address"
}
],
"name": "NewResolver",
"type": "event",
"signature": "0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "node",
"type": "bytes32"
},
{
"indexed": false,
"name": "ttl",
"type": "uint64"
}
],
"name": "NewTTL",
"type": "event",
"signature": "0x1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68"
}
],
"filename": "/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/ENSRegistry.sol",
"originalFilename": "/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/ENSRegistry.sol",
"path": "/Users/iurimatias/Projects/Status/embark/test_apps/embark_demo/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/ENSRegistry.sol",
"gas": "auto",
"type": "file",
"_gasLimit": false,
"error": false,
"deploymentAccount": "0x85b15f950a5Fa408b296AC35a47020E7aF70Fc3E",
"realArgs": [],
"address": "0x88D7fD23Fc1c96FF89BeAd9aEb24Ccca96432c63",
"deployedAddress": "0x88D7fD23Fc1c96FF89BeAd9aEb24Ccca96432c63"
}

View File

@ -0,0 +1,79 @@
{
"deploy": true,
"silent": true,
"args": [
"$ENSRegistry",
"0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae"
],
"onDeploy": [
"ENSRegistry.methods.setOwner('0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount}).then(() => {\n ENSRegistry.methods.setResolver('0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae', \"$Resolver\").send({from: web3.eth.defaultAccount});\n var reverseNode = web3.utils.soliditySha3(web3.eth.defaultAccount.toLowerCase().substr(2) + '.addr.reverse');\n ENSRegistry.methods.setResolver(reverseNode, \"$Resolver\").send({from: web3.eth.defaultAccount});\n Resolver.methods.setAddr('0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount});\n Resolver.methods.setName(reverseNode, 'eth').send({from: web3.eth.defaultAccount});\n })"
],
"className": "FIFSRegistrar",
"code": "608060405234801561001057600080fd5b5060405160408061030883398101604052805160209091015160008054600160a060020a031916600160a060020a039093169290921782556001556102ad90819061005b90396000f3006080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663d22057a98114610045575b600080fd5b34801561005157600080fd5b5061007660043573ffffffffffffffffffffffffffffffffffffffff60243516610078565b005b600154604080516020808201939093528082018590528151808203830181526060909101918290528051859360009384939290918291908401908083835b602083106100d55780518252601f1990920191602091820191016100b6565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600080547f02571be300000000000000000000000000000000000000000000000000000000855260048501839052955191995073ffffffffffffffffffffffffffffffffffffffff90951696506302571be3955060248084019592945090928390030190829087803b15801561017157600080fd5b505af1158015610185573d6000803e3d6000fd5b505050506040513d602081101561019b57600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff811615806101d7575073ffffffffffffffffffffffffffffffffffffffff811633145b15156101e257600080fd5b60008054600154604080517f06ab592300000000000000000000000000000000000000000000000000000000815260048101929092526024820189905273ffffffffffffffffffffffffffffffffffffffff888116604484015290519216926306ab59239260648084019382900301818387803b15801561026257600080fd5b505af1158015610276573d6000803e3d6000fd5b5050505050505050505600a165627a7a72305820827735da2a39e060ed9d9eaacc419783f531d66baa0edc09d48311df2146480a0029",
"runtimeBytecode": "6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663d22057a98114610045575b600080fd5b34801561005157600080fd5b5061007660043573ffffffffffffffffffffffffffffffffffffffff60243516610078565b005b600154604080516020808201939093528082018590528151808203830181526060909101918290528051859360009384939290918291908401908083835b602083106100d55780518252601f1990920191602091820191016100b6565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600080547f02571be300000000000000000000000000000000000000000000000000000000855260048501839052955191995073ffffffffffffffffffffffffffffffffffffffff90951696506302571be3955060248084019592945090928390030190829087803b15801561017157600080fd5b505af1158015610185573d6000803e3d6000fd5b505050506040513d602081101561019b57600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff811615806101d7575073ffffffffffffffffffffffffffffffffffffffff811633145b15156101e257600080fd5b60008054600154604080517f06ab592300000000000000000000000000000000000000000000000000000000815260048101929092526024820189905273ffffffffffffffffffffffffffffffffffffffff888116604484015290519216926306ab59239260648084019382900301818387803b15801561026257600080fd5b505af1158015610276573d6000803e3d6000fd5b5050505050505050505600a165627a7a72305820827735da2a39e060ed9d9eaacc419783f531d66baa0edc09d48311df2146480a0029",
"realRuntimeBytecode": "6080604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663d22057a98114610045575b600080fd5b34801561005157600080fd5b5061007660043573ffffffffffffffffffffffffffffffffffffffff60243516610078565b005b600154604080516020808201939093528082018590528151808203830181526060909101918290528051859360009384939290918291908401908083835b602083106100d55780518252601f1990920191602091820191016100b6565b51815160209384036101000a600019018019909216911617905260408051929094018290038220600080547f02571be300000000000000000000000000000000000000000000000000000000855260048501839052955191995073ffffffffffffffffffffffffffffffffffffffff90951696506302571be3955060248084019592945090928390030190829087803b15801561017157600080fd5b505af1158015610185573d6000803e3d6000fd5b505050506040513d602081101561019b57600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff811615806101d7575073ffffffffffffffffffffffffffffffffffffffff811633145b15156101e257600080fd5b60008054600154604080517f06ab592300000000000000000000000000000000000000000000000000000000815260048101929092526024820189905273ffffffffffffffffffffffffffffffffffffffff888116604484015290519216926306ab59239260648084019382900301818387803b15801561026257600080fd5b505af1158015610276573d6000803e3d6000fd5b5050505050505050505600a165627a7a72305820",
"swarmHash": "827735da2a39e060ed9d9eaacc419783f531d66baa0edc09d48311df2146480a",
"gasEstimates": {
"creation": {
"codeDepositCost": "137000",
"executionCost": "40632",
"totalCost": "177632"
},
"external": {
"register(bytes32,address)": "infinite"
}
},
"functionHashes": {
"register(bytes32,address)": "d22057a9"
},
"abiDefinition": [
{
"constant": false,
"inputs": [
{
"name": "subnode",
"type": "bytes32"
},
{
"name": "owner",
"type": "address"
}
],
"name": "register",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function",
"signature": "0xd22057a9"
},
{
"inputs": [
{
"name": "ensAddr",
"type": "address"
},
{
"name": "node",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"filename": "/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/FIFSRegistrar.sol",
"originalFilename": "/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/FIFSRegistrar.sol",
"path": "/Users/iurimatias/Projects/Status/embark/test_apps/embark_demo/Users/iurimatias/Projects/Status/embark/lib/modules/ens/contracts/FIFSRegistrar.sol",
"gas": "auto",
"type": "file",
"_gasLimit": false,
"error": false,
"deploymentAccount": "0x85b15f950a5Fa408b296AC35a47020E7aF70Fc3E",
"realArgs": [
"0x88D7fD23Fc1c96FF89BeAd9aEb24Ccca96432c63",
"0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae"
],
"address": "0x8fcDa55C6F48A9c591eA5227837dA30B9560Ed33",
"deployedAddress": "0x8fcDa55C6F48A9c591eA5227837dA30B9560Ed33"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,100 @@
{
"fromIndex": 0,
"args": [
100
],
"className": "SimpleStorage",
"code": "608060405234801561001057600080fd5b50604051602080610153833981016040525160005560018054600160a060020a0319163317905561010d806100466000396000f30060806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960db565b60005481565b600081905560015473ffffffffffffffffffffffffffffffffffffffff1633141560d357600080fd5b600201600055565b600054905600a165627a7a723058200e2cd254e3243a086368a248695b8b3d53801d2b7776f68691190229dea7ca8b0029",
"runtimeBytecode": "60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960db565b60005481565b600081905560015473ffffffffffffffffffffffffffffffffffffffff1633141560d357600080fd5b600201600055565b600054905600a165627a7a723058200e2cd254e3243a086368a248695b8b3d53801d2b7776f68691190229dea7ca8b0029",
"realRuntimeBytecode": "60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960db565b60005481565b600081905560015473ffffffffffffffffffffffffffffffffffffffff1633141560d357600080fd5b600201600055565b600054905600a165627a7a72305820",
"swarmHash": "0e2cd254e3243a086368a248695b8b3d53801d2b7776f68691190229dea7ca8b",
"gasEstimates": {
"creation": {
"codeDepositCost": "53800",
"executionCost": "40439",
"totalCost": "94239"
},
"external": {
"get()": "428",
"set(uint256)": "40407",
"storedData()": "384"
}
},
"functionHashes": {
"get()": "6d4ce63c",
"set(uint256)": "60fe47b1",
"storedData()": "2a1afcd9"
},
"abiDefinition": [
{
"constant": true,
"inputs": [],
"name": "storedData",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0x2a1afcd9"
},
{
"constant": false,
"inputs": [
{
"name": "x",
"type": "uint256"
}
],
"name": "set",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function",
"signature": "0x60fe47b1"
},
{
"constant": true,
"inputs": [],
"name": "get",
"outputs": [
{
"name": "retVal",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function",
"signature": "0x6d4ce63c"
},
{
"inputs": [
{
"name": "initialValue",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"filename": "simple_storage.sol",
"originalFilename": "contracts/simple_storage.sol",
"path": "/Users/iurimatias/Projects/Status/embark/test_apps/embark_demo/contracts/simple_storage.sol",
"gas": "auto",
"type": "file",
"deploy": true,
"_gasLimit": false,
"error": false,
"deploymentAccount": "0x85b15f950a5Fa408b296AC35a47020E7aF70Fc3E",
"realArgs": [
100
],
"address": "0x74A18cBcd27e4652cD3FE852C5362432056E6480",
"deployedAddress": "0x74A18cBcd27e4652cD3FE852C5362432056E6480"
}

12
test_apps/embark_demo/dist/index.html vendored Normal file
View File

@ -0,0 +1,12 @@
<html>
<head>
<title>Embark - SimpleStorage Demo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body class="container">
<div id="app">
</div>
<script src="js/dapp.js"></script>
</body>
</html>

229965
test_apps/embark_demo/dist/js/dapp.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
const Haml = require('haml');
module.exports = function (embark) {
embark.registerServiceCheck('PluginService', function (cb) {
cb({name: "ServiceName", status: "on"});
});
// embark.registerServiceCheck('PluginService', function (cb) {
// cb({name: "ServiceName", status: "on"});
// });
embark.registerPipeline((embark.pluginConfig.files || ['**/*.haml']), function (opts) {
return Haml.render(opts.source);