fix issue with design on n8n page

This commit is contained in:
usmannasir
2025-04-12 14:47:46 +05:00
parent 14c817ddef
commit 788c3ecbe6
2 changed files with 10 additions and 3 deletions

View File

@@ -13,6 +13,12 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
} }
// Helper function to truncate container IDs
$scope.truncateId = function(id) {
if (!id) return '';
return id.substring(0, 12);
};
$scope.getcontainer = function () { $scope.getcontainer = function () {
$('#cyberpanelLoading').show(); $('#cyberpanelLoading').show();
url = "/docker/getDockersiteList"; url = "/docker/getDockersiteList";
@@ -397,7 +403,7 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
// Refresh container info after short delay to allow Docker to update // Refresh container info after short delay to allow Docker to update
setTimeout(function() { setTimeout(function() {
$scope.Lunchcontainer(container.id); $scope.getcontainer();
}, 1000); }, 1000);
} else { } else {
new PNotify({ new PNotify({
@@ -545,7 +551,7 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
}); });
$('#settings').modal('hide'); $('#settings').modal('hide');
// Refresh container info after update // Refresh container info after update
$scope.Lunchcontainer($scope.selectedContainer.id); $scope.getcontainer();
} else { } else {
new PNotify({ new PNotify({
title: 'Operation Failed!', title: 'Operation Failed!',
@@ -570,6 +576,7 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
$scope.addVolField = function() { $scope.addVolField = function() {
if (!$scope.volList) { if (!$scope.volList) {
$scope.volList = {}; $scope.volList = {};
$scope.volListNumber = 0;
} }
$scope.volList[$scope.volListNumber] = {'dest': '', 'src': ''}; $scope.volList[$scope.volListNumber] = {'dest': '', 'src': ''};

View File

@@ -28,7 +28,7 @@
<h5>Container Info</h5> <h5>Container Info</h5>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<p><strong>ID:</strong> {{ '{% verbatim %}' }}{{ container.id.substring(0, 12) }}{{ '{% endverbatim %}' }}</p> <p><strong>ID:</strong> {{ '{% verbatim %}' }}{{ truncateId(container.id) }}{{ '{% endverbatim %}' }}</p>
<p><strong>Image:</strong> {{ '{% verbatim %}' }}{{ container.Image }}{{ '{% endverbatim %}' }}</p> <p><strong>Image:</strong> {{ '{% verbatim %}' }}{{ container.Image }}{{ '{% endverbatim %}' }}</p>
<p><strong>Status:</strong> <span ng-class="{'text-success': container.Status == 'running', 'text-danger': container.Status != 'running'}">{{ '{% verbatim %}' }}{{ container.Status }}{{ '{% endverbatim %}' }}</span></p> <p><strong>Status:</strong> <span ng-class="{'text-success': container.Status == 'running', 'text-danger': container.Status != 'running'}">{{ '{% verbatim %}' }}{{ container.Status }}{{ '{% endverbatim %}' }}</span></p>
</div> </div>