Commit Graph

327 Commits

Author SHA1 Message Date
Anthony Laibe 4b2715421d
Adding tab to contract view 2018-10-23 10:59:15 +02:00
Pascal Precht df3bce145d
refactor(components/Ens): move ENS components to Utilities 2018-10-23 10:58:35 +02:00
Anthony Laibe 18320573d0
Update preview double load 2018-10-23 10:58:34 +02:00
Anthony Laibe cb4a1e1073
Fix height of flex 2018-10-23 10:58:34 +02:00
Pascal Precht 0e4cb11ab6
refactor(components/Communications): move component to Utilities 2018-10-23 10:58:34 +02:00
Anthony Laibe 9aac039e7e
Adding selector 2018-10-23 10:58:34 +02:00
Anthony Laibe a61f499abb
Fix embark logs guard 2018-10-23 10:58:34 +02:00
Pascal Precht 2d0dfdf6be
uiux(embark-ui/HomeContainer): show state of connected processes 2018-10-23 10:58:34 +02:00
Anthony Laibe de009db74f
Use process log ids 2018-10-23 10:57:05 +02:00
emizzle 5d29ab1d42
Minor PR comments
Removed a null check and intialised `this.context` to an empty object.
2018-10-23 10:57:05 +02:00
emizzle 46511bcfe8
Rebase updates
After the code was rebased, there were some additional changes for getting websockets logs that needed to be catered for.

When there is a call to get all logs for a process, the state entity is updated with a new array item containing all the logs (this is then reduced and selected for rendering). In the case of a websocket log that simply returns only one log item, the latest full log for the process is found in the state entities, and it’s logs are appending to with the data from the websocket.

Additionally, log limits were updated to be passed in as a parameter to the API calls from the frontend. Parameter validation (for `limit`) was also added in this commit.
2018-10-23 10:57:04 +02:00
emizzle d4d7e3b8ac
Addressed PR comments
*Console.js*
- Moved `DEFAULT_PROCESS` const to outside of the `Console` class (but inside the module).
- Removed `(` and `)` from `.filter` in `getProcessLogs()`.
- Updated comments

*logger.js*
- Moved `dateFormat` and `logRegex` to constants outside of `Logger` class
- Moved the `parseLogFile` method inside of the `Logger` class (ES6 style)
- Added a log limit to the `parseLogFile` method
- Added the log path to the constants file and used inside of `Logger`

*cmd_controller.js*
- Defaulted `this.context` to `[constants.context.any]` in the constructor.
- Changed `’embark’` to split modules`coreProcess` and `loggerApi`.

*engine.js*
- Changed `’embark’` to split modules`coreProcess` and `loggerApi`.
2018-10-23 10:57:04 +02:00
emizzle 0fa1e11ac7
Fixed issue with compounding duplicated logs
On every load of the component, the API request would fetch the entire log history, and effective append it to the list of process logs, so that if a component was loaded multiple times (ie click to different tab, then back to home), the log would be duplicated.

This was solved by timestamping and labelling each fetch response, then getting the latest response in the selector, and filtering by process name in the component.
2018-10-23 10:53:25 +02:00
emizzle 7de72cb474
Addressed PR feedback
- Created an “embark” module so that an “embark” process could be registered in the correct way. This service is only used on `embark run` (can be extended to other commands if needed).

- extracted “embark” to a const `DEFAULT_PROCESS` param in the `Console` component.

- extracted commands result rendering to it’s own function to keep the `renderTabs` function from getting cluttered

- Added sorting of logs by timestamp

- Added milliseconds to the log file data (which helps in sorting log messages).
2018-10-23 10:53:25 +02:00
emizzle 42cc9b559f
Fills embark logs tabs with existing embark logs
A logfile is now generated by default, in the format `.embark/embark-log__YYYY-MM-DD_HH-mm-ss.log`.

