mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 23:36:11 +01:00
additional n8n functions
This commit is contained in:
@@ -139,88 +139,102 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-buttons {
|
/* Button Group Styles */
|
||||||
display: flex;
|
.btn-group {
|
||||||
align-items: center;
|
box-shadow: 0 1px 3px rgba(0,0,0,0.12);
|
||||||
}
|
|
||||||
.action-buttons .btn-group {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
.action-buttons .btn {
|
|
||||||
padding: 6px 12px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.action-buttons .btn i {
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
.badge {
|
|
||||||
padding: 5px 10px;
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group .btn {
|
||||||
|
border: none;
|
||||||
|
padding: 8px 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
transition: all 0.2s ease;
|
||||||
.badge-success {
|
|
||||||
background-color: #28a745;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.badge-danger {
|
|
||||||
background-color: #dc3545;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.badge-warning {
|
|
||||||
background-color: #ffc107;
|
|
||||||
color: #212529;
|
|
||||||
}
|
|
||||||
.btn-outline-success {
|
|
||||||
color: #28a745;
|
|
||||||
border-color: #28a745;
|
|
||||||
}
|
|
||||||
.btn-outline-success:hover {
|
|
||||||
color: white;
|
|
||||||
background-color: #28a745;
|
|
||||||
}
|
|
||||||
.btn-outline-warning {
|
|
||||||
color: #ffc107;
|
|
||||||
border-color: #ffc107;
|
|
||||||
}
|
|
||||||
.btn-outline-warning:hover {
|
|
||||||
color: #212529;
|
|
||||||
background-color: #ffc107;
|
|
||||||
}
|
|
||||||
.btn-outline-danger {
|
|
||||||
color: #dc3545;
|
|
||||||
border-color: #dc3545;
|
|
||||||
}
|
|
||||||
.btn-outline-danger:hover {
|
|
||||||
color: white;
|
|
||||||
background-color: #dc3545;
|
|
||||||
}
|
|
||||||
.btn-outline-primary {
|
|
||||||
color: #007bff;
|
|
||||||
border-color: #007bff;
|
|
||||||
}
|
|
||||||
.btn-outline-primary:hover {
|
|
||||||
color: white;
|
|
||||||
background-color: #007bff;
|
|
||||||
}
|
|
||||||
.btn-outline-info {
|
|
||||||
color: #17a2b8;
|
|
||||||
border-color: #17a2b8;
|
|
||||||
}
|
|
||||||
.btn-outline-info:hover {
|
|
||||||
color: white;
|
|
||||||
background-color: #17a2b8;
|
|
||||||
}
|
|
||||||
.ms-2 {
|
|
||||||
margin-left: 0.5rem;
|
|
||||||
}
|
|
||||||
.me-3 {
|
|
||||||
margin-right: 1rem;
|
|
||||||
}
|
|
||||||
.mb-2 {
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
.m-0 {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group .btn:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group .btn:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group .btn i {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group .btn-sm {
|
||||||
|
font-size: 0.875rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button Colors */
|
||||||
|
.btn-success {
|
||||||
|
background-color: #2ecc71;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning {
|
||||||
|
background-color: #f1c40f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: #3498db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-info {
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button Hover States */
|
||||||
|
.btn-success:hover {
|
||||||
|
background-color: #27ae60;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning:hover {
|
||||||
|
background-color: #f39c12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger:hover {
|
||||||
|
background-color: #c0392b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-info:hover {
|
||||||
|
background-color: #2472a4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tooltip enhancement */
|
||||||
|
[title] {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
[title]:hover:after {
|
||||||
|
content: attr(title);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 100%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
background: rgba(0,0,0,0.8);
|
||||||
|
color: white;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 10;
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -386,39 +400,28 @@
|
|||||||
<div ng-repeat="web in ContainerList">
|
<div ng-repeat="web in ContainerList">
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<div id="page-title" class="mb-4">
|
<div id="page-title" class="mb-4">
|
||||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
<h2 id="domainNamePage" class="d-flex justify-content-between align-items-center">
|
||||||
<h2 class="m-0">{% trans "Currently managing: " %} {$ web.name $}</h2>
|
<span>{% trans "Currently managing: " %} {$ web.name $}</span>
|
||||||
<div class="action-buttons">
|
<div class="btn-group" role="group" aria-label="Container Actions">
|
||||||
<div class="btn-group" role="group">
|
<button class="btn btn-success btn-sm" ng-click="cAction('start')" ng-if="web.status !== 'running'" title="Start Container">
|
||||||
<button class="btn btn-outline-success" ng-click="cAction('start', web)" ng-if="web.status !== 'running'" title="Start Container">
|
<i class="fa fa-play"></i> Start
|
||||||
<i class="fa fa-play"></i>
|
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-warning" ng-click="cAction('restart', web)" ng-if="web.status === 'running'" title="Restart Container">
|
<button class="btn btn-warning btn-sm" ng-click="cAction('restart')" ng-if="web.status === 'running'" title="Restart Container">
|
||||||
<i class="fa fa-refresh"></i>
|
<i class="fa fa-refresh"></i> Restart
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-danger" ng-click="cAction('stop', web)" ng-if="web.status === 'running'" title="Stop Container">
|
<button class="btn btn-danger btn-sm" ng-click="cAction('stop')" ng-if="web.status === 'running'" title="Stop Container">
|
||||||
<i class="fa fa-stop"></i>
|
<i class="fa fa-stop"></i> Stop
|
||||||
</button>
|
</button>
|
||||||
</div>
|
<button class="btn btn-primary btn-sm" ng-click="openSettings(web)" title="Container Settings">
|
||||||
|
<i class="fa fa-cog"></i> Settings
|
||||||
<div class="btn-group ms-2" role="group">
|
|
||||||
<button class="btn btn-outline-primary" ng-click="openSettings(web)" title="Container Settings">
|
|
||||||
<i class="fa fa-cog"></i>
|
|
||||||
</button>
|
</button>
|
||||||
<a class="btn btn-outline-info" href="http://{$ location.hostname $}:{$ web.ports['5678/tcp'][0].HostPort $}" target="_blank"
|
<a class="btn btn-info btn-sm" href="http://{$ location.hostname $}:{$ web.ports['5678/tcp'][0].HostPort $}" target="_blank" ng-if="web.status === 'running'" title="Open n8n Interface">
|
||||||
ng-if="web.status === 'running'" title="Open n8n Interface">
|
<i class="fa fa-external-link"></i> Open n8n
|
||||||
<i class="fa fa-external-link"></i> n8n
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</h2>
|
||||||
</div>
|
<p class="text-muted">
|
||||||
<p class="text-muted mb-0">
|
{% trans "Container ID" %}: <code>{$ web.id $}</code>
|
||||||
<span class="me-3">{% trans "Container ID" %}: <code>{$ web.id $}</code></span>
|
|
||||||
<span class="badge" ng-class="{
|
|
||||||
'badge-success': web.status === 'running',
|
|
||||||
'badge-danger': web.status === 'stopped',
|
|
||||||
'badge-warning': web.status !== 'running' && web.status !== 'stopped'
|
|
||||||
}">{$ web.status $}</span>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user