mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 01:36:18 +02:00
Issue SSL tile + centered SSL form close (X) for v2.5.5-dev; install/upgrade/downgrade safe
This commit is contained in:
41
docs/release_v2.5.5-dev.md
Normal file
41
docs/release_v2.5.5-dev.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Release notes – v2.5.5-dev
|
||||
|
||||
## Issue SSL and SSL form (install / upgrade / downgrade)
|
||||
|
||||
### Changes included
|
||||
|
||||
1. **Issue SSL**
|
||||
- **Main domain:** CONFIGURATIONS section has an **Issue SSL** tile next to **Add SSL**. Clicking it obtains or restores Let's Encrypt SSL for the main site (calls `POST /manageSSL/issueSSL` with `virtualHost`; path is resolved from DB).
|
||||
- **Child domains:** On each child domain page (e.g. **launchChild**), CONFIGURATIONS has **Add SSL** and **Issue SSL**. Issue SSL uses `issueSSL(childDomainName, childPath)` and the same backend endpoint.
|
||||
- **Backend:** `manageSSL/views.py` `issueSSL()` supports both main and child: it looks up `ChildDomains` first, then `Websites`, and uses the appropriate path and admin email.
|
||||
|
||||
2. **SSL form close (X) button**
|
||||
- **Main domain** (`websiteFunctions/templates/websiteFunctions/website.html`): SSL form close button is centered in the row, uses `ssl-form-close-btn` and Font Awesome `fa-times`, with CSS for centered icon.
|
||||
- **Child domain** (`websiteFunctions/templates/websiteFunctions/launchChild.html`): Same centered close button for the Add SSL form.
|
||||
|
||||
3. **Files touched**
|
||||
- `websiteFunctions/templates/websiteFunctions/website.html` – Issue SSL tile, SSL form close button + `.ssl-form-close-btn` CSS.
|
||||
- `websiteFunctions/templates/websiteFunctions/launchChild.html` – Issue SSL tile, SSL form close button.
|
||||
- `manageSSL/views.py` – `issueSSL` (unchanged logic; already supports main and child).
|
||||
- `websiteFunctions/static/websiteFunctions/websiteFunctions.js` – multiple controllers already define `issueSSL(virtualHost)` or `issueSSL(childDomain, path)` posting to `/manageSSL/issueSSL`.
|
||||
|
||||
### Install
|
||||
|
||||
- New installs clone the repo (e.g. `master3395/cyberpanel`) and checkout the chosen branch (e.g. `v2.5.5-dev`). All of the above files are in the repo, so **Issue SSL** and the SSL form close button are present after install.
|
||||
|
||||
### Upgrade
|
||||
|
||||
- Upgrade removes `/usr/local/CyberCP`, clones the repo, and checks out the target branch. Only a small set of critical files are restored from backup (e.g. `settings.py`, `.git/config`, custom dirs, Imunify); **website templates and static JS are not in the backup list**, so the new clone’s `website.html`, `launchChild.html`, and `websiteFunctions.js` are kept. After upgrade, **Issue SSL** and the updated SSL form are active.
|
||||
|
||||
### Downgrade
|
||||
|
||||
- Downgrade is the same flow with a different branch. If you switch to an older branch that does not include the Issue SSL tile or the new close button, the UI will reflect that branch. The backend endpoint `/manageSSL/issueSSL` exists in upstream CyberPanel, so older branches that still have the route will continue to work; no extra compatibility logic is required for downgrade.
|
||||
|
||||
### Version
|
||||
|
||||
- `version.txt`: `{"version":"2.5.5","build":"dev"}` (or as set in repo).
|
||||
- `plogical/upgrade.py`: `VERSION = '2.5.5'`, `BUILD = 5` (or as configured); used for DB version and packaging.
|
||||
|
||||
---
|
||||
|
||||
**Summary:** Issue SSL and the SSL form close button are in the v2.5.5-dev codebase and work with install, upgrade, and downgrade. Push this repo to GitHub and use branch `v2.5.5-dev` (or your chosen tag) for deployments.
|
||||
@@ -7,7 +7,7 @@
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
<div ng-controller="launchChild" ng-init="childDomainName='{{ childDomain }}'; masterDomain='{{ domain }}'">
|
||||
<div ng-controller="launchChild" ng-init="childDomainName='{{ childDomain }}'; masterDomain='{{ domain }}'; childPath='{{ childPath|escapejs }}'">
|
||||
|
||||
<style>
|
||||
/* Ultra-Modern CyberPanel Design System */
|
||||
@@ -864,6 +864,13 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a ng-click="issueSSL(childDomainName, childPath)" href="" class="icon-box" title="{% trans 'Obtain or restore Let\'s Encrypt SSL (default)' %}">
|
||||
<i class="fas fa-certificate" style="font-size: 48px; color: var(--info-color);"></i>
|
||||
<span class="h4">{% trans "Issue SSL" %}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a ng-click="changePHPMaster()" href="" class="icon-box" title="{% trans 'Change PHP Version' %}">
|
||||
<i class="fab fa-php" style="font-size: 48px; color: var(--info-color);"></i>
|
||||
@@ -891,9 +898,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div style="margin-bottom: 20px; text-align: right;">
|
||||
<button ng-click="hidesslbtn()" type="button" class="btn btn-link" style="color: var(--danger-color);">
|
||||
<i class="fas fa-times" style="font-size: 20px;"></i>
|
||||
<div style="margin-bottom: 20px; display: flex; justify-content: center; align-items: center;">
|
||||
<button ng-click="hidesslbtn()" type="button" class="btn btn-link" style="color: var(--danger-color); min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;">
|
||||
<i class="fas fa-times" style="font-size: 24px;"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -706,6 +706,16 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
/* SSL form close (X) button – centered in row and icon centered in button */
|
||||
.ssl-form-close-btn {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
}
|
||||
.ssl-form-close-btn i.fa-times {
|
||||
line-height: 1;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
@@ -2035,6 +2045,13 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a href="#" ng-click="issueSSL('{{ domain|escapejs }}'); $event.preventDefault()" title="{% trans 'Obtain or restore Let\'s Encrypt SSL (default)' %}">
|
||||
<img src="{% static 'images/icons/locked.png' %}" width="65" class="mr-10">
|
||||
<span class="h4">{% trans "Issue SSL" %}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a href="#" ng-click="changePHPMaster(); $event.preventDefault()" title="{% trans 'Change PHP Version' %}">
|
||||
<img src="{% static 'images/icons/laptop.png' %}" width="65" class="mr-10">
|
||||
@@ -2063,16 +2080,19 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="" class="form-group">
|
||||
<div style="margin-bottom: 1%;" class="col-sm-offset-11 col-sm-1">
|
||||
<a ng-click="hidesslbtn()" href=""><img
|
||||
src="/static/images/close-32.png"></a>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12" style="margin-bottom: 15px; display: flex; justify-content: center; align-items: center;">
|
||||
<button type="button" ng-click="hidesslbtn()" class="btn btn-link ssl-form-close-btn" style="color: var(--danger-color, #dc3545); padding: 8px 12px; min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;">
|
||||
<i class="fas fa-times" style="font-size: 24px;"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{% trans "Paste Your Cert" %}</label>
|
||||
<textarea placeholder="Paste Your Cert" ng-model="cert" rows="10"
|
||||
class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{% trans "Paste Your Key" %}</label>
|
||||
<textarea placeholder="Paste Your Key" ng-model="key" rows="10"
|
||||
class="form-control"></textarea>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user