When the home tab is loaded, the process logs are fetched for all the processes. The list of processes returned now includes `embark`, and when `/embark-api/process-logs/embark` is fetched, the logFile is parsed and an array of log messages are returned.
2018-10-23 10:52:26 +02:00
Anthony Laibe 41eb23df82
Adding file contracts 2018-10-23 10:51:24 +02:00
Anthony Laibe ea9939c03a
WIP: style fiddle 2018-10-23 10:51:24 +02:00
Anthony Laibe 41176f0f70
Add id to process logs 2018-10-23 10:50:41 +02:00
Pascal Precht daf1d7269d
refactor: rename Unauthenticated to Login
This also removes the previously introduced `LoginLayout` component as
chances are very low that we'll need the layout for anything else then the
login.
2018-10-23 10:50:41 +02:00
Pascal Precht 0baf0526b1
feat(containers/AppContainers): make use of new LoginLayout 2018-10-23 10:50:40 +02:00
Pascal Precht c1b9760502
refactor(components/Unauthenticated): use CoreUI instead of Tabler 2018-10-23 10:50:40 +02:00
Pascal Precht cef60b56e8
feat(components/LoginLayout): introduce new layout for login view 2018-10-23 10:50:40 +02:00
Anthony Laibe ef2a88336b
Fix warning about nested button tag 2018-10-23 10:50:40 +02:00
Anthony Laibe f5ac131d93
Add new theme to utils 2018-10-23 10:50:40 +02:00
Anthony Laibe 5967aa3dc5
Initial version of deployment manager 2018-10-23 10:50:39 +02:00
emizzle 35a701fb90
Addressed PR comments
Updated comments in `FileExplorer.js`

Moved `isFolder()`, `isNotFolder()`, and `byName()` outside of `fileTreeSort()` in `lib/pipeline/pipeline.js`.
2018-10-23 10:50:39 +02:00
emizzle 895c0d86ac
Finish adding show/hide of hidden files
Hidden files/folders (those beginning with “.”) are now hidden and shown depending on the state of the toggle.
2018-10-23 10:50:39 +02:00
emizzle f3431eecbd
File editor tree improvements
Sort files and folders by type, then by name

