mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-07-15 05:32:09 +02:00
lsws switch
This commit is contained in:
@@ -3,14 +3,13 @@
|
||||
{% block title %}{% trans "LiteSpeed Status - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
{% if OLS %}
|
||||
<div class="container">
|
||||
|
||||
<div id="page-title">
|
||||
<h2>{% trans "LiteSpeed Status:" %} <img src="{% static 'images/lsON.png' %}"></h2>
|
||||
@@ -20,17 +19,17 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div ng-controller="litespeedStatus" class="col-md-6">
|
||||
<div class="panel-body">
|
||||
<div ng-controller="litespeedStatus" class="col-md-6">
|
||||
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
{% if processList %}
|
||||
|
||||
<h3 class="content-box-header bg-black">
|
||||
{% trans "LiteSpeed Processes" %}
|
||||
</h3>
|
||||
{% trans "LiteSpeed Processes" %}
|
||||
</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
@@ -42,7 +41,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for items in processList %}
|
||||
<tr>
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
|
||||
<td> {{ items }}</td>
|
||||
@@ -58,22 +57,24 @@
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-danger">
|
||||
<p>{% trans "Could not fetch details, either LiteSpeed is not running or some error occurred, please see CyberPanel Main log file." %}</p>
|
||||
<p>{% trans "Could not fetch details, either LiteSpeed is not running or some error occurred, please see CyberPanel Main log file." %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button ng-click="restartLitespeed()" ng-disabled="disableReboot" class="btn btn-alt btn-hover btn-blue-alt">
|
||||
<button ng-click="restartLitespeed()" ng-disabled="disableReboot"
|
||||
class="btn btn-alt btn-hover btn-blue-alt">
|
||||
<span>{% trans "Reboot Litespeed" %}</span>
|
||||
<i class="glyph-icon icon-arrow-right"></i>
|
||||
</button>
|
||||
|
||||
<button ng-click="stopLitespeed()" ng-disable="disableStop" class="btn btn-alt btn-hover btn-danger">
|
||||
<button ng-click="stopLitespeed()" ng-disable="disableStop"
|
||||
class="btn btn-alt btn-hover btn-danger">
|
||||
<span>{% trans "Stop LiteSpeed" %}</span>
|
||||
<i class="glyph-icon icon-arrow-right"></i>
|
||||
</button>
|
||||
@@ -96,45 +97,282 @@
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<h3 class="content-box-header bg-black">
|
||||
Version: {{ lsversion }}
|
||||
</h3>
|
||||
<div class="content-box-wrapper">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ modules }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for items in loadedModules %}
|
||||
<tr>
|
||||
<td>{{ items }}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<h3 class="content-box-header bg-black">
|
||||
Version: {{ lsversion }}
|
||||
</h3>
|
||||
<div class="content-box-wrapper">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ modules }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for items in loadedModules %}
|
||||
<tr>
|
||||
<td>{{ items }}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
|
||||
<div ng-controller="lswsSwitch" class="example-box-wrapper">
|
||||
<div style="border-radius: 25px;border-color:#3498db" class="content-box">
|
||||
<h3 class="content-box-header bg-blue">
|
||||
{% trans "Switch to LiteSpeed Enterprise Web Server" %} <img ng-hide="cyberPanelLoading"
|
||||
src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="content-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<form action="/" class="form-horizontal bordered-row">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "License Key" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" ng-model="licenseKey"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="switchTOLSWS()"
|
||||
class="btn btn-primary btn-lg btn-block">{% trans "Switch" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!------ LSWS Switch box ----------------->
|
||||
|
||||
<div style="margin-top: 2%" ng-hide="installBoxGen" class="col-md-12">
|
||||
|
||||
<form action="/" id="" class="form-horizontal bordered-row">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 text-center">
|
||||
<h3><img style="width:70px"
|
||||
src="{% static 'images/litespeed-logo.png' %}"> {% trans "With great wisdom comes great responsibility." %}
|
||||
<img ng-hide="cyberPanelLoading" src="/static/images/loading.gif"></h3>
|
||||
</div>
|
||||
<div style="margin-top: 2%;" class="col-sm-12">
|
||||
<textarea ng-model="requestData" rows="15"
|
||||
class="form-control">{{ requestData }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<!----- LSWS Switch box ----------------->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div ng-controller="litespeedStatus" class="container">
|
||||
|
||||
<div id="page-title">
|
||||
<h2>{% trans "LiteSpeed Status:" %} <img src="{% static 'images/lsON.png' %}"></h2>
|
||||
<p>{% trans "On this page you can get information regarding your LiteSpeed processes." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
{% if processList %}
|
||||
|
||||
<h3 class="content-box-header bg-black">
|
||||
{% trans "LiteSpeed Processes" %}
|
||||
</h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{% trans "Process ID" %}</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for items in processList %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
|
||||
<td> {{ items }}</td>
|
||||
|
||||
{% if forloop.counter == 1 %}
|
||||
<td>{% trans "Main Process" %}</td>
|
||||
|
||||
{% elif forloop.counter == 2 %}
|
||||
<td>{% trans "lscgid Process" %}</td>
|
||||
|
||||
{% else %}
|
||||
<td>{% trans "Worker Process" %}</td>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="alert alert-danger">
|
||||
<p>{% trans "Could not fetch details, either LiteSpeed is not running or some error occurred, please see CyberPanel Main log file." %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button ng-click="restartLitespeed()" ng-disabled="disableReboot"
|
||||
class="btn btn-alt btn-hover btn-blue-alt">
|
||||
<span>{% trans "Reboot Litespeed" %}</span>
|
||||
<i class="glyph-icon icon-arrow-right"></i>
|
||||
</button>
|
||||
|
||||
<button ng-click="stopLitespeed()" ng-disable="disableStop"
|
||||
class="btn btn-alt btn-hover btn-danger">
|
||||
<span>{% trans "Stop LiteSpeed" %}</span>
|
||||
<i class="glyph-icon icon-arrow-right"></i>
|
||||
</button>
|
||||
|
||||
<img ng-hide="restartorStopLoading" src="{% static 'images/loading.gif' %}">
|
||||
|
||||
|
||||
<div ng-hide="actionResult" class="alert alert-success">
|
||||
<p>{% trans "Action successful." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="actionResultBad" class="alert alert-danger">
|
||||
<p>{% trans "Error Occurred. See CyberPanel main log file." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="serverStatusCouldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div style="border-radius: 25px;border-color:#3498db" class="content-box">
|
||||
<h3 class="content-box-header bg-blue">
|
||||
{% trans "License Manager" %} <img ng-hide="cpLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="content-box-wrapper">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6" style="margin-bottom: 2%;">
|
||||
<a ng-click="licenseStatus(1)" href="" title="{% trans 'License Status' %}">
|
||||
<img src="{% static 'images/agreement.png' %}">
|
||||
</a>
|
||||
<a ng-click="licenseStatus(1)" href="" title="{% trans 'License Status' %}">
|
||||
<span style='font-size: 21px;font-family: "Times New Roman", Times, serif; padding-left: 2%'>{% trans 'License Status' %}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6" style="margin-bottom: 2%;">
|
||||
<a ng-click="showSerialBox()" href="" title="{% trans 'Change License' %}">
|
||||
<img src="{% static 'images/change.png' %}">
|
||||
</a>
|
||||
<a ng-click="showSerialBox()" href="" title="{% trans 'Change License' %}">
|
||||
<span style='font-size: 21px;font-family: "Times New Roman", Times, serif; padding-left: 2%'>{% trans 'Change License' %}</span>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div ng-hide="fetchedData">
|
||||
<div class="alert alert-success">
|
||||
<div class="bg-green alert-icon">
|
||||
<i class="glyph-icon icon-check"></i>
|
||||
</div>
|
||||
<div class="alert-content">
|
||||
<h4 class="alert-title">{$ lsSerial $}</h4>
|
||||
<p>{$ lsexpiration $}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!---------- HTML For Changing Serial No --------------->
|
||||
|
||||
<div ng-hide="changeSerialBox" class="col-md-12">
|
||||
<form action="/" class="form-horizontal bordered-row">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "New key" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" ng-model="newKey" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="changeLicense()"
|
||||
class="btn btn-primary btn-lg btn-block">{% trans "Change Key" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!---------- HTML For Changing Serial No --------------->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user