mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 07:15:53 +02:00
Initial Commit
This commit is contained in:
0
websiteFunctions/__init__.py
Normal file
0
websiteFunctions/__init__.py
Normal file
BIN
websiteFunctions/__init__.pyc
Normal file
BIN
websiteFunctions/__init__.pyc
Normal file
Binary file not shown.
7
websiteFunctions/admin.py
Normal file
7
websiteFunctions/admin.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.contrib import admin
|
||||
import models
|
||||
# Register your models here.
|
||||
admin.site.register(models.Websites)
|
||||
BIN
websiteFunctions/admin.pyc
Normal file
BIN
websiteFunctions/admin.pyc
Normal file
Binary file not shown.
8
websiteFunctions/apps.py
Normal file
8
websiteFunctions/apps.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class WebsitefunctionsConfig(AppConfig):
|
||||
name = 'websiteFunctions'
|
||||
32
websiteFunctions/migrations/0001_initial.py
Normal file
32
websiteFunctions/migrations/0001_initial.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.3 on 2017-07-25 20:30
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('loginSystem', '0001_initial'),
|
||||
('packages', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Websites',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('domain', models.CharField(max_length=50, unique=True)),
|
||||
('adminEmail', models.CharField(max_length=50)),
|
||||
('phpSelection', models.CharField(max_length=5)),
|
||||
('ssl', models.IntegerField()),
|
||||
('ftp', models.IntegerField()),
|
||||
('admin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='loginSystem.Administrator')),
|
||||
('package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='packages.Package')),
|
||||
],
|
||||
),
|
||||
]
|
||||
BIN
websiteFunctions/migrations/0001_initial.pyc
Normal file
BIN
websiteFunctions/migrations/0001_initial.pyc
Normal file
Binary file not shown.
0
websiteFunctions/migrations/__init__.py
Normal file
0
websiteFunctions/migrations/__init__.py
Normal file
BIN
websiteFunctions/migrations/__init__.pyc
Normal file
BIN
websiteFunctions/migrations/__init__.pyc
Normal file
Binary file not shown.
35
websiteFunctions/models.py
Normal file
35
websiteFunctions/models.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
from packages.models import Package
|
||||
from loginSystem.models import Administrator
|
||||
|
||||
# Create your models here.
|
||||
|
||||
|
||||
class Websites(models.Model):
|
||||
admin = models.ForeignKey(Administrator)
|
||||
package = models.ForeignKey(Package)
|
||||
domain = models.CharField(max_length=50,unique=True)
|
||||
adminEmail = models.CharField(max_length=50)
|
||||
phpSelection = models.CharField(max_length=10)
|
||||
ssl = models.IntegerField()
|
||||
state = models.IntegerField(default=1)
|
||||
|
||||
class Backups(models.Model):
|
||||
website = models.ForeignKey(Websites,on_delete=models.CASCADE)
|
||||
fileName = models.CharField(max_length=50)
|
||||
date = models.CharField(max_length=50)
|
||||
size = models.CharField(max_length=50)
|
||||
status = models.IntegerField(default=0)
|
||||
|
||||
|
||||
class dest(models.Model):
|
||||
destLoc = models.CharField(unique=True,max_length=18)
|
||||
|
||||
|
||||
class backupSchedules(models.Model):
|
||||
dest = models.ForeignKey(dest)
|
||||
frequency = models.CharField(max_length=15)
|
||||
|
||||
BIN
websiteFunctions/models.pyc
Normal file
BIN
websiteFunctions/models.pyc
Normal file
Binary file not shown.
BIN
websiteFunctions/static/images/close-32.png
Normal file
BIN
websiteFunctions/static/images/close-32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,7 @@
|
||||
.current-pack{
|
||||
padding-top: 1.5%;
|
||||
color: #3e4855;
|
||||
font-weight: bold;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
1343
websiteFunctions/static/websiteFunctions/websiteFunctions.js
Normal file
1343
websiteFunctions/static/websiteFunctions/websiteFunctions.js
Normal file
File diff suppressed because it is too large
Load Diff
140
websiteFunctions/templates/websiteFunctions/createWebsite.html
Normal file
140
websiteFunctions/templates/websiteFunctions/createWebsite.html
Normal file
@@ -0,0 +1,140 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Create New Website - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Create Website" %}</h2>
|
||||
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Website Details" %} <img id="webSiteCreation" src="{% static 'images/loading.gif' %}">
|
||||
</h3>
|
||||
<div ng-controller="createWebsite" class="example-box-wrapper">
|
||||
|
||||
|
||||
<form name="websiteCreationForm" action="/" id="createPackages" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="packageForWebsite" class="form-control">
|
||||
{% for items in packageList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="websiteOwner" class="form-control">
|
||||
{% for items in owernList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Domain Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input ng-pattern="/([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?$/i" name="dom" type="text" class="form-control" ng-model="domainNameCreate" required>
|
||||
</div>
|
||||
<div ng-show="websiteCreationForm.dom.$error.pattern" class="current-pack">{% trans "Invalid Domain (Note: You don't need to add 'http' or 'https')" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="email" name="email" class="form-control" ng-model="adminEmail" required>
|
||||
</div>
|
||||
<div ng-show="websiteCreationForm.email.$error.email" class="current-pack">{% trans "Invalid Email" %}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="phpSelection" class="form-control">
|
||||
<option>PHP 5.3</option>
|
||||
<option>PHP 5.4</option>
|
||||
<option>PHP 5.5</option>
|
||||
<option>PHP 5.6</option>
|
||||
<option>PHP 7.0</option>
|
||||
<option>PHP 7.1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Additional Features" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input ng-model="sslCheck" type="checkbox" value="">
|
||||
SSL
|
||||
<div ng-show="sslCheck" style="margin-top: 2%;margin-bottom: -2%" class="alert alert-warning">
|
||||
<p>{% trans "For SSL to work DNS of domain should point to server, otherwise self signed SSL will be issued, you can add your own SSL later." %}</p>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.dom.$error.pattern || websiteCreationForm.email.$invalid" type="button" ng-click="createWebsite()" class="btn btn-primary btn-lg btn-block">{% trans "Create Website" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<div id="websiteCreationFailed" class="alert alert-danger">
|
||||
<p>{% trans "Cannot create website. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div id="websiteCreated" class="alert alert-success">
|
||||
<p>{% trans "Website with domain" %} <strong>{$ websiteDomain $}</strong>{% trans " is Successfully Created" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,86 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Delete Website - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Delete Website" %}</h2>
|
||||
<p>{% trans "This page can be used to delete website, once deleted it can not be recovered." %}</p>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Delete Website" %} <img id="deleteLoading" src="{% static 'images/loading.gif' %}">
|
||||
</h3>
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
|
||||
<form ng-controller="deleteWebsiteControl" action="/" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Website" %} </label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-change="fetchDetails()" ng-model="websiteToBeDeleted" class="form-control">
|
||||
{% for items in websiteList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="deleteWebsite()" class="btn btn-primary btn-lg btn-block">{% trans "Delete Website" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="deleteWebsiteButton" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="deleteWebsiteFinal()" class="btn btn-primary btn-lg btn-block">{% trans "Are you sure?" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<div id="websiteDeleteFailure" class="alert alert-danger">
|
||||
<p>{% trans "Cannot delete website, Error message: " %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div id="websiteDeleteSuccess" class="alert alert-success">
|
||||
<p>{% trans "Website" %} <strong>{$ deletedWebsite $}</strong> {% trans "Successfully Deleted." %} </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
105
websiteFunctions/templates/websiteFunctions/index.html
Normal file
105
websiteFunctions/templates/websiteFunctions/index.html
Normal file
@@ -0,0 +1,105 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Website Functions - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Website Functions" %}</h2>
|
||||
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Available Functions" %}
|
||||
</h3>
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'createWebsite' %}" title="{% trans 'Create Website' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Create Website" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'listWebsites' %}" title="{% trans 'List Websites' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "List Websites" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'modifyWebsite' %}" title="{% trans 'Modify Website' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Modify Website" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
{% if viewStatus == 1 %}
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'siteState' %}" title="{% trans 'Suspend/Unsuspend Website' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Suspend/Unsuspend Website" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'deleteWebsite' %}" title="{% trans 'Delete Website' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Delete Website" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,86 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Websites Hosted - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div id="page-title">
|
||||
<h2 id="domainNamePage">{% trans "List Websites" %}</h2>
|
||||
<p>{% trans "On this page you can launch, list, modify and delete websites from your server." %}</p>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Websites" %}
|
||||
</h3>
|
||||
<div ng-controller="listWebsites" class="example-box-wrapper">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="datatable-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>Launch</th>
|
||||
<th>Package</th>
|
||||
<th>Owner</th>
|
||||
<th>State</th>
|
||||
<th>Email</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr ng-repeat="web in WebSitesList track by $index">
|
||||
<td ng-bind="web.domain"></td>
|
||||
<td><a href="{$ web.domain $}"><img width="30px" height="30" class="center-block" src="{% static 'baseTemplate/assets/image-resources/webPanel.png' %}"></a></td>
|
||||
<td ng-bind="web.package"></td>
|
||||
<td ng-bind="web.admin"></td>
|
||||
<td ng-bind="web.state"></td>
|
||||
<td ng-bind="web.adminEmail"></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="listFail" class="alert alert-danger">
|
||||
<p>{% trans "Cannot list websites. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4 col-sm-offset-8">
|
||||
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
|
||||
|
||||
{% for items in pagination %}
|
||||
|
||||
<li ng-click="getFurtherWebsitesFromDB({{ forloop.counter }})" id="webPages"><a href="">{{ forloop.counter }}</a></li>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
138
websiteFunctions/templates/websiteFunctions/modifyWebsite.html
Normal file
138
websiteFunctions/templates/websiteFunctions/modifyWebsite.html
Normal file
@@ -0,0 +1,138 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Modify Website - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Modify Website" %}</h2>
|
||||
<p>{% trans "Packages define resources for your websites, you need to add package before creating a website." %}</p>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Modify Website" %} <img id="modifyWebsiteLoading" src="{% static 'images/loading.gif' %}">
|
||||
</h3>
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
|
||||
<form ng-controller="modifyWebsitesController" action="/" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Website" %} </label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-change="fetchWebsites()" ng-model="websiteToBeModified" class="form-control">
|
||||
{% for items in websiteList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!------ Modification form that appears after a click --------------->
|
||||
|
||||
<div id="webSiteDetailsToBeModified">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="selectedPack" class="form-control">
|
||||
<option ng-repeat="pack in webpacks">{$ pack.pack $}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="current-pack">{% trans "Current Package:" %} {$ currentPack $}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="selectedAdmin" class="form-control">
|
||||
<option ng-repeat="admins in adminNames">{$ admins.adminNames $}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="current-pack">{% trans "Current Owner:"%} {$ currentAdmin $}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Email" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="email" class="form-control" ng-model="adminEmail" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select PHP" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="phpSelection" class="form-control">
|
||||
<option>PHP 5.3</option>
|
||||
<option>PHP 5.4</option>
|
||||
<option>PHP 5.5</option>
|
||||
<option>PHP 5.6</option>
|
||||
<option>PHP 7.0</option>
|
||||
<option>PHP 7.1</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!------ Modification form that appears after a click --------------->
|
||||
|
||||
|
||||
<div id="modifyWebsiteButton" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="modifyWebsiteFunc()" class="btn btn-primary btn-lg btn-block">{% trans "Modify Website" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<div id="websiteModifyFailure" class="alert alert-danger">
|
||||
<p>{% trans "Cannot fetch website details. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div id="canNotModify" class="alert alert-danger">
|
||||
<p>{% trans "Cannot modify website. Error message:" %} {$ errMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div id="websiteModifySuccess" class="alert alert-success">
|
||||
<p>{% trans "Website Details Successfully fetched" %}</p>
|
||||
</div>
|
||||
|
||||
<div id="websiteSuccessfullyModified" class="alert alert-success">
|
||||
<strong>{$ websiteModified $}</strong> Successfully Modified</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,98 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Suspend/Unsuspend Website - CyberPanel" %}{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Suspend/Unsuspend Website" %}</h2>
|
||||
<p>{% trans "This page can be used to suspend/unsuspend website." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-controller="suspendWebsiteControl" class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Suspend/Unsuspend Website" %} <img ng-hide="suspendLoading" src="{% static 'images/loading.gif' %}">
|
||||
</h3>
|
||||
<div class="example-box-wrapper">
|
||||
|
||||
|
||||
<form action="/" class="form-horizontal bordered-row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Select Website" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-change="showSuspendUnsuspend()" ng-model="websiteToBeSuspended" class="form-control">
|
||||
{% for items in websiteList %}
|
||||
<option>{{ items }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="stateView" class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Suspend/Unsuspend" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<select ng-model="state" class="form-control">
|
||||
<option>{% trans "Suspend" %}</option>
|
||||
<option>{% trans "Un-Suspend" %}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="save()" class="btn btn-primary btn-lg btn-block">{% trans "Save" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<div ng-hide="websiteSuspendFailure" class="alert alert-danger">
|
||||
<p>{% trans "Cannot suspend website, Error message: " %}{$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="websiteUnsuspendFailure" class="alert alert-danger">
|
||||
<p>{% trans "Cannot unsuspend website. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="websiteSuccess" class="alert alert-success">
|
||||
<p>{% trans "Website " %}<strong>{$ websiteStatus $}</strong> {% trans "Successfully " %}{$ finalStatus $}.</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
596
websiteFunctions/templates/websiteFunctions/website.html
Normal file
596
websiteFunctions/templates/websiteFunctions/website.html
Normal file
@@ -0,0 +1,596 @@
|
||||
{% extends "baseTemplate/index.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{{ domain }} - CyberPanel{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
{% load static %}
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
<div ng-controller="websitePages" class="container">
|
||||
|
||||
|
||||
<div id="page-title">
|
||||
<h2 id="domainNamePage">{{ domain }}</h2>
|
||||
<p>{% trans "All functions related to a particular site." %}</p>
|
||||
</div>
|
||||
|
||||
{% if not error %}
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Resource Usage" %}
|
||||
</h3>
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Resource" %}</th>
|
||||
<th>{% trans "Usage" %}</th>
|
||||
<th>{% trans "Allowed" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>{% trans "FTP" %}</code></td>
|
||||
<td><span class="bs-badge badge-success">{{ ftpUsed }}</span></td>
|
||||
<td><span class="bs-badge badge-success">{{ ftpTotal }}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>{% trans "Databases" %}</code></td>
|
||||
<td><span class="bs-badge badge-success">{{ databasesUsed }}</span></td>
|
||||
<td><span class="bs-badge badge-success">{{ databasesTotal }}</span></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><code>{% trans "Disk Usage" %}</code></td>
|
||||
<td><span class="bs-badge badge-success">{{ diskInMB }} (MB)</span></td>
|
||||
<td><span class="bs-badge badge-success">{{ diskInMBTotal }} (MB)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>{% trans "Bandwidth Usage" %}</code></td>
|
||||
<td><span class="bs-badge badge-success">{{ bwInMB }} (MB)</span></td>
|
||||
<td><span class="bs-badge badge-success">{{ bwInMBTotal }} (MB)</span></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div class="example-box-wrapper">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Disk Usage" %}
|
||||
</h3>
|
||||
<div class="progressbar" data-value="{{ diskUsage }}">
|
||||
<div class="progressbar-value bg-primary">
|
||||
<div class="progress-overlay"></div>
|
||||
<div class="progress-label">{{ diskUsage }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="title-hero">
|
||||
{% trans "Bandwidth Usage" %}
|
||||
</h3>
|
||||
<div class="progressbar" data-value="{{ bwUsage }}">
|
||||
<div class="progressbar-value bg-primary">
|
||||
<div class="progress-overlay"></div>
|
||||
<div class="progress-label">{{ bwUsage }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Logs" %} <img ng-hide="logFileLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<a ng-click="fetchLogs(1)" href="" title="{% trans 'Load Access Logs' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Access Logs" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<a ng-click="fetchLogs(2)" href="" title="{% trans 'Load Error Logs' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Error Logs" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<form ng-hide="hideLogs" class="form-horizontal bordered-row">
|
||||
|
||||
<div ng-hide="logsFeteched" class="alert alert-success">
|
||||
<p>{% trans "Logs Fetched" %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotFetchLogs" class="alert alert-danger">
|
||||
<p>{% trans "Could not fetch logs, see the logs file through command line. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div ng-hide="fetchedData" class="form-group">
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input placeholder="Search..." ng-model="logSearch" name="dom" type="text" class="form-control" ng-model="domainNameCreate" required>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<input placeholder="Page Number" type="number" class="form-control" ng-model="pageNumber" required>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<button ng-click="fetchLogs(3)" type="button" class="btn ra-100 btn-purple">{% trans "Next" %}</button>
|
||||
<button ng-click="fetchLogs(4)" type="button" class="btn ra-100 btn-purple">{% trans "Previous" %}</button>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1%;" class=" col-sm-1">
|
||||
<a ng-click="hidelogsbtn()" href=""><img src="/static/images/close-32.png"></a>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Domain</th>
|
||||
<th>IP Address</th>
|
||||
<th>Time</th>
|
||||
<th>Resource</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="record in records | filter:logSearch">
|
||||
<td ng-bind="record.domain"></td>
|
||||
<td ng-bind="record.ipAddress"></td>
|
||||
<td ng-bind="record.time"></td>
|
||||
<td ng-bind="record.resource"></td>
|
||||
<td ng-bind="record.size"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Configurations" %} <img ng-hide="configFileLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<a ng-click="fetchConfigurations()" href="" title="{% trans 'Edit Virtual Host Main Configurations' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Edit vHost Main Configurations" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a ng-click="fetchRewriteFules()" href="" title="{% trans 'Add Rewrite Rules (.htaccess)' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Add Rewrite Rules (.htaccess)" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a ng-click="addSSL()" href="" title="{% trans 'Add Your Own SSL' %}" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Add SSL" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!---- HTML for main ssl file ---->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<form ng-hide="hidsslconfigs" class="form-horizontal bordered-row">
|
||||
|
||||
<div ng-hide="sslSaved" class="alert alert-success">
|
||||
<p>{% trans "SSL Saved" %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotSaveSSL" class="alert alert-danger">
|
||||
<p>{% trans "Could not save SSL. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</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>
|
||||
<div class="col-sm-6">
|
||||
<textarea placeholder="Paste Your Cert" ng-model="cert" rows="10" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<textarea placeholder="Paste Your Key" ng-model="key" rows="10" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="saveSSL()" class="btn btn-primary btn-lg btn-block">{% trans "Save" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!----- HTML For SSL
|
||||
|
||||
|
||||
<!---- HTML for main conf file ---->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<form ng-hide="configurationsBox" class="form-horizontal bordered-row">
|
||||
|
||||
<div ng-hide="configsFetched" class="alert alert-success">
|
||||
<p>{% trans "Current configuration in the file fetched." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotFetchConfigs" class="alert alert-danger">
|
||||
<p>{% trans "Could not fetch current configuration. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="configSaved" class="alert alert-success">
|
||||
<p>{% trans "Configuration saved. Restart LiteSpeed put them in effect." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="couldNotSaveConfigurations" class="alert alert-danger">
|
||||
<p>{% trans "Could not fetch current configuration. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="fetchedConfigsData" class="form-group">
|
||||
<div style="margin-bottom: 1%;" class="col-sm-offset-11 col-sm-1">
|
||||
<a ng-click="hideconfigbtn()" href=""><img src="/static/images/close-32.png"></a>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<textarea ng-model="configData" rows="20" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="saveConfigBtn" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="saveCongiruations()" class="btn btn-primary btn-lg btn-block">{% trans "Save" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!---- HTML For rewrite rules----->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<form ng-hide="configurationsBoxRewrite" class="form-horizontal bordered-row">
|
||||
|
||||
<div ng-hide="rewriteRulesFetched" class="alert alert-success">
|
||||
<p>{% trans "Current rewrite rules in the file fetched." %}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotFetchRewriteRules" class="alert alert-danger">
|
||||
<p>{% trans "Could not fetch current rewrite rules. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="rewriteRulesSaved" class="alert alert-success">
|
||||
<p>{% trans "Configuration saved. Restart LiteSpeed put them in effect." %}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="couldNotSaveRewriteRules" class="alert alert-danger">
|
||||
<p>{% trans "Could not save rewrite rules. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="fetchedRewriteRules" class="form-group">
|
||||
<div style="margin-bottom: 1%;" class="col-sm-offset-11 col-sm-1">
|
||||
<a ng-click="hideRewriteRulesbtn()" href=""><img src="/static/images/close-32.png"></a>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<textarea ng-model="rewriteRules" rows="10" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="saveRewriteRulesBTN" class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<button type="button" ng-click="saveRewriteRules()" class="btn btn-primary btn-lg btn-block">{% trans "Save Rewrite Rules" %}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Files" %}
|
||||
</h3>
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{$ fileManagerURL $}" target="_blank" title="{% trans 'File Manager" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "File Manager" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'createFTPAccount' %}" title="{% trans 'Create FTP Account" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Create FTP Account" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{% url 'deleteFTPAccount' %}" title="{% trans 'Delete FTP Account" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Delete FTP Account" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-hero">
|
||||
{% trans "Application Installer" %} <img ng-hide="applicationInstallerLoading" src="/static/images/loading.gif">
|
||||
</h3>
|
||||
|
||||
<div class="example-box-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<a ng-click="installationDetails()" href="" title="{% trans 'Install wordpress with LSCache" class="tile-box tile-box-shortcut btn-primary">
|
||||
<div class="tile-header">
|
||||
{% trans "Wordpress with LSCache" %}
|
||||
</div>
|
||||
<div class="tile-content-wrapper">
|
||||
<i class="glyph-icon icon-dashboard"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-hide="installationDetailsForm" class="col-md-12">
|
||||
<form action="/" class="form-horizontal bordered-row">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Path" %}</label>
|
||||
<div class="col-sm-9">
|
||||
<input placeholder="Leave emtpy to install in website home directory. (Without preceding slash)" type="text" name="path" class="form-control" ng-model="installPath" 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="installWordpress()" class="btn btn-primary btn-lg btn-block">Install Wordpress</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
<div ng-hide="installationFailed" class="alert alert-danger">
|
||||
<p>{% trans "Installation failed. Error message:" %} {$ errorMessage $}</p>
|
||||
</div>
|
||||
|
||||
<div ng-hide="installationSuccessfull" class="alert alert-success">
|
||||
<p>{% trans "Installation successful. To complete the setup visit:" %} {$ installationURL $}</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div ng-hide="couldNotConnect" class="alert alert-danger">
|
||||
<p>{% trans "Could not connect to server. Please refresh this page." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="alert alert-danger">
|
||||
<p>{{ domain }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
6
websiteFunctions/tests.py
Normal file
6
websiteFunctions/tests.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
72
websiteFunctions/urls.py
Normal file
72
websiteFunctions/urls.py
Normal file
@@ -0,0 +1,72 @@
|
||||
from django.conf.urls import url
|
||||
import views
|
||||
from filemanager_app import views as fm
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.loadWebsitesHome, name='loadWebsitesHome'),
|
||||
url(r'^createWebsite', views.createWebsite, name='createWebsite'),
|
||||
url(r'^listWebsites', views.listWebsites, name='listWebsites'),
|
||||
url(r'^modifyWebsite', views.modifyWebsite, name='modifyWebsite'),
|
||||
url(r'^deleteWebsite', views.deleteWebsite, name='deleteWebsite'),
|
||||
url(r'^siteState', views.siteState, name='siteState'),
|
||||
|
||||
|
||||
# Website modification url
|
||||
|
||||
|
||||
url(r'^submitWebsiteCreation', views.submitWebsiteCreation, name='submitWebsiteCreation'),
|
||||
url(r'^submitWebsiteDeletion', views.submitWebsiteDeletion, name='submitWebsiteDeletion'),
|
||||
url(r'^submitWebsiteListing', views.getFurtherAccounts, name='submitWebsiteListing'),
|
||||
url(r'^submitWebsiteModification', views.deleteWebsite, name='submitWebsiteModification'),
|
||||
url(r'^submitWebsiteStatus', views.submitWebsiteStatus, name='submitWebsiteStatus'),
|
||||
|
||||
|
||||
url(r'^getWebsiteDetails', views.submitWebsiteModify, name='getWebsiteDetails'),
|
||||
url(r'^saveWebsiteChanges', views.saveWebsiteChanges, name='saveWebsiteChanges'),
|
||||
|
||||
|
||||
url(r'^(?P<domain>([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.domain, name='domain'),
|
||||
url(r'^getDataFromLogFile', views.getDataFromLogFile, name='getDataFromLogFile'),
|
||||
|
||||
|
||||
url(r'^installWordpress', views.installWordpress, name='installWordpress'),
|
||||
|
||||
url(r'^getDataFromConfigFile', views.getDataFromConfigFile, name='getDataFromConfigFile'),
|
||||
|
||||
url(r'^saveConfigsToFile', views.saveConfigsToFile, name='saveConfigsToFile'),
|
||||
|
||||
|
||||
url(r'^getRewriteRules', views.getRewriteRules, name='getRewriteRules'),
|
||||
|
||||
url(r'^saveRewriteRules', views.saveRewriteRules, name='saveRewriteRules'),
|
||||
|
||||
url(r'^saveSSL', views.saveSSL, name='saveSSL'),
|
||||
|
||||
|
||||
url(r'^CreateWebsiteFromBackup', views.CreateWebsiteFromBackup, name='CreateWebsiteFromBackup'),
|
||||
|
||||
|
||||
|
||||
|
||||
url(r'^filemanager/(?P<domain>([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?)$', views.filemanager,name='filemanager'),
|
||||
|
||||
## File manager urls
|
||||
|
||||
url(r'^filemanager/list', fm.list_),
|
||||
url(r'^filemanager/rename', fm.rename),
|
||||
url(r'^filemanager/move', fm.move),
|
||||
url(r'^filemanager/copy', fm.copy),
|
||||
url(r'^filemanager/remove', fm.remove),
|
||||
url(r'^filemanager/edit', fm.edit),
|
||||
url(r'^filemanager/getContent', fm.getContent),
|
||||
url(r'^filemanager/createFolder', fm.createFolder),
|
||||
url(r'^filemanager/changePermissions', fm.changePermissions),
|
||||
url(r'^filemanager/compress', fm.compress),
|
||||
url(r'^filemanager/extract', fm.extract),
|
||||
url(r'^filemanager/downloadMultiple', fm.downloadMultiple),
|
||||
url(r'^filemanager/download', fm.download),
|
||||
url(r'^filemanager/upload', fm.upload),
|
||||
|
||||
|
||||
]
|
||||
BIN
websiteFunctions/urls.pyc
Normal file
BIN
websiteFunctions/urls.pyc
Normal file
Binary file not shown.
1349
websiteFunctions/views.py
Normal file
1349
websiteFunctions/views.py
Normal file
File diff suppressed because it is too large
Load Diff
BIN
websiteFunctions/views.pyc
Normal file
BIN
websiteFunctions/views.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user