Hide hidden files/folders (starting with “.”) - WIP
2018-10-23 10:50:39 +02:00
Anthony Laibe 0e872c99e6
Update layout with new theme 2018-10-23 10:50:38 +02:00
Anthony Laibe 36602c30b6
Limit the number of commands/logs we keep 2018-10-23 10:50:38 +02:00
Anthony Laibe 0e4248cca8
Stop and limit fetch process logs 2018-10-23 10:50:38 +02:00
Anthony Laibe ca55a8091e
Only store ether value 2018-10-23 10:50:38 +02:00
Anthony Laibe c475244fb6
Save to when navigating 2018-10-23 10:50:38 +02:00
Anthony Laibe 1a0eb829e8
Keep ether conversion in state 2018-10-23 10:50:38 +02:00
Iuri Matias 771953e8b5
remove versions from dashboard which isn't necessary 2018-10-23 10:50:37 +02:00
Anthony Laibe fe51abc2bb
Eject react-scripts and implement our own
react-monaco-editor
2018-10-23 10:50:03 +02:00
Anthony Laibe 52a5f5dc71
Stop gas oracle 2018-10-23 10:50:03 +02:00
Anthony Laibe d6b348a869
Disable websocket and limit the number of record 2018-10-23 10:50:03 +02:00
Pascal Precht 479aafd076
feat(utils/converter): introduce copy-to-clipboard buttons
This commit enables users to easily copy values from the converter's inputs to the clipboard.
2018-10-23 10:50:02 +02:00
Jonathan Rainville 844e2ed5b0
add back tokens 2018-10-23 10:48:36 +02:00
Andre Medeiros a288afbf68
Address feedback 2018-10-23 10:48:36 +02:00
Jonathan Rainville e9ec0c019d
fix same key 2018-10-23 10:47:26 +02:00
Jonathan Rainville 5fcd1e679d
fix error with JSONTree empty at start 2018-10-23 10:47:26 +02:00
Andre Medeiros 777b0ff1e5
Use properties where it makes sense 2018-10-23 10:47:26 +02:00
Andre Medeiros 31cfc7bdeb
Move from props to state 2018-10-23 10:47:26 +02:00
Andre Medeiros 3339d27ee7
Add code reload component 2018-10-23 10:47:25 +02:00
Jonathan Rainville 1a20b7b9ae
replace reduce by a map to fix case where array is empty 2018-10-23 10:47:25 +02:00
Anthony Laibe 921c99b201
Improve feeling when switching tab 2018-10-23 10:47:25 +02:00
Anthony Laibe c52c0abb77
Allow to customize host 2018-10-23 10:47:25 +02:00
Anthony Laibe 801514c52b
Use tree view for abi display 2018-10-23 10:47:24 +02:00
Anthony Laibe 68deca9fea
Add bytecode and abi to contract overview 2018-10-23 10:47:24 +02:00
Anthony Laibe c4635dd6bd
Remove JSON as supported language
It seems to break the theme setting.
An issue has been opened
2018-10-23 10:47:24 +02:00
Anthony Laibe 572cd20482
Fix backend tab request cached:
- Add no cache via helmet
- Fix linting (no-return-else)
- Rebase Fix: Use option.name for process log to avoid endpoint being called
blockchainProcess.js
- Rebase Fix: use option when compiling solidity
2018-10-23 10:47:24 +02:00
Anthony Laibe 0d3dd56a86
Extract DEFAULT_LANGUAGE 2018-10-23 10:42:01 +02:00
Anthony Laibe 626be3882b
Use supported languages 2018-10-23 10:42:01 +02:00
Anthony Laibe 0e49165967
Add monaco editor 2018-10-23 10:42:01 +02:00
Pascal Precht 23bd9ce004
Introduce proof of concept utils tab with ether converter 2018-10-23 10:42:01 +02:00
Anthony Laibe 0c7e934269
Fix npm run build
In order to fix this issue:
https://github.com/facebook/create-react-app/issues/3734

Switch from 'query-string' to 'qs'
2018-10-23 10:42:01 +02:00
Anthony Laibe 2fb5d907ec
Add ability to logout 2018-10-23 10:42:00 +02:00
Jonathan Rainville 86b2dcc2da
call getProcesses in componentDidMount 2018-10-23 10:42:00 +02:00
Jonathan Rainville 8a4e1063a7
add simple component for authError 2018-10-23 10:42:00 +02:00
Jonathan Rainville e2b3dcf629
use redux instead of directly localStorage 2018-10-23 10:42:00 +02:00
Jonathan Rainville 2f19568959
rename authenticate to authorize 2018-10-23 10:41:59 +02:00
Jonathan Rainville 89cbbeec27
generalize request function 2018-10-23 10:41:59 +02:00
Jonathan Rainville 3495f9fbb8
authorize each request through header 2018-10-23 10:41:59 +02:00
Jonathan Rainville f1f258b8f9
same for destroy 2018-10-23 10:41:23 +02:00
Jonathan Rainville ae4c16a47a
make get send errors too 2018-10-23 10:41:23 +02:00
Jonathan Rainville 6125329cae
show authorize form when auth error 2018-10-23 10:41:23 +02:00
Jonathan Rainville faf09b7d39
use local cache to store the token 2018-10-23 10:41:23 +02:00
Jonathan Rainville c6c4dead5d
get route info from AppContainer 2018-10-23 10:41:22 +02:00
Jonathan Rainville 422a98e172
add basic authentication 2018-10-23 10:41:22 +02:00
Jonathan Rainville 46e647bba4
add autoscroll package json 2018-10-23 10:41:22 +02:00
Jonathan Rainville b196a54a30
fix linting 2018-10-23 10:41:22 +02:00
Jonathan Rainville 0bdcb1f41b
add deep-equal to process update 2018-10-23 10:41:22 +02:00
Jonathan Rainville 2ca33e221d
remove old process things 2018-10-23 10:41:22 +02:00
Jonathan Rainville af21dcc910
only show footer when embark tab 2018-10-23 10:41:21 +02:00
Jonathan Rainville b34a9e5e63
fetch all processes 2018-10-23 10:41:21 +02:00
Jonathan Rainville 39a0fae69a
basic implementation of tabs for process logs 2018-10-23 10:41:21 +02:00
Jonathan Rainville 77117c0a76
add autoscroll and limit height 2018-10-23 10:41:21 +02:00
Jonathan Rainville 0df3a84227
caapitalize header correctly 2018-10-23 10:41:21 +02:00
Jonathan Rainville 426f71fd98
convert ansi colors to spans 2018-10-23 10:41:21 +02:00
Iuri Matias 1e721fa4f6
display icons depending on the state of the process 2018-10-23 10:41:20 +02:00
Jonathan Rainville 7a4f1180cf
add noLoading flag in action to not show loader 2018-10-23 10:41:20 +02:00
Jonathan Rainville 7fa186b636
fix avergae not calculated correctly 2018-10-23 10:41:20 +02:00
Anthony Laibe 592ce4773c
Deploy contract 2018-10-23 10:41:20 +02:00
Anthony Laibe a08690ef43
File Editor 2018-10-23 10:41:20 +02:00
Jonathan Rainville 5b16ce0691
add package lock 2018-10-23 10:40:14 +02:00
Jonathan Rainville ccdab1bb90
add gas station container 2018-10-23 10:40:13 +02:00
Jonathan Rainville 5593534343
conflict in reducer 2018-10-23 10:40:13 +02:00
Jonathan Rainville 486c839cd3
filter values 2018-10-23 10:40:13 +02:00
Jonathan Rainville 5690c2e054
conflict in saga 2018-10-23 10:40:13 +02:00
Jonathan Rainville 9d262e6a25
watch oracle changes 2018-10-23 10:40:13 +02:00
Jonathan Rainville 198b3c5cc1
conflicts in reducer and saga 2018-10-23 10:39:57 +02:00
Jonathan Rainville 636431d338
add gas station to Contract functions 2018-10-23 10:38:12 +02:00
Jonathan Rainville 8ff13b09f1
add gasPrice to transactions for contracts 2018-10-23 10:38:12 +02:00
Jonathan Rainville 452cb3a580
copy to clipboard gasPrice 2018-10-23 10:38:12 +02:00
Jonathan Rainville 36bfc74c58
fix firefox and ie 2018-10-23 10:38:12 +02:00
Jonathan Rainville 54c089583c
conflict in css 2018-10-23 10:38:12 +02:00
Jonathan Rainville 77258f8636
add gas station component 2018-10-23 10:38:12 +02:00
Jonathan Rainville 7080be9fb1
conflicts in action and saga 2018-10-23 10:38:11 +02:00
Anthony Laibe b945b87d4d
File explorer 2018-10-23 10:38:11 +02:00
Anthony Laibe 18253886fb
Fix order of command 2018-10-23 10:37:28 +02:00
Anthony Laibe 2d847b9e7c
Adding overflow to console 2018-10-23 10:37:28 +02:00
emizzle c5105dd6e4
Hide deploy button when not successfully compiled
Bug that cropped up in the refactor. Deploy button was showing if there warnings, but no errors. Have changed this to only show the deploy button if there is a compilation result (returned from the api) instead.
2018-10-23 10:37:00 +02:00
emizzle 6207023bec
Refactor logic to FiddleContainer
Refactored fiddle logic to be contained in the `FiddleContainer` and the components as purely presentational.

Added scroll from summary to errors/warnings/fatal/deployed cards.

Added fatal error support (ie network error in api)

Removed `lodash`
2018-10-23 10:37:00 +02:00
emizzle 05b324dffe
Fiddle use cases fixed
Handle use cases:

1) handle case when temp.sol doesn’t exist - due to the new saga updates, the response from retreiving a temp fiddle from the filesystem (even if it doesn’t exist) is forward to the compilation endpoint, which returns an ENOENT, and this is handled in the selector.
2) delete all code - shouldn’t return last fiddle and should compile an empty string.
3) Switch to different tab (ie contracts) then back to fiddle - previous fiddle should remain.

Also fixed an issue (most likely due to latest rebase) when deploying fiddle contracts. The gasLimit was not being specified.

Handled issue where entities stored in the state were not being put in the correct order, so a timestamp was sent with the requests and then sorted when the response was returned.
2018-10-23 10:37:00 +02:00
Anthony Laibe 4ecb092ed3
Remove last fiddle, and use code to compile 2018-10-23 10:37:00 +02:00
emizzle cd176a5f95
Handle use cases that were failing
1) hanlde case when temp.sol doesn’t exist
2) delete all code - shouldn’t return last fiddle
3) Switch to different tab (ie contracts) then back to fiddle - fiddle should now remain.
2018-10-23 10:37:00 +02:00
emizzle 38032e1ef2
Fix bug with deleting all code 2018-10-23 10:36:59 +02:00
emizzle e027ae258a
Hide deployment section in UI for fiddle contracts 2018-10-23 10:36:59 +02:00
emizzle b8b98cd6c4
Remove ‘async’ from function name and remove comments 2018-10-23 10:36:59 +02:00
emizzle cba4e9fb91
Fiddle file stored in filesystem
Fiddles are now stored in the filesystem so they can be preserved across page reloads, but also so that contracts deployed via fiddles can have their source code shown.

Fiddles deployed as contracts now fully work with existing contract list UI and functionality. Fiddle deployed contracts are listed in a separate section in the UI.

Current limitation is that only single contracts per file are supported. If the fiddle contains multiple contracts, it’s currently not supported.
2018-10-23 10:36:59 +02:00
emizzle 59d3a3be83
Fiddle deploy integration
Fiddle is properly deploying now, except the source code needs to be saved to the filesystem in order to be recalled later.

Fixes for handling errors on deploy and compilation.

Update contract state UI for determining state / interface / deployed.
2018-10-23 10:36:58 +02:00
emizzle 609d4eb762
Fix Tabler browser errors
Fixed browser errors caused by tabler (bodyItems and headerItems complaints) as well as staticContext issues caused by using withRoute(NavLink)

Also added a response to fiddler deployment.

Added loading states to fiddler results, that shows the errors/warnings as having a loading state when compiling/deploying
2018-10-23 10:36:58 +02:00
emizzle 3870f6d316
finish removing loading entities 2018-10-23 10:36:58 +02:00
emizzle b9041d1434
Removed loadingEntities and added to FiddleContainer 2018-10-23 10:36:58 +02:00
emizzle 83326bfd98
loading entity work 2018-10-23 10:36:58 +02:00
emizzle e53152624f
Start with reducer/selector for loading entity 2018-10-23 10:36:58 +02:00
emizzle 4d195657dd
Added loading entities
Moved functionality out of FiddleDeployButton component

Added loading entities (WIP) to separate loading messages
2018-10-23 10:36:57 +02:00
emizzle fec740ad6f
Initial commit for deployment of fiddle
API call set up for contract deploy which deploys the contract(s) sent from the fiddle.

Frontend UI button calls API to deploy the fiddle code.
2018-10-23 10:36:57 +02:00
Anthony Laibe 6038da4339
Deploy contract 2018-10-23 10:34:18 +02:00
Anthony Laibe 870efbcf20
Show result 2018-10-23 10:34:18 +02:00
Anthony Laibe 3c9cea594c
Make call successfully 2018-10-23 10:34:17 +02:00
Anthony Laibe c234a850e3
Call Function API 2018-10-23 10:34:17 +02:00
Anthony Laibe cdc7c107a6
Show functions 2018-10-23 10:34:17 +02:00
Anthony Laibe f3bef0c3a6
Show sources 2018-10-23 10:34:17 +02:00
Anthony Laibe 788db99a0e
Display error + lint 2018-10-23 10:34:02 +02:00
Anthony Laibe 8cd3ccd5af
Fix naming 2018-10-23 10:33:41 +02:00
Anthony Laibe a2b7ee962c
Rever fiddle order 2018-10-23 10:33:27 +02:00
Anthony Laibe c01f836391
Fix typo 2018-10-23 10:33:26 +02:00
Anthony Laibe e1043bf5f5
Use subdomain 2018-10-23 10:33:26 +02:00
Anthony Laibe 9e7d7bbee2
Misc fixes after rebase 2018-10-23 10:33:07 +02:00
Anthony Laibe 3bb15194ea
Lint 2018-10-23 10:33:07 +02:00
Anthony Laibe 8deae7209e
Register and resolve 2018-10-23 10:33:07 +02:00
Anthony Laibe 0f7a30f530
Show ENS records 2018-10-23 10:33:06 +02:00
Anthony Laibe b6156e7632
Add actions/api/reducers/sagas 2018-10-23 10:32:42 +02:00
Anthony Laibe 83d6130259
Add plugins and versions to backend tab 2018-10-23 10:32:02 +02:00
emizzle 950f285d2e
Fix react ‘key’ error 2018-10-23 10:31:36 +02:00
emizzle dba61ed382
Make linter happy 2018-10-23 10:31:36 +02:00
emizzle 6f8f9a14d9
Addressed PR comments
Changed `fiddle` to an entity and removed unneeded fiddle reducer.

Added a selector for getting the entity.

Changed fiddle saga to `doRequest`.

Changed fiddle api call to the `post` method (did not see beofre the rebase).

Added `CompilerError` presentation component to handle displaying compiler errors and warnings.

Added spaces to css (as requested).

Removed extra space after function in solidity compiler (as requested).

Removed the compile contract event from the solidity compiler (as requested).

Handling of fatal api error in the UI.

Changed fiddle action to the one created with `createRequestTypes`.

Moved `Fiddle` nav tab before `Documentation`.

Changed `FiddleResults` DOM manipulation to be controlled via React state instead.
2018-10-23 10:31:36 +02:00
emizzle 4f2b838526
add page title class 2018-10-23 10:31:35 +02:00
emizzle 32575437cd
Remove comments and spaces 2018-10-23 10:31:35 +02:00
emizzle 8e3e3129c5
Fix rebase 2018-10-23 10:31:35 +02:00
emizzle 8caa478968
Annotations, click to error, UI improvements
Compiler annotations added to editor gutter for errors and warnings

Clicking an error now scrolls editor to offending line and scrolls page to the top of the editor

Added Compiling… loader.
2018-10-23 10:31:35 +02:00
emizzle 70f5a09d47
Fiddle now showing compilation warnings and errors 2018-10-23 10:31:35 +02:00
Anthony Laibe 52cec0a29e
Display compilation result 2018-10-23 10:31:35 +02:00
emizzle 1d13c71d83
Code compilation API working, but not updating state 2018-10-23 10:31:34 +02:00
emizzle ddcccb3c2d
Initial compile API and Fiddle container/pres components 2018-10-23 10:31:34 +02:00
emizzle 12faeb7866
Swapped editor to Ace 2018-10-23 10:31:34 +02:00
emizzle 518111132b
Added monaco editor via react-monaco-editor
Needs to pull version from package.json
2018-10-23 10:31:34 +02:00