mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-21 23:12:06 +01:00
fix issue with design on n8n page
This commit is contained in:
@@ -491,7 +491,8 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
|
||||
summaryMessage += "<li>n8n port found (" + diagnostics.n8n_port + "): <span style='color:green'>✓</span></li>";
|
||||
} else {
|
||||
summaryMessage += "<li>n8n port (5678) not mapped: <span style='color:red'>✗</span></li>";
|
||||
summaryMessage += "<li>Available ports: <pre>" + JSON.stringify(diagnostics.port_mappings, null, 2) + "</pre></li>";
|
||||
var portMappingsString = JSON.stringify(diagnostics.port_mappings, null, 2);
|
||||
summaryMessage += "<li>Available ports: <pre>" + portMappingsString + "</pre></li>";
|
||||
}
|
||||
|
||||
if (diagnostics.container_running && diagnostics.n8n_port_found) {
|
||||
@@ -1156,18 +1157,23 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
|
||||
$scope.cyberpanelLoading = true;
|
||||
$('#cyberpanelLoading').hide();
|
||||
|
||||
// Simulate response
|
||||
// Sample response data
|
||||
var headers = {
|
||||
'content-type': 'application/json',
|
||||
'server': 'n8n'
|
||||
};
|
||||
|
||||
var body = {
|
||||
success: true,
|
||||
executionId: '123456789'
|
||||
};
|
||||
|
||||
// Simulate response with pre-stringified JSON
|
||||
container.webhookTools.testResult = {
|
||||
status: 200,
|
||||
statusText: 'OK',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'server': 'n8n'
|
||||
},
|
||||
body: {
|
||||
success: true,
|
||||
executionId: '123456789'
|
||||
}
|
||||
headers: JSON.stringify(headers, null, 2),
|
||||
body: JSON.stringify(body, null, 2)
|
||||
};
|
||||
|
||||
new PNotify({
|
||||
@@ -1546,4 +1552,23 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
|
||||
|
||||
// Add location service to the controller for the n8n URL
|
||||
$scope.location = window.location;
|
||||
|
||||
// Function to view execution data details
|
||||
$scope.viewExecutionData = function(execution) {
|
||||
// Pre-stringify JSON data for template
|
||||
$scope.selectedExecution = {
|
||||
id: execution.id,
|
||||
status: execution.status,
|
||||
startedAt: execution.startedAt,
|
||||
duration: execution.duration,
|
||||
mode: execution.mode,
|
||||
inputData: JSON.stringify(execution.inputData || {}, null, 2),
|
||||
outputData: JSON.stringify(execution.outputData || {}, null, 2),
|
||||
error: execution.error
|
||||
};
|
||||
|
||||
if ($scope.selectedExecution.error && $scope.selectedExecution.error.stack) {
|
||||
$scope.selectedExecution.error.stack = $scope.selectedExecution.error.stack.replace(/\\n/g, '\n');
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -1300,11 +1300,11 @@
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label>Response Headers</label>
|
||||
<pre class="bg-light p-3">{{JSON.stringify(web.webhookTools.testResult.headers, null, 2)}}</pre>
|
||||
<pre class="bg-light p-3">{$ web.webhookTools.testResult.headers $}</pre>
|
||||
</div>
|
||||
<div>
|
||||
<label>Response Body</label>
|
||||
<pre class="bg-light p-3">{{JSON.stringify(web.webhookTools.testResult.body, null, 2)}}</pre>
|
||||
<pre class="bg-light p-3">{$ web.webhookTools.testResult.body $}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1717,10 +1717,10 @@
|
||||
|
||||
<div class="tab-content mt-3">
|
||||
<div id="input" class="tab-pane fade in active">
|
||||
<pre class="bg-light p-3">{{JSON.stringify(selectedExecution.inputData, null, 2)}}</pre>
|
||||
<pre class="bg-light p-3">{$ selectedExecution.inputData $}</pre>
|
||||
</div>
|
||||
<div id="output" class="tab-pane fade">
|
||||
<pre class="bg-light p-3">{{JSON.stringify(selectedExecution.outputData, null, 2)}}</pre>
|
||||
<pre class="bg-light p-3">{$ selectedExecution.outputData $}</pre>
|
||||
</div>
|
||||
<div id="error" class="tab-pane fade" ng-if="selectedExecution.error">
|
||||
<div class="alert alert-danger">
|
||||
@@ -1972,7 +1972,7 @@
|
||||
<h5 class="card-title">Port Mappings</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<pre>{{JSON.stringify(container.diagnosticResults.port_mappings, null, 2)}}</pre>
|
||||
<pre>{$ JSON.stringify(container.diagnosticResults.port_mappings) $}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user