mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 21:45:55 +00:00
wip
This commit is contained in:
@@ -115,12 +115,13 @@ class Factory
|
|||||||
protected function addRoutes()
|
protected function addRoutes()
|
||||||
{
|
{
|
||||||
$this->router->get('/', DashboardController::class);
|
$this->router->get('/', DashboardController::class);
|
||||||
$this->router->post('/tunnel', CreateTunnelController::class);
|
|
||||||
$this->router->get('/logs', LogController::class);
|
$this->router->post('/api/tunnel', CreateTunnelController::class);
|
||||||
$this->router->post('/logs', PushLogsToDashboardController::class);
|
$this->router->get('/api/logs', LogController::class);
|
||||||
$this->router->get('/replay/{log}', ReplayLogController::class);
|
$this->router->post('/api/logs', PushLogsToDashboardController::class);
|
||||||
$this->router->post('/logs/{request_id}/data', AttachDataToLogController::class);
|
$this->router->get('/api/replay/{log}', ReplayLogController::class);
|
||||||
$this->router->get('/logs/clear', ClearLogsController::class);
|
$this->router->post('/api/logs/{request_id}/data', AttachDataToLogController::class);
|
||||||
|
$this->router->get('/api/logs/clear', ClearLogsController::class);
|
||||||
|
|
||||||
$this->app->route('/socket', new WsServer(new Socket()), ['*']);
|
$this->app->route('/socket', new WsServer(new Socket()), ['*']);
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class RequestLogger
|
|||||||
$this
|
$this
|
||||||
->client
|
->client
|
||||||
->post(
|
->post(
|
||||||
'http://127.0.0.1:4040/logs',
|
'http://127.0.0.1:4040/api/logs',
|
||||||
['Content-Type' => 'application/json'],
|
['Content-Type' => 'application/json'],
|
||||||
json_encode($this->getData(), JSON_INVALID_UTF8_IGNORE)
|
json_encode($this->getData(), JSON_INVALID_UTF8_IGNORE)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -407,7 +407,7 @@
|
|||||||
this.activeTab = tab;
|
this.activeTab = tab;
|
||||||
},
|
},
|
||||||
clearLogs: function() {
|
clearLogs: function() {
|
||||||
fetch('/logs/clear');
|
fetch('/api/logs/clear');
|
||||||
this.currentLog = null;
|
this.currentLog = null;
|
||||||
},
|
},
|
||||||
setLog: function (log) {
|
setLog: function (log) {
|
||||||
@@ -421,7 +421,7 @@
|
|||||||
this.view = view;
|
this.view = view;
|
||||||
},
|
},
|
||||||
replay: function (log) {
|
replay: function (log) {
|
||||||
fetch('/replay/' + log.id);
|
fetch('/api/replay/' + log.id);
|
||||||
},
|
},
|
||||||
connect: function () {
|
connect: function () {
|
||||||
let conn = new ReconnectingWebSocket(`ws://${window.location.hostname}:${window.location.port}/socket`);
|
let conn = new ReconnectingWebSocket(`ws://${window.location.hostname}:${window.location.port}/socket`);
|
||||||
@@ -431,7 +431,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
loadLogs: function (log) {
|
loadLogs: function (log) {
|
||||||
fetch('/logs')
|
fetch('/api/logs')
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user