Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
e5b5e7d2
Commit
e5b5e7d2
authored
Jun 30, 2017
by
Pieterjan Vanhoof
Committed by
GitHub
Jun 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #126 from bokobza/master
added shutdown command for the full node to the UI's unload event
parents
9a583b2a
26c9fc2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
main.ts
Breeze.UI/main.ts
+16
-0
api.service.ts
Breeze.UI/src/app/shared/services/api.service.ts
+6
-0
No files found.
Breeze.UI/main.ts
View file @
e5b5e7d2
...
...
@@ -48,7 +48,23 @@ function createWindow() {
// when you should delete the corresponding element.
mainWindow
=
null
;
});
// Emitted when the window is going to close.
mainWindow
.
on
(
'close'
,
function
()
{
var
http
=
require
(
'http'
);
const
options
=
{
hostname
:
'localhost'
,
port
:
5000
,
path
:
'/api/node/shutdown'
,
method
:
'POST'
};
const
req
=
http
.
request
(
options
,
(
res
)
=>
{});
req
.
write
(
''
);
req
.
end
();
});
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
...
...
Breeze.UI/src/app/shared/services/api.service.ts
View file @
e5b5e7d2
...
...
@@ -132,4 +132,10 @@ export class ApiService {
.
post
(
this
.
webApiUrl
+
'/wallet/send-transaction/'
,
JSON
.
stringify
(
data
),
{
headers
:
this
.
headers
})
.
map
((
response
:
Response
)
=>
response
);
}
shutdownNode
():
Observable
<
any
>
{
return
this
.
http
.
post
(
this
.
webApiUrl
+
'/node/shutdown'
,
''
)
.
map
((
response
:
Response
)
=>
response
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment