order phase 2
This commit is contained in:
parent
ef57acb3cb
commit
a43d2104ef
22 changed files with 500 additions and 85 deletions
|
@ -38,6 +38,9 @@ moment.init_app(app)
|
||||||
from .main import main as main_blueprint
|
from .main import main as main_blueprint
|
||||||
app.register_blueprint(main_blueprint)
|
app.register_blueprint(main_blueprint)
|
||||||
|
|
||||||
|
from .panel import panel as panel_blueprint
|
||||||
|
app.register_blueprint(panel_blueprint, url_prefix='/panel')
|
||||||
|
|
||||||
from .auth import auth as auth_blueprint
|
from .auth import auth as auth_blueprint
|
||||||
app.register_blueprint(auth_blueprint, url_prefix='/auth')
|
app.register_blueprint(auth_blueprint, url_prefix='/auth')
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,6 @@ def dashboard(user_pid=0):
|
||||||
status = { unit_id : query['status'] }
|
status = { unit_id : query['status'] }
|
||||||
statuses.update(status)
|
statuses.update(status)
|
||||||
current_app.logger.info('[{}] Enabled deployments: {}, services: {}, domains: {}, bridges: {}, addresses: {}'.format(cuser.email, inv_deployments_list, inv_services_list, inv_domains_list, inv_bridges_list, inv_addresses_list))
|
current_app.logger.info('[{}] Enabled deployments: {}, services: {}, domains: {}, bridges: {}, addresses: {}'.format(cuser.email, inv_deployments_list, inv_services_list, inv_domains_list, inv_bridges_list, inv_addresses_list))
|
||||||
return render_template('main/dashboard.html', rrd=rrd, status=statuses, inv_deployments=inv_deployments, inv_legacy=inv_legacy, inv_services=inv_services, inv_domains=inv_domains, inv_bridges=inv_bridges, inv_addresses=inv_addresses, regions=regions)
|
return render_template('panel/dashboard.html', rrd=rrd, status=statuses, inv_deployments=inv_deployments, inv_legacy=inv_legacy, inv_services=inv_services, inv_domains=inv_domains, inv_bridges=inv_bridges, inv_addresses=inv_addresses, regions=regions)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ def login():
|
||||||
send_email(current_app.config['MAIL_USERNAME'], user.email + ' logged in.', 'auth/email/adm_loginnotify', user=user, ipaddr=lastip )
|
send_email(current_app.config['MAIL_USERNAME'], user.email + ' logged in.', 'auth/email/adm_loginnotify', user=user, ipaddr=lastip )
|
||||||
#flash('Last Login: {} from {}'.format(user.last_seen.strftime("%a %d %B %Y %H:%M"), previp))
|
#flash('Last Login: {} from {}'.format(user.last_seen.strftime("%a %d %B %Y %H:%M"), previp))
|
||||||
flash('Last Login: {}'.format(user.last_seen.strftime("%a %d %B %Y %H:%M")))
|
flash('Last Login: {}'.format(user.last_seen.strftime("%a %d %B %Y %H:%M")))
|
||||||
return redirect(request.args.get('next') or url_for('main.dashboard'))
|
return redirect(request.args.get('next') or url_for('panel.dashboard'))
|
||||||
else:
|
else:
|
||||||
flash('Invalid username or password.')
|
flash('Invalid username or password.')
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ def twofactor():
|
||||||
db.session.add(user)
|
db.session.add(user)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
#send_email(current_app.config['MAIL_USERNAME'], user.email + ' logged in.', 'auth/email/adm_loginnotify', user=user, ipaddr=lastip )
|
#send_email(current_app.config['MAIL_USERNAME'], user.email + ' logged in.', 'auth/email/adm_loginnotify', user=user, ipaddr=lastip )
|
||||||
return redirect(request.args.get('next') or url_for('main.dashboard'))
|
return redirect(request.args.get('next') or url_for('panel.dashboard'))
|
||||||
else:
|
else:
|
||||||
flash('Invalid token.')
|
flash('Invalid token.')
|
||||||
return render_template('auth/2fa.html', page=page, form=form)
|
return render_template('auth/2fa.html', page=page, form=form)
|
||||||
|
|
|
@ -19,7 +19,7 @@ def after_request(response):
|
||||||
#STATIC PAGES
|
#STATIC PAGES
|
||||||
@main.route("/", methods=['GET'])
|
@main.route("/", methods=['GET'])
|
||||||
def index():
|
def index():
|
||||||
allservers = Server.query.all()
|
allservers = Server.query.filter_by(enabled=True)
|
||||||
return render_template('main/index.html', servers=allservers)
|
return render_template('main/index.html', servers=allservers)
|
||||||
|
|
||||||
@main.route("/chat", methods=['GET'])
|
@main.route("/chat", methods=['GET'])
|
||||||
|
@ -54,64 +54,3 @@ def market(group_id=0):
|
||||||
abort(404)
|
abort(404)
|
||||||
return render_template('main/marketgroup.html', groupname=allgroups[group_id], products=filtered_products)
|
return render_template('main/marketgroup.html', groupname=allgroups[group_id], products=filtered_products)
|
||||||
|
|
||||||
#DASHBOARD
|
|
||||||
@main.route("/dashboard", methods=['GET', 'POST'])
|
|
||||||
@login_required
|
|
||||||
def dashboard():
|
|
||||||
sys_regions = Region.query.all()
|
|
||||||
|
|
||||||
cuser = current_user
|
|
||||||
inv_bridges = cuser.inv_bridges.order_by(Bridge.bridge_id.asc()).all()
|
|
||||||
inv_addresses = cuser.inv_addresses.order_by(Address.ip.asc()).all()
|
|
||||||
inv_routers = cuser.inv_routers.order_by(Router.date_created.asc()).all()
|
|
||||||
inv_deployments = cuser.inv_deployments.filter_by(deleted=False).order_by(Deployment.date_created.desc()).all()
|
|
||||||
inv_legacy = cuser.inv_deployments.filter_by(deleted=False).filter_by(bridge_id=None).order_by(Deployment.date_created.desc()).all()
|
|
||||||
|
|
||||||
regions = {}
|
|
||||||
for region in sys_regions:
|
|
||||||
regions[region.pid] = region.description
|
|
||||||
|
|
||||||
inv_deploycubeids = []
|
|
||||||
for invcls in inv_deployments:
|
|
||||||
if invcls.user_id == cuser.pid:
|
|
||||||
inv_deploycubeids.extend([invcls.machine_id])
|
|
||||||
for invcls in inv_legacy:
|
|
||||||
if invcls.user_id == cuser.pid:
|
|
||||||
inv_deploycubeids.extend([invcls.machine_id])
|
|
||||||
|
|
||||||
inv_services = cuser.inv_services.filter_by(deleted=False).order_by(Service.date_last_charge.asc()).all()
|
|
||||||
inv_domains = cuser.inv_domains.filter_by(deleted=False).order_by(Domain.date_created.desc()).all()
|
|
||||||
|
|
||||||
#extract rrd and status from the deployments
|
|
||||||
rrd = {}
|
|
||||||
statuses = {}
|
|
||||||
#current_app.logger.warning(str(inv_deploycubeids))
|
|
||||||
for unit_id in inv_deploycubeids:
|
|
||||||
rrd[unit_id] = {}
|
|
||||||
data = { 'unit_id': int(unit_id),
|
|
||||||
'type': 'kvm' }
|
|
||||||
try:
|
|
||||||
query = contact_proxmaster(data, 'vmrrd')
|
|
||||||
except Exception as e:
|
|
||||||
current_app.logger.error(e)
|
|
||||||
flash('Support is notified.'.format(str(unit_id)))
|
|
||||||
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
|
||||||
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
|
||||||
#current_app.logger.info('debug query:')
|
|
||||||
#current_app.logger.info(query)
|
|
||||||
|
|
||||||
graphs_list = ['net', 'cpu', 'mem', 'hdd']
|
|
||||||
try:
|
|
||||||
for graph in graphs_list:
|
|
||||||
raw = query[graph]['image'].encode('raw_unicode_escape')
|
|
||||||
rrd[unit_id][graph] = base64.b64encode(raw).decode()
|
|
||||||
status = { unit_id : query['status'] }
|
|
||||||
statuses.update(status)
|
|
||||||
except Exception as e:
|
|
||||||
current_app.logger.error(e)
|
|
||||||
flash('Support is notified.'.format(str(unit_id)))
|
|
||||||
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
|
||||||
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
|
||||||
|
|
||||||
return render_template('main/dashboard.html', sys_regions=sys_regions, inv_bridges=inv_bridges, inv_deployments=inv_deployments, inv_legacy=inv_legacy, inv_services=inv_services, inv_domains=inv_domains, inv_addresses=inv_addresses, rrd=rrd, status=statuses, regions=regions)
|
|
||||||
|
|
||||||
|
|
|
@ -249,8 +249,11 @@ class Server(db.Model):
|
||||||
user_id = db.Column(db.ForeignKey('users.pid')) #FK
|
user_id = db.Column(db.ForeignKey('users.pid')) #FK
|
||||||
region_id = db.Column(db.ForeignKey('regions.pid')) #FK
|
region_id = db.Column(db.ForeignKey('regions.pid')) #FK
|
||||||
|
|
||||||
|
enabled = db.Column(db.Boolean)
|
||||||
name = db.Column(db.String)
|
name = db.Column(db.String)
|
||||||
description = db.Column(db.String)
|
cpu = db.Column(db.String)
|
||||||
|
mem = db.Column(db.String)
|
||||||
|
hdd = db.Column(db.String)
|
||||||
address = db.Column(db.String)
|
address = db.Column(db.String)
|
||||||
|
|
||||||
class Bridge(db.Model):
|
class Bridge(db.Model):
|
||||||
|
|
3
app/panel/__init__.py
Normal file
3
app/panel/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from flask import Blueprint
|
||||||
|
panel = Blueprint('panel', __name__)
|
||||||
|
from . import routes
|
14
app/panel/forms.py
Normal file
14
app/panel/forms.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
from flask_wtf import FlaskForm
|
||||||
|
from wtforms import StringField, PasswordField, BooleanField, SubmitField, SelectField, DecimalField
|
||||||
|
from wtforms import validators, ValidationError
|
||||||
|
from wtforms.fields.html5 import EmailField, DecimalRangeField
|
||||||
|
|
||||||
|
from .. import db
|
||||||
|
|
||||||
|
class OrderForm(FlaskForm):
|
||||||
|
cpu = DecimalRangeField('Processor Cores', default=2)
|
||||||
|
memory = DecimalRangeField('Memory', default=512)
|
||||||
|
storage = DecimalRangeField('Storage', default=20)
|
||||||
|
alias = StringField('Machine Alias:', [validators.Regexp(message='ex.: myservice1.com, myservice2.local', regex='^[a-zA-Z0-9][a-zA-Z0-9-_]{0,61}[a-zA-Z0-9]{0,1}\.([a-zA-Z]{1,6}|[a-zA-Z0-9-]{1,30}\.[a-zA-Z]{2,3})$'), validators.Length(6,64)])
|
||||||
|
submit = SubmitField('Create')
|
||||||
|
|
87
app/panel/routes.py
Normal file
87
app/panel/routes.py
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
from flask import render_template, abort, redirect, url_for, abort, flash, request, current_app, make_response, g
|
||||||
|
from flask_login import login_required, login_user, logout_user, current_user
|
||||||
|
from flask_sqlalchemy import get_debug_queries
|
||||||
|
|
||||||
|
from . import panel
|
||||||
|
from .forms import OrderForm
|
||||||
|
from .. import db
|
||||||
|
from ..email import send_email
|
||||||
|
from ..models import User, Permission, Server, Deployment, Service, Region, Address, Bridge, Router, Domain, contact_proxmaster
|
||||||
|
|
||||||
|
import base64
|
||||||
|
|
||||||
|
@panel.after_app_request
|
||||||
|
def after_request(response):
|
||||||
|
for query in get_debug_queries():
|
||||||
|
if query.duration >= current_app.config['SLOW_DB_QUERY_TIME']:
|
||||||
|
current_app.logger.warning('Slow query: %s\nParameters: %s\nDuration: %fs\nContext: %s\n' % (query.statement, query.parameters, query.duration, query.context))
|
||||||
|
return response
|
||||||
|
|
||||||
|
@panel.route("/order", methods=['GET', 'POST'])
|
||||||
|
def order():
|
||||||
|
form = OrderForm()
|
||||||
|
if form.validate_on_submit():
|
||||||
|
return redirect('main.index')
|
||||||
|
return render_template('panel/order.html', form=form)
|
||||||
|
|
||||||
|
#DASHBOARD
|
||||||
|
@panel.route("/dashboard", methods=['GET', 'POST'])
|
||||||
|
@login_required
|
||||||
|
def dashboard():
|
||||||
|
sys_regions = Region.query.all()
|
||||||
|
|
||||||
|
cuser = current_user
|
||||||
|
inv_bridges = cuser.inv_bridges.order_by(Bridge.bridge_id.asc()).all()
|
||||||
|
inv_addresses = cuser.inv_addresses.order_by(Address.ip.asc()).all()
|
||||||
|
inv_routers = cuser.inv_routers.order_by(Router.date_created.asc()).all()
|
||||||
|
inv_deployments = cuser.inv_deployments.filter_by(deleted=False).order_by(Deployment.date_created.desc()).all()
|
||||||
|
inv_legacy = cuser.inv_deployments.filter_by(deleted=False).filter_by(bridge_id=None).order_by(Deployment.date_created.desc()).all()
|
||||||
|
|
||||||
|
regions = {}
|
||||||
|
for region in sys_regions:
|
||||||
|
regions[region.pid] = region.description
|
||||||
|
|
||||||
|
inv_deploycubeids = []
|
||||||
|
for invcls in inv_deployments:
|
||||||
|
if invcls.user_id == cuser.pid:
|
||||||
|
inv_deploycubeids.extend([invcls.machine_id])
|
||||||
|
for invcls in inv_legacy:
|
||||||
|
if invcls.user_id == cuser.pid:
|
||||||
|
inv_deploycubeids.extend([invcls.machine_id])
|
||||||
|
|
||||||
|
inv_services = cuser.inv_services.filter_by(deleted=False).order_by(Service.date_last_charge.asc()).all()
|
||||||
|
inv_domains = cuser.inv_domains.filter_by(deleted=False).order_by(Domain.date_created.desc()).all()
|
||||||
|
|
||||||
|
#extract rrd and status from the deployments
|
||||||
|
rrd = {}
|
||||||
|
statuses = {}
|
||||||
|
#current_app.logger.warning(str(inv_deploycubeids))
|
||||||
|
for unit_id in inv_deploycubeids:
|
||||||
|
rrd[unit_id] = {}
|
||||||
|
data = { 'unit_id': int(unit_id),
|
||||||
|
'type': 'kvm' }
|
||||||
|
try:
|
||||||
|
query = contact_proxmaster(data, 'vmrrd')
|
||||||
|
except Exception as e:
|
||||||
|
current_app.logger.error(e)
|
||||||
|
flash('Support is notified.'.format(str(unit_id)))
|
||||||
|
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
||||||
|
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
||||||
|
#current_app.logger.info('debug query:')
|
||||||
|
#current_app.logger.info(query)
|
||||||
|
|
||||||
|
graphs_list = ['net', 'cpu', 'mem', 'hdd']
|
||||||
|
try:
|
||||||
|
for graph in graphs_list:
|
||||||
|
raw = query[graph]['image'].encode('raw_unicode_escape')
|
||||||
|
rrd[unit_id][graph] = base64.b64encode(raw).decode()
|
||||||
|
status = { unit_id : query['status'] }
|
||||||
|
statuses.update(status)
|
||||||
|
except Exception as e:
|
||||||
|
current_app.logger.error(e)
|
||||||
|
flash('Support is notified.'.format(str(unit_id)))
|
||||||
|
send_email(current_app.config['MAIL_USERNAME'], 'Cube {} is unreachable'.format(unit_id),
|
||||||
|
'vmanager/email/adm_unreachable', user=current_user, unit_id=unit_id, error=str(e))
|
||||||
|
|
||||||
|
return render_template('panel/dashboard.html', sys_regions=sys_regions, inv_bridges=inv_bridges, inv_deployments=inv_deployments, inv_legacy=inv_legacy, inv_services=inv_services, inv_domains=inv_domains, inv_addresses=inv_addresses, rrd=rrd, status=statuses, regions=regions)
|
||||||
|
|
|
@ -77,6 +77,6 @@ def activate(itemid=0):
|
||||||
if owner.is_administrator:
|
if owner.is_administrator:
|
||||||
return redirect(url_for('admin.list_services'))
|
return redirect(url_for('admin.list_services'))
|
||||||
else:
|
else:
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
return render_template('smanager/activate.html', form=form, service=service, ppm=ppm, total=(ppm * service.period), currency=owner.currency)
|
return render_template('smanager/activate.html', form=form, service=service, ppm=ppm, total=(ppm * service.period), currency=owner.currency)
|
||||||
|
|
||||||
|
|
86
app/static/css/range.css
Normal file
86
app/static/css/range.css
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
input[type=range] {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
width: 100%;
|
||||||
|
margin: 13.8px 0;
|
||||||
|
}
|
||||||
|
input[type=range]:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
input[type=range]::-webkit-slider-runnable-track {
|
||||||
|
width: 100%;
|
||||||
|
height: 8.4px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
background: #3071a9;
|
||||||
|
border-radius: 1.3px;
|
||||||
|
border: 0.2px solid #010101;
|
||||||
|
}
|
||||||
|
input[type=range]::-webkit-slider-thumb {
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
border: 1px solid #000000;
|
||||||
|
height: 36px;
|
||||||
|
width: 16px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #f8ffff;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin-top: -14px;
|
||||||
|
}
|
||||||
|
input[type=range]:focus::-webkit-slider-runnable-track {
|
||||||
|
background: #367ebd;
|
||||||
|
}
|
||||||
|
input[type=range]::-moz-range-track {
|
||||||
|
width: 100%;
|
||||||
|
height: 8.4px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
background: #3071a9;
|
||||||
|
border-radius: 1.3px;
|
||||||
|
border: 0.2px solid #010101;
|
||||||
|
}
|
||||||
|
input[type=range]::-moz-range-thumb {
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
border: 1px solid #000000;
|
||||||
|
height: 36px;
|
||||||
|
width: 16px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #f8ffff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
input[type=range]::-ms-track {
|
||||||
|
width: 100%;
|
||||||
|
height: 8.4px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: transparent;
|
||||||
|
border-color: transparent;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
input[type=range]::-ms-fill-lower {
|
||||||
|
background: #2a6495;
|
||||||
|
border: 0.2px solid #010101;
|
||||||
|
border-radius: 2.6px;
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
}
|
||||||
|
input[type=range]::-ms-fill-upper {
|
||||||
|
background: #3071a9;
|
||||||
|
border: 0.2px solid #010101;
|
||||||
|
border-radius: 2.6px;
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
}
|
||||||
|
input[type=range]::-ms-thumb {
|
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
|
||||||
|
border: 1px solid #000000;
|
||||||
|
height: 36px;
|
||||||
|
width: 16px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #f8ffff;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 8.4px;
|
||||||
|
}
|
||||||
|
input[type=range]:focus::-ms-fill-lower {
|
||||||
|
background: #3071a9;
|
||||||
|
}
|
||||||
|
input[type=range]:focus::-ms-fill-upper {
|
||||||
|
background: #367ebd;
|
||||||
|
}
|
||||||
|
|
BIN
app/static/images/server.png
Normal file
BIN
app/static/images/server.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
<div class="panel-heading">Transactions</div>
|
<div class="panel-heading">Servers</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
@ -15,7 +15,9 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>CPU</th>
|
||||||
|
<th>MEM</th>
|
||||||
|
<th>HDD</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<th>Region</th>
|
<th>Region</th>
|
||||||
<th>Seller</th>
|
<th>Seller</th>
|
||||||
|
@ -26,7 +28,9 @@
|
||||||
{% for server in servers %}
|
{% for server in servers %}
|
||||||
<tr class="default">
|
<tr class="default">
|
||||||
<td>{{ server.name }}</td>
|
<td>{{ server.name }}</td>
|
||||||
<td>{{ server.description }}</td>
|
<td>{{ server.cpu }}</td>
|
||||||
|
<td>{{ server.mem }}</td>
|
||||||
|
<td>{{ server.hdd }}</td>
|
||||||
<td>{{ server.address }}</td>
|
<td>{{ server.address }}</td>
|
||||||
<td>{{ server.region.name }}</td>
|
<td>{{ server.region.name }}</td>
|
||||||
<td><a href="{{ url_for('admin.dashboard', user_pid=server.owner.pid) }}">{{ server.owner.email }}</a></td>
|
<td><a href="{{ url_for('admin.dashboard', user_pid=server.owner.pid) }}">{{ server.owner.email }}</a></td>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<link href="{{ url_for('static', filename='css/navbar.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/navbar.css') }}" rel="stylesheet">
|
||||||
<link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet">
|
||||||
|
<link href="{{ url_for('static', filename='css/range.css') }}" rel="stylesheet">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
<div class="footerblock" style="float: right;" align="right">
|
<div class="footerblock" style="float: right;" align="right">
|
||||||
<h4>Contact</h4>
|
<h4>Contact</h4>
|
||||||
<p>52 Volga str.<br>4002 Plovdiv, Bulgaria</p>
|
|
||||||
<p>tel: +359 (0) 32 398 295 <br /> email: <a href="mailto:office@datapoint.bg">office@datapoint.bg</a></p>
|
<p>tel: +359 (0) 32 398 295 <br /> email: <a href="mailto:office@datapoint.bg">office@datapoint.bg</a></p>
|
||||||
<p><a href="https://www.facebook.com/datapoint.bg/" target="_blank"><img src="{{ url_for('static', filename='images/fb.png') }}"></a></p>
|
<p><a href="https://www.facebook.com/datapoint.bg/" target="_blank"><img src="{{ url_for('static', filename='images/fb.png') }}"></a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -86,6 +86,16 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="panel panel-primary panel-transparent">
|
<div class="panel panel-primary panel-transparent">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<img src="../../static/images/server.png" width="80%"><br /><br />
|
||||||
|
<a href="/chat"><button type="button" class="btn btn-lg btn-success">Order VPS</button></a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
Alias: <b>{{ server.name }}</b><br />
|
||||||
|
Processor: <b>{{ server.cpu }}</b><br />
|
||||||
|
Memory: <b>{{ server.mem }}</b><br />
|
||||||
|
Storage: <b>{{ server.hdd }}</b><br />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -108,7 +118,7 @@
|
||||||
<img src="../../static/images/VPS-Support.png" width="128" height="128" />
|
<img src="../../static/images/VPS-Support.png" width="128" height="128" />
|
||||||
<h2 class="media-heading">Поддръжка</h2>
|
<h2 class="media-heading">Поддръжка</h2>
|
||||||
<p>Ще Ви помогнем във всички неприятни ситуации, по всяко време. </p>
|
<p>Ще Ви помогнем във всички неприятни ситуации, по всяко време. </p>
|
||||||
<a href="/chat"><button type="button" class="btn btn-success">Support</button></a>
|
<a href="/chat"><button type="button" class="btn btn-lg btn-success">Support</button></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{% if not current_user.is_authenticated %}
|
{% if not current_user.is_authenticated %}
|
||||||
<a class="navbar-brand" href="{{ url_for('main.index') }}" rel="home"></a>
|
<a class="navbar-brand" href="{{ url_for('main.index') }}" rel="home"></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="navbar-brand" href="{{ url_for('main.dashboard') }}" rel="home"></a>
|
<a class="navbar-brand" href="{{ url_for('panel.dashboard') }}" rel="home"></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img class="avatar" src="{{ current_user.gravatar(20) }}"> {{ current_user.email }} <span class="caret"></span></a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img class="avatar" src="{{ current_user.gravatar(20) }}"> {{ current_user.email }} <span class="caret"></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="{{ url_for('main.dashboard') }}"><span class="glyphicon glyphicon-modal-window"></span> Dashboard</a></li>
|
<li><a href="{{ url_for('panel.dashboard') }}"><span class="glyphicon glyphicon-modal-window"></span> Dashboard</a></li>
|
||||||
<li><a href="{{ url_for('uinvoice.transactions') }}"><span class="glyphicon glyphicon-list-alt"></span> Transactions</a></li>
|
<li><a href="{{ url_for('uinvoice.transactions') }}"><span class="glyphicon glyphicon-list-alt"></span> Transactions</a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li><a href="{{ url_for('settings.profile') }}"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
|
<li><a href="{{ url_for('settings.profile') }}"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
|
||||||
|
|
|
@ -146,7 +146,7 @@ addEventListener("DOMContentLoaded", function() {
|
||||||
<div class="panel-body"><p>
|
<div class="panel-body"><p>
|
||||||
<div class="panel-group" id="deploycubes" role="tablist" aria-multiselectable="true">
|
<div class="panel-group" id="deploycubes" role="tablist" aria-multiselectable="true">
|
||||||
{% for deploy in bridge.inv_deployments %}
|
{% for deploy in bridge.inv_deployments %}
|
||||||
{% include "main/vdc_pool.html" %}
|
{% include "panel/vdc_pool.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -161,7 +161,7 @@ addEventListener("DOMContentLoaded", function() {
|
||||||
<div class="panel-body"><p>
|
<div class="panel-body"><p>
|
||||||
<div class="panel-group" id="deploylegacycubes" role="tablist" aria-multiselectable="true">
|
<div class="panel-group" id="deploylegacycubes" role="tablist" aria-multiselectable="true">
|
||||||
{% for deploy in inv_legacy %}
|
{% for deploy in inv_legacy %}
|
||||||
{% include "main/vdc_pool2.html" %}
|
{% include "panel/vdc_pool2.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -263,7 +263,7 @@ addEventListener("DOMContentLoaded", function() {
|
||||||
<!--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vqeC5sprUnM6LptjsDGy32ltfMv4dUyMQHoAojItudLfz9HE6AldTdj4hrvgsEYru36iypAS+puBs8nb3/doXhPooa6mjGyrodgMxP+pVP/qGDqagaW2N+8tMvn75mcpTauNXUzg1OxzSH++cnRAc1n+mTUzQzsre34xZVNp6kN60HdzMCObzsM/mC6xgumfmZYsd5eIKMfjk9RG9aDX8pj+JgUtsjCOiJDHfBYga/z98tlbcjmkNFeaZTasJb0Ds2gFyHRQE8YeJxx33FeiUpA9qp6rrTJX909i9gfR5AVzGyp6Eato6mftCjhV+4xtLJADlh5ud6cV389kaEO+NQRHxI4PWfR4RPhCJ2eM+jZz30o62M3KmsYRl0TIaqgVFkHK4n15c1+iL7fwgnv5+aiS4gMdchkPddANMa3HOwPR01EeQiis87Zjo9zQquK3P6SmkHkHpymCpyPXadDqOK3CbTB2eLHyyKbQ6rSrCtFYeHE0ieLvf6qzlCciSi3HRpCFofsgb1FDvTlbrz8h8XmDFfdi749dgrh31WaR/yoEyLWC6LxWbJ7YBpVt/yB8Or6rX3tAZwN4WNMWx3SbhMr30Oa1g6GPOFhyBbhXeIU1QQmNgIC3OSRDAsj3GdkxXdBXA2UT2JjNELXCdh5uQOuJUbO9UR2oXAleYW2MH96+HIbJ53YuK87RDMQZaKRRJhzpavNedLd5nzXA/gMy8y47sc/B2jW9xOBxwLO1cZ88R3CA9BlQh9UDqLtIDYZ15a3IxMnnjSwUrZu4pTCxjRcZ+PFk9nFx869trt1GvN1Z2sAiHL2tM1LXOfV8uZZOy8FVvBSJXnl0gBHAptQk0JdvWcjfd+SL99JXpt+4MG5tqxZ9bY2Moj1PMtdCP8rI2t2eIM4r6vhkhuBxtdATm9YWSg3qqGtQPrVkOe6l7z2IlJDRsY/RH3PAGTygMgAAAAASUVORK5CYII="> No Public<br />-->
|
<!--<img width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv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GDqagaW2N+8tMvn75mcpTauNXUzg1OxzSH++cnRAc1n+mTUzQzsre34xZVNp6kN60HdzMCObzsM/mC6xgumfmZYsd5eIKMfjk9RG9aDX8pj+JgUtsjCOiJDHfBYga/z98tlbcjmkNFeaZTasJb0Ds2gFyHRQE8YeJxx33FeiUpA9qp6rrTJX909i9gfR5AVzGyp6Eato6mftCjhV+4xtLJADlh5ud6cV389kaEO+NQRHxI4PWfR4RPhCJ2eM+jZz30o62M3KmsYRl0TIaqgVFkHK4n15c1+iL7fwgnv5+aiS4gMdchkPddANMa3HOwPR01EeQiis87Zjo9zQquK3P6SmkHkHpymCpyPXadDqOK3CbTB2eLHyyKbQ6rSrCtFYeHE0ieLvf6qzlCciSi3HRpCFofsgb1FDvTlbrz8h8XmDFfdi749dgrh31WaR/yoEyLWC6LxWbJ7YBpVt/yB8Or6rX3tAZwN4WNMWx3SbhMr30Oa1g6GPOFhyBbhXeIU1QQmNgIC3OSRDAsj3GdkxXdBXA2UT2JjNELXCdh5uQOuJUbO9UR2oXAleYW2MH96+HIbJ53YuK87RDMQZaKRRJhzpavNedLd5nzXA/gMy8y47sc/B2jW9xOBxwLO1cZ88R3CA9BlQh9UDqLtIDYZ15a3IxMnnjSwUrZu4pTCxjRcZ+PFk9nFx869trt1GvN1Z2sAiHL2tM1LXOfV8uZZOy8FVvBSJXnl0gBHAptQk0JdvWcjfd+SL99JXpt+4MG5tqxZ9bY2Moj1PMtdCP8rI2t2eIM4r6vhkhuBxtdATm9YWSg3qqGtQPrVkOe6l7z2IlJDRsY/RH3PAGTygMgAAAAASUVORK5CYII="> No Public<br />-->
|
||||||
|
|
||||||
|
|
||||||
<!--<button class="btn btn-default" onclick="window.open('{{ url_for('main.dashboard') }}','_self')"><span class="glyphicon glyphicon-plus" aria-hiddent="true"></span> Assign</button> -->
|
<!--<button class="btn btn-default" onclick="window.open('{{ url_for('panel.dashboard') }}','_self')"><span class="glyphicon glyphicon-plus" aria-hiddent="true"></span> Assign</button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
59
app/templates/panel/order.html
Normal file
59
app/templates/panel/order.html
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
<script type="text/javascript">
|
||||||
|
function getPeriod()
|
||||||
|
{
|
||||||
|
var period = 0;
|
||||||
|
var periodselect = document.getElementById('period');
|
||||||
|
period = periodselect.value;
|
||||||
|
return period;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateTotal()
|
||||||
|
{
|
||||||
|
//var period = getPeriod();
|
||||||
|
//var tpm = {{ tpm }};
|
||||||
|
//var discount = {{ discount }};
|
||||||
|
//var ppm = {{ ppm }};
|
||||||
|
|
||||||
|
var pricetotal = 0;
|
||||||
|
//pricetotal = period * ppm;
|
||||||
|
var priceselect = document.getElementById('totalPrice');
|
||||||
|
priceselect.innerHTML = "Total: 20";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block title %}Activate deployment{% endblock %}
|
||||||
|
|
||||||
|
{% block page_content %}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="panel panel-info">
|
||||||
|
<div class="panel-heading">Order new deployment</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
<form method="POST" action="{{ url_for('panel.order') }}">
|
||||||
|
{{ form.cpu.label }} {{ form.cpu(min=2, max=16, step=2) }}<br />
|
||||||
|
{{ form.memory.label }} {{ form.memory(min=512, max=16384, step=512) }}<br />
|
||||||
|
{{ form.storage.label }} {{ form.storage(min=10, max=100, step=10) }}<br />
|
||||||
|
|
||||||
|
<div id="totalPrice">Total: "</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ form.csrf_token() }}
|
||||||
|
{{ form.submit }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
105
app/templates/panel/vdc_pool2.html
Normal file
105
app/templates/panel/vdc_pool2.html
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
{% block vdc_pool %}
|
||||||
|
{% if deploy.enabled == False %}
|
||||||
|
<div class="panel panel-danger" style="margin-top: 2px">
|
||||||
|
{% else %}
|
||||||
|
{% if deploy.warning == True %}
|
||||||
|
<div class="panel panel-warning" style="margin-top: 2px">
|
||||||
|
{% else %}
|
||||||
|
<div class="panel panel-success" style="margin-top: 2px">
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<div class="panel-heading" data-toggle="collapse" data-parent="#deploycubes" href="#cube{{ deploy.machine_id }}" aria-expanded="false" aria-controls="cube{{ deploy.machine_id }}" role="tab" id="dpanel{{ deploy.machine_id }}">
|
||||||
|
{% if deploy.protected == True %}<img class="icon icons8-Security-Checked" width="24" height="24" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAADr0lEQVRYheXYzWrbWBQHcD1CHiGPkEfwxtaXm05baDclCels0kWbTRbuJl0EJF1JdnHo1DQQOgstSgqBiJIygY4XwVdXFnUIuKA0H1BIiVrTGmxrrBDnzCJ4SNLYkmzZGWb+cFYG3x+6OkdXoqj/Q+LIHGNl8hsnE4eTiZMQC5k4MseuFUWLxk1OJhqvmN9uZT9UH2r7IOXrIOXr8FDbh1vZD1VeMb9xMtFo0bg5cFAsUxpJSHgymS6usMhw72RL7tzqIaQ3XchZrSsrvenC3Ooh3M6Waiwy3GS6uJKQ8GQsUxqJBMUIeDQh4ckbavE9LWK4/7JcTekOLBrHHVGdatE4hpTuwP2X5SotYrihFt8nJDzJCHg0NIoWjcdJxdxnZdKcXrZr8+uVnlDdsPPrFZhetmusTJq8Qj7RovE4EJYWMcxoe8359UpkIL+aX6/AjLbXpEUMgYDDgl2u/waQR6TSrTMHVelNF3jVPPAFJlVra2GjOnTgwkYVkqq1de3A5VLfwOKblO4MBPfnwSl4JwBr9s+/pXQHkmrxjS8wIeCnj15/HgjufN7tXvz90evPkBDwU18gLRVmZ7S95iBxFRd+2uoHr3Y8WirM+gIZAcfuPt/+MUxczmrB3efbPxgBx3yBsUxpJKpZGBSXswLOwHY4RL5K+XrHha0vpx0X6gUn5evBZmA7vGL+0amT7cqp74LvdluBcaE6uB1aKsxOL9u1y3+0ZvsvvFJugXcSHJezWjCx9LERF/BUYCAj4FEWkSs7udvW9YLLWS1gEWmGPhfyqnnQ6T68CrlmX8R5JwDatj8u9P3XDi0WnnWbh5eR5+OdAKyUg3X6g1c7Hi0WnoUGMgIe5RDxwnRqWFzP29sOrxQtv+fyeWRYXEp3gFeKVk84iqKouICn7gV4qrQPAWFwOasF42nrr1Dde1U4yTgKcvwK0q3na2GjCpxkHPWFC3MVw9btbKnW99Vrh5PN3Sjf8lK6A6xM7EhwFHV2wmERaUbxbrxoHLc7NxYZkKIoilPIi4mlcqNf4MRSucEp5EWkOIo6O4Zxsrnbz+vA3OohsDKxI/s2czlxZI4xyHC7HcW6dS2DDHfgn+USUuEXDhEvDFLK1wdz33VKXMBTQZFSvg4cIl5kIyUMkpeN793GT0p3zrZ12Lh/kMgc4xD5OqPtXRhBi8Yx/Pr7jsdJxtG1fwqOZUojLDLejmesxhPdgSe6A+MZq8Ei4+3AurWXMAKOJVVrK6laW0Nrhn9D/gYrB5WUx8IwEwAAAABJRU5ErkJggg==">{% endif %} <a href="#"><b>{% if status[deploy.machine_id] == 'running' %}<font color="green">{% else %}<font color="red">{% endif %}{{ deploy.machine_alias }}</font></b></a>
|
||||||
|
|
||||||
|
|
||||||
|
</div></div> <!-- end of heading -->
|
||||||
|
<!-- START OF HIDDEN PANEL -->
|
||||||
|
{% if deploy.enabled == False or deploy.warning == True %}
|
||||||
|
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #faebcc; border-top: none; margin-bottom: 10px;">
|
||||||
|
{% else %}
|
||||||
|
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #d6e9c6; border-top: none; margin-bottom: 10px;">
|
||||||
|
{% endif %}
|
||||||
|
<div class="panel-body">
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="active"><a data-toggle="tab" href="#controls{{ deploy.machine_id }}">Control</a></li>
|
||||||
|
<li><a data-toggle="tab" href="#graphs{{ deploy.machine_id }}">Monitoring</a></li>
|
||||||
|
<li><a data-toggle="tab" href="#misc{{ deploy.machine_id }}">Misc.</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content">
|
||||||
|
<div id="controls{{ deploy.machine_id }}" class="tab-pane fade in active">
|
||||||
|
<p><br />
|
||||||
|
{% if deploy.enabled == True %}
|
||||||
|
<img class="icon icons8-Device-Manager" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACl0lEQVRYhe2X70sTcRzHfdhDH/Zn9KAHPrwnejNSwqx01hpBw+1RDyoJrfZk3i0mKerWrtApKJmtQVkSSoPIfbc1vJtzOuFiWeE6QnaJlqbeuydNlj92m/PoBx68nrz5wvfFfd984FNSUuSnYwi1Xyirv7TY+0uq20JL1x8mUoVS2xFJ6xhCFS1gcAsfk7KCQrnxaG7x/xIg71fwckZW5bW4rI3ATa8Ic98Mrg6JObF44toJcETGC1HJSaNWAreeiLjojsLUG8+JpU8jgT9ewrHEVwyGJFVGYmntOtDsm4djXMqJZh3QrIQn7oSPbp/h5baJY9sFnK8+weyJq8KMJPMXqLBP1NIs+U6zBLswli2gSQlpOxmlWTKrY4gxG9pO7tMsQaU9WKatAEv8NBvkt+c6hhhplkDHEOpABCrtwbIqR/jDuS7+c4MzmspQ7xTW6rr59ezsVy7XdfOodwqLepewkRky510C2OfJwgQoq/9IlSOcHuBXVBusxrO5DTQNixgISvkLlNvfHDd5ZhaKvTzDvUAat31i/gI6hlDm/kTqoAQ4IqPFW4BARWvgpJGLLXFEBkdkVLeFYeqJoab9LWyjC8jku2HkpmDqiaHByaPZNw+OyLCNLuDa0BySsoK4tK4uQLMBQ0175IfeFV3Vu6KrBregJGUFTUMJnO2c3Mp3o65rUknKCgZDEs50TsLgnkKDS4DFE8dw5AtolsD29F1hT3C6I4IWrwh9N686Wi/3xNHiFdHYOw3HuPTbEwyGJNAsgXWPPuwpkP2LfbPrOQX6IstbZx9Pr+3oQHj+2z9QwkOBQ4G/QuDU3Uja3J9I7QeTZ1ax9Cc2M1x6ML15wSWs5r2cUlZ/aTErNt0auLIDNmDIdz3/CZaw0mqfwL4CAAAAAElFTkSuQmCC">
|
||||||
|
{% if status[deploy.machine_id] == 'running' %}
|
||||||
|
<button class="confirm command command-shutdown btn btn-default btn-warning" value="shutdown" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Shutdown</button>
|
||||||
|
<button class="confirm command command-stop btn btn-default btn-danger" value="stop" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> Force Stop</button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img class="icon icons8-Remote-Control" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAC+0lEQVRYhcWXz04aURTGZ+HCB+jCB2Dh0kWXXbBh7sREsPuuTBc+QB+A1MBctKBLgtGYVuPChYmuak2mDWXuBGfU0mpDhWCoKMb/KK0Q7pwuxmGGQflTBr3JJMNd3N93z/edAzBMFxbiRQfC0haLCUEBMs36xWGnV+jpBqvpcvliAxyWeISJwPrF/icRwTAMw/rFfoSJwGLxzZNVw+kVejgs8Swf89p6sMsXG3B6hV79s54BhKVlxJPXVhEIk6jLFxvoGDw4Hu9zB+Wdkdlk3hOS960eI150cFiaQAGyOjge79P3Wb/Yz2JCOrJicDze5w7Jmbcfz4/CMoWJL0XwTMlH9wUN8SKHAmTVvMdhaYzDsVe2wPWnkQgOSxOIJ6MmUQ4Ok0Xb4M1EDL2Tn1mrwGJCbIU3E2EFIkyEjuBLuxRiWRXiORXW0ipMbzYWYU1+y51wH/zHsQrWdfEXYGm3tUx0dPNothZeqhjvhRLATJNKtAcPbqR865cVs8fFsgY7LQIsfqcwvUkhnjNEfd5X6zLhDm38Ng+r/4Z/SNAqSMgYoIhCoVDS9hPHal0wR+fTJ4gXuY7gYZnCQoJWS64cGqClXQrXdwLkw1oBvvXLylBQ3mtp8j3UanPbxnv+xvBeOtA6IFcwcrD6yxAw9uni2hOSs+ZR3DY8c6H5u3WkVm9L65sAAADS5zbD338zPC+Wobq//JPC2R8DXKZa6SOKjXD92c6rUCwDxLL14Zrb1iqig9uGMwzDuIPyjjlwEYVC6kyFq9taP8MyBSGjQqF0f9L1wLmDG6mW4YgXHSOzybz5kJWkYXD2qhaktxoAwEKiQzjDaL9QPJPKwZR4Wz1oZpPCzR0oail74m4Enxahc7i+OCy9GJ5ScmYREUUbOmGZwlpahdSZCitJtToLzPC2PW9VhB6yCjXmvNVzW+DNKqH7bs2DrfBGIma3aN33fVfgjUR0/eatingU+EMiHhVuFvFyUjkYnU+fDAXlvUeF68vpFXpdga/Pu/Gn8h8Gr4IF2ejgSgAAAABJRU5ErkJggg==">
|
||||||
|
<button class="btn btn-default btn-info" onclick="window.open('/vmanager/command/vmvnc/{{ deploy.machine_id }}', '_blank');"><span class="glyphicon glyphicon-console" aria-hidden="true"></span> Console</button>
|
||||||
|
{% else %}
|
||||||
|
<button class="command command-start btn btn-default btn-success" value="start" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Start</button>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img class="icon icons8-Time" width="32"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2X/wCiI4hGh4OMCwAAAABJRU5ErkJggg==">
|
||||||
|
{% if deploy.enabled == False %}
|
||||||
|
<button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}','_self');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate</button></td>
|
||||||
|
{% else %}
|
||||||
|
{% if deploy.warning == True %}
|
||||||
|
<button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate ({{ deploy.daysleft }} days left)</button></td>
|
||||||
|
{% else %}
|
||||||
|
<td data-title="Time Left">{{ deploy.daysleft }} day(s)</td>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="graphs{{ deploy.machine_id }}" class="tab-pane fade">
|
||||||
|
<p>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['cpu'] }}'>
|
||||||
|
<img class="icon icons8-Electronics" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYheWXMWuDQBiG/Tn+DCdxNFpdBDtLh0L2rjrW4yIEF+lPcJJMnapL7jy4krXQpN2E0KUuyXUSQlNpGr1+lL5wwze9D7zHx/cqSo/0sFSNqNKMqNL0sFSHzn0+vXIxyYOMN0HGGxeTfOh8FsBitRWL1VZ4CS2Gzn8HwET1tRXTzQVmrZ9y4adcODPWDp3NmLxOEJ1+C2DFdDNf7oSMZ6F6fWSoh6XqYpJ7CS28hBYOZu+yAJwZazsfF5NcD0tVMaJKCzLedHldplyK+Xy5E37KRedzdff4ZkSVBg8AHgE4AHgEpwDcP+3FT/XwvB/vD4wFcPYfkAoAHgE4AHgE4ADgEYAvIvBVDA4AHgE4AHgEnzVB9EUWgI3Z8VH6BcDURvXoZ7mN2dq8pTenlQPlPzejQwDQcvpb9fwDkojR+HkAxLYAAAAASUVORK5CYII=">
|
||||||
|
Processor {{ deploy.machine_cpu }} {% if deploy.machine_cpu > 1 %}cores{% else %}core{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['mem'] }}'>
|
||||||
|
<img class="icon icons8-Memory-Slot" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABpklEQVRYhe2XzUsCURTF35/Ssj/DVQ20c9EXBrrJNrVokdQyoUHcRGUfkAViIbbIbNEyF+VDsKmsqVG0RIhxGgdKUCyYOS3MbPogRJhmMRcOD8595/JbXHg8QqyyihDiCHDLjlVOdG1cGqKxtQtxNHAeJoQQwrC0x711Jd4/aTBSkyG+3LeQ7CUMS20zEcFwgNloVmFYajMfwHpa1anlH+X1fqLYHnZS0ucOs+3cb/MsAAvAArAAzAtwUtKr5XNlvc/L7R4v63tcWQ/30zzzvgXGA/iofXj5rD5/kIeRGglwDcZH7YTxUfvgykV9Li7BSA0FMu8ALLU5g4L4dVv/0hJ9wUS4II2H8o+LyUZH2fW0CmdQED92wBkUxERRQ6UGhC5VVF+AeFbDtaThVtawf6ui9grsZFRUasBpScNkpPjM+OhUP0sn3OGC0mn+G0BG0gAAezcqgOalhypQqQHH981ePNs8hYoG15agMCy1dZs3B8CAP1Wd3hVkb+xOcW1el72xO8W9zUueaE72RHOye5uXPvemdwV5wJ+qtgC6yf/vh8QqM9QbwskG2n58EgAAAAAASUVORK5CYII=">
|
||||||
|
Allocated memory {{ deploy.machine_mem }} MB</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['net'] }}'>
|
||||||
|
<img class="icon icons8-Flow-Chart" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABlElEQVRYhe2Xz0vCUBzA35/g0T/Bo3+Ah13UIWQgSzQhjE4RHhPq5EHdENSGGkqEdAnpINhliNBOOnU/aBhlp4qIYTA2vNc6JfJ46gQLqX3hA9vjw9vn3d4AMDG+TN+OkxxmFk+64zCzr+nBSS4aLMl69HyoLCJcHqibebGx8oDj65FRFj4WkmxpRoCWGCvACvh7AbHas5FsaQs5rL/9QADVdQVoiYHx53getb6RF2IrDZg1Xopjf+VDVsD/CvBSHGsWD9XRlvHdqbZzpada0q3iJIdZAVbA+gV40h1HsCA2IiWJiZQkhjjh+ckzLdRhn6CFOsoNFsQGfBveosXk1F7dcFG8+X7Hqa4LAAAATnLYfnWgNu91A2b7VFLhgFBRfEe5Bxd3Y/iEoYL4gHJzzRcDJ7noJCBeGypP+qcBs1uRFThgp3L7inKPrh5VVADKveyNrAArYM0CCFrQ4rWhAuPP9sZwgD/bG6NcghY0OICgBRnl7p3J+iQAS7C2eb/acMA8F0uwtmnXnWo7Z7m+TN8OAABf+SW5Q83GlOAAAAAASUVORK5CYII=">
|
||||||
|
Network traffic
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['hdd'] }}'>
|
||||||
|
<img class="icon icons8-SSD" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADMElEQVRYhcWXy0/TcADHe/DgwQNHDhz8Izx44LCD0gHycBiDjygcFjV6UfFCohKdrAPdA4JMkZfxrcEgvkdcjLiOrSuPAQ4HTAQdMLYOcWRutF8PphOyTUlc6y/5HLvPp02/yUoQKY6ixrpJSdlzlVpakREoe66ixro5lSvpkFR/4dGOsdnGN3PhTHKkfXSuWO8s/2vAweah6Y9BAb5wZpnkBFS2uGf+KFdq6a2655+DmZaLNPR+DSu19Na0AXm1tl03+4PfpAp4NLgUyau17UobUKJnzr30rMSlCrBORgWVia1NG7DbyHb3z8QlkfvCAlj/KsoaBl6lDVCZXBNjAV6yAG9IwMHmoem0AUc7RkJSyUWq7n4MpJQX1DmyL/Z8kmwBIobXs6GUSyC19I52OrAkdcA9lltOuYRiveP0s9HvMakDeieiq6UG5kJSQKnRdc82HZNU7gsLYL6sQmVyPU2eoIEZGV2QbgEi40EB5U0DU0kB6taRgNRykZO3x+fXyRU11qzzj32SL0Ck7sVMsKDOkZ0IyNfZt1/vWwjLFXDLEfpGam3KNQH9J7rd36NyBbzyrMSL9K7q3y+gaaDt3acfssh9YQGO2ThUJlfX7wAj63DPS78AkQ+LAsoa2IlEQGXL8MIUJ49c5FjHaFBcwJbqhxOcnHJfWMClp9O/lrBT17ft1P3JQM84DzmpejC1oNTSCkKppRUVrR6/meEhJ5VtnmDKAI2FQ/3bCMwMD511GTrrMswMj/q3EWgsHMwMD6MtCo2FQ6M9hkZ7DBoLB6MtmnT9WjoGNxhAUjTUnV6YGR4Hro1gb9MQzAyP43d8ICkaZoZH9ZN5kBQNjYWDzroMkqJxputL0vUiPk4AAAz4hY0FqEws1J1eFOsZFF1xQt3pxZ7GwcSP7ze7QVI0DrWM4fCNDyApGuVXh6Hu9IKkaOxrdidEN4d4iCcSw8YC/hWViV33BAbnBERiwPvPqZ4AZc/9Hy9hRavHr9TSCkJRY80qvOxYanLEZZM3O1dRYmAW83X2HIIgCKJI7zxZdIUJVbR6/HJQoncGSw3s2XX/CfJ19pyMfY7/hcSdEwTxE6x7GguhLb0ZAAAAAElFTkSuQmCC">
|
||||||
|
IOPS of {{ deploy.machine_hdd }} GB storage</div>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="misc{{ deploy.machine_id }}" class="tab-pane fade">
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
Unit: {{ deploy.machine_id }}<br />
|
||||||
|
State: {{ status[deploy.machine_id] }}<br />
|
||||||
|
Protected: {{ deploy.protected }}<br />
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- END OF HIDDEN PANEL -->
|
||||||
|
|
||||||
|
<!--Cloud Storage icon by Icons8 -->
|
||||||
|
{% if inv_deployments != [] %}
|
||||||
|
<!-- TODO: Create new deployment within this pool! -->
|
||||||
|
{% else %}
|
||||||
|
<button class="btn btn-default btn-lg btn-block" onclick="window.open('{{ url_for('vmanager.createvm') }}','_self')"><img class="icon icons8-Cloud-Storage" width="48" height="48" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEEklEQVRYhe3Xy0/bBhwHcA6btEMP0077A3boYYdK23EHLiQ0hQBtVC1S9zjs0L069TCkSUWNpgZCshDYItZOI+tKH7Cibgw6Wu2RAXWMYyc8mpAoUAIEp6VuTR5OwAnJd5dBEbYJKDSA1J/0PfjgXz6y5W/ssrKDNm9dYl4+aqYeq00kSpnK5pGUusX1WkGgxux+/ePLvmQ4lkcp88nPfkHV6DpcEFhpGnnH2D8XKzXwQv98UtXoqioIVDeRH/1IcKlSAzsIbqXSTJ0tCKy2uNt/uy+slhrYez8JrY25XhCotdKDgzNiSXHhWB5DYRFaK+0tfAWt9Pzow9WSA8cereKYheILAo/bGDHE72z5n8E46rsC0LXR0LXRqO8K4O5kbEc7pvg8TrQxuXKD8xVFnLrJ9canVyYTO1k84FvCe+1eXCcWwPLLYPlldJMsPrg4ipsMtyPkmasBQWUk3twKWGm8PRff7kImsoxT7V5MLwrYPPNP0tDbPfh3KrltoGkgIqgaXbVbAT9zuLi00oIHfA6O4ShOOyZQZaFQZ3Pjbx8nwa3NcPAp1CYSersH529NwcuubAn8iXya0VjcXykCtVa6o9cn5JVwZzr9OHcziNBDAWI2hzCXwmourwgEAF7IgEuI6CJZ6FppMJFlRWCfX0BNq6dLEVjdQlODYfmK6RiK4twvwS0xheYasYCGnpAi8N6sCK2V8SsCq76hFsce5WRPPu2YQIBNFgXkEiL0do8icGIxB42Fisviyg3Ol463MtkpmYoZj4qoslAQs7migACgNpFo7Hsge6unl/I4+Z0nW25wHpIAVY2uw593BiQVMx4V8eGlMVwZjhSNA4B4OgtL/zROfsvIIs/eCAoVRuKIHLC26Y+IBGjqn0GHc25XcBvnh39mcaF3WgK03F1IqZoJnQR41EzVO1xPVjaf8P73o2D55V0HTi8K0LXREmAnxWe1VtogrZgW+sbvPkFygt7uAZcQdx2o9MDcnkyh1sb8KgNkvEMyFXP+1hS6SXbXgd0kK1s5rrkMalqYSQlQY6HichXjZVdwqt2LHioKXsgUDeMSIrpJFnU2N9xzacnv+R7noDFTwuaKOXSizSPKVcwasqEnhDqbu+iPI73dg4aekCwuHMtjZikPvd2TLTc4X10HVhiJI19cDe7oLeZ55suukFDRfO/tZxXTTOhMdxZK/iWnFNtf0bTKRLy7DjxmcX99meLFvYat5RodW61uYZo2PsH9fX5pxexV7gTTqGn1DGzswODwbGbPYWsZiWSgtTGhZxVjpoTxRfm3mL2In8tBY6ZS60C1icRFJrevojaReAF8bkAykkcqAxDz+W0dFxOlXVsCU///5aYy2NZxMVHadbCv4H7IC+CuA/djyg7C/AeJ36h1J+7ehgAAAABJRU5ErkJggg=="> Create</button>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
102
app/templates/panel/vdc_pool3.html
Normal file
102
app/templates/panel/vdc_pool3.html
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
<div class="panel-group" id="deploycubes" role="tablist" aria-multiselectable="true">
|
||||||
|
{% for deploy in inv_deployments %}
|
||||||
|
{% if deploy.enabled == False %}
|
||||||
|
<div class="panel panel-danger" style="margin-top: 2px">
|
||||||
|
{% else %}
|
||||||
|
{% if deploy.warning == True %}
|
||||||
|
<div class="panel panel-warning" style="margin-top: 2px">
|
||||||
|
{% else %}
|
||||||
|
<div class="panel panel-success" style="margin-top: 2px">
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<div class="panel-heading" data-toggle="collapse" data-parent="#deploycubes" href="#cube{{ deploy.machine_id }}" aria-expanded="false" aria-controls="cube{{ deploy.machine_id }}" role="tab" id="dpanel{{ deploy.machine_id }}">
|
||||||
|
{% if deploy.protected == True %}<img class="icon icons8-Security-Checked" width="24" height="24" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAADr0lEQVRYheXYzWrbWBQHcD1CHiGPkEfwxtaXm05baDclCels0kWbTRbuJl0EJF1JdnHo1DQQOgstSgqBiJIygY4XwVdXFnUIuKA0H1BIiVrTGmxrrBDnzCJ4SNLYkmzZGWb+cFYG3x+6OkdXoqj/Q+LIHGNl8hsnE4eTiZMQC5k4MseuFUWLxk1OJhqvmN9uZT9UH2r7IOXrIOXr8FDbh1vZD1VeMb9xMtFo0bg5cFAsUxpJSHgymS6usMhw72RL7tzqIaQ3XchZrSsrvenC3Ooh3M6Waiwy3GS6uJKQ8GQsUxqJBMUIeDQh4ckbavE9LWK4/7JcTekOLBrHHVGdatE4hpTuwP2X5SotYrihFt8nJDzJCHg0NIoWjcdJxdxnZdKcXrZr8+uVnlDdsPPrFZhetmusTJq8Qj7RovE4EJYWMcxoe8359UpkIL+aX6/AjLbXpEUMgYDDgl2u/waQR6TSrTMHVelNF3jVPPAFJlVra2GjOnTgwkYVkqq1de3A5VLfwOKblO4MBPfnwSl4JwBr9s+/pXQHkmrxjS8wIeCnj15/HgjufN7tXvz90evPkBDwU18gLRVmZ7S95iBxFRd+2uoHr3Y8WirM+gIZAcfuPt/+MUxczmrB3efbPxgBx3yBsUxpJKpZGBSXswLOwHY4RL5K+XrHha0vpx0X6gUn5evBZmA7vGL+0amT7cqp74LvdluBcaE6uB1aKsxOL9u1y3+0ZvsvvFJugXcSHJezWjCx9LERF/BUYCAj4FEWkSs7udvW9YLLWS1gEWmGPhfyqnnQ6T68CrlmX8R5JwDatj8u9P3XDi0WnnWbh5eR5+OdAKyUg3X6g1c7Hi0WnoUGMgIe5RDxwnRqWFzP29sOrxQtv+fyeWRYXEp3gFeKVk84iqKouICn7gV4qrQPAWFwOasF42nrr1Dde1U4yTgKcvwK0q3na2GjCpxkHPWFC3MVw9btbKnW99Vrh5PN3Sjf8lK6A6xM7EhwFHV2wmERaUbxbrxoHLc7NxYZkKIoilPIi4mlcqNf4MRSucEp5EWkOIo6O4Zxsrnbz+vA3OohsDKxI/s2czlxZI4xyHC7HcW6dS2DDHfgn+USUuEXDhEvDFLK1wdz33VKXMBTQZFSvg4cIl5kIyUMkpeN793GT0p3zrZ12Lh/kMgc4xD5OqPtXRhBi8Yx/Pr7jsdJxtG1fwqOZUojLDLejmesxhPdgSe6A+MZq8Ei4+3AurWXMAKOJVVrK6laW0Nrhn9D/gYrB5WUx8IwEwAAAABJRU5ErkJggg==">{% endif %} <a href="#"><b>{% if status[deploy.machine_id] == 'running' %}<font color="green">{% else %}<font color="red">{% endif %}{{ deploy.machine_alias }}</font></b></a>
|
||||||
|
|
||||||
|
|
||||||
|
</div></div> <!-- end of heading -->
|
||||||
|
<!-- START OF HIDDEN PANEL -->
|
||||||
|
{% if deploy.enabled == False or deploy.warning == True %}
|
||||||
|
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #faebcc; border-top: none; margin-bottom: 10px;">
|
||||||
|
{% else %}
|
||||||
|
<div id="cube{{ deploy.machine_id }}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{ deploy.machine_id }}" style="border:3px solid #d6e9c6; border-top: none; margin-bottom: 10px;">
|
||||||
|
{% endif %}
|
||||||
|
<div class="panel-body">
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li class="active"><a data-toggle="tab" href="#controls{{ deploy.machine_id }}">Control</a></li>
|
||||||
|
<li><a data-toggle="tab" href="#graphs{{ deploy.machine_id }}">Monitoring</a></li>
|
||||||
|
<li><a data-toggle="tab" href="#misc{{ deploy.machine_id }}">Misc.</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content">
|
||||||
|
<div id="controls{{ deploy.machine_id }}" class="tab-pane fade in active">
|
||||||
|
<p><br />
|
||||||
|
{% if deploy.enabled == True %}
|
||||||
|
<img class="icon icons8-Device-Manager" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACl0lEQVRYhe2X70sTcRzHfdhDH/Zn9KAHPrwnejNSwqx01hpBw+1RDyoJrfZk3i0mKerWrtApKJmtQVkSSoPIfbc1vJtzOuFiWeE6QnaJlqbeuydNlj92m/PoBx68nrz5wvfFfd984FNSUuSnYwi1Xyirv7TY+0uq20JL1x8mUoVS2xFJ6xhCFS1gcAsfk7KCQrnxaG7x/xIg71fwckZW5bW4rI3ATa8Ic98Mrg6JObF44toJcETGC1HJSaNWAreeiLjojsLUG8+JpU8jgT9ewrHEVwyGJFVGYmntOtDsm4djXMqJZh3QrIQn7oSPbp/h5baJY9sFnK8+weyJq8KMJPMXqLBP1NIs+U6zBLswli2gSQlpOxmlWTKrY4gxG9pO7tMsQaU9WKatAEv8NBvkt+c6hhhplkDHEOpABCrtwbIqR/jDuS7+c4MzmspQ7xTW6rr59ezsVy7XdfOodwqLepewkRky510C2OfJwgQoq/9IlSOcHuBXVBusxrO5DTQNixgISvkLlNvfHDd5ZhaKvTzDvUAat31i/gI6hlDm/kTqoAQ4IqPFW4BARWvgpJGLLXFEBkdkVLeFYeqJoab9LWyjC8jku2HkpmDqiaHByaPZNw+OyLCNLuDa0BySsoK4tK4uQLMBQ0175IfeFV3Vu6KrBregJGUFTUMJnO2c3Mp3o65rUknKCgZDEs50TsLgnkKDS4DFE8dw5AtolsD29F1hT3C6I4IWrwh9N686Wi/3xNHiFdHYOw3HuPTbEwyGJNAsgXWPPuwpkP2LfbPrOQX6IstbZx9Pr+3oQHj+2z9QwkOBQ4G/QuDU3Uja3J9I7QeTZ1ax9Cc2M1x6ML15wSWs5r2cUlZ/aTErNt0auLIDNmDIdz3/CZaw0mqfwL4CAAAAAElFTkSuQmCC">
|
||||||
|
{% if status[deploy.machine_id] == 'running' %}
|
||||||
|
<button class="confirm command command-shutdown btn btn-default btn-warning" value="shutdown" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-off" aria-hidden="true"></span> Shutdown</button>
|
||||||
|
<button class="confirm command command-stop btn btn-default btn-danger" value="stop" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> Force Stop</button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img class="icon icons8-Remote-Control" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAC+0lEQVRYhcWXz04aURTGZ+HCB+jCB2Dh0kWXXbBh7sREsPuuTBc+QB+A1MBctKBLgtGYVuPChYmuak2mDWXuBGfU0mpDhWCoKMb/KK0Q7pwuxmGGQflTBr3JJMNd3N93z/edAzBMFxbiRQfC0haLCUEBMs36xWGnV+jpBqvpcvliAxyWeISJwPrF/icRwTAMw/rFfoSJwGLxzZNVw+kVejgs8Swf89p6sMsXG3B6hV79s54BhKVlxJPXVhEIk6jLFxvoGDw4Hu9zB+Wdkdlk3hOS960eI150cFiaQAGyOjge79P3Wb/Yz2JCOrJicDze5w7Jmbcfz4/CMoWJL0XwTMlH9wUN8SKHAmTVvMdhaYzDsVe2wPWnkQgOSxOIJ6MmUQ4Ok0Xb4M1EDL2Tn1mrwGJCbIU3E2EFIkyEjuBLuxRiWRXiORXW0ipMbzYWYU1+y51wH/zHsQrWdfEXYGm3tUx0dPNothZeqhjvhRLATJNKtAcPbqR865cVs8fFsgY7LQIsfqcwvUkhnjNEfd5X6zLhDm38Ng+r/4Z/SNAqSMgYoIhCoVDS9hPHal0wR+fTJ4gXuY7gYZnCQoJWS64cGqClXQrXdwLkw1oBvvXLylBQ3mtp8j3UanPbxnv+xvBeOtA6IFcwcrD6yxAw9uni2hOSs+ZR3DY8c6H5u3WkVm9L65sAAADS5zbD338zPC+Wobq//JPC2R8DXKZa6SOKjXD92c6rUCwDxLL14Zrb1iqig9uGMwzDuIPyjjlwEYVC6kyFq9taP8MyBSGjQqF0f9L1wLmDG6mW4YgXHSOzybz5kJWkYXD2qhaktxoAwEKiQzjDaL9QPJPKwZR4Wz1oZpPCzR0oail74m4Enxahc7i+OCy9GJ5ScmYREUUbOmGZwlpahdSZCitJtToLzPC2PW9VhB6yCjXmvNVzW+DNKqH7bs2DrfBGIma3aN33fVfgjUR0/eatingU+EMiHhVuFvFyUjkYnU+fDAXlvUeF68vpFXpdga/Pu/Gn8h8Gr4IF2ejgSgAAAABJRU5ErkJggg==">
|
||||||
|
<button class="btn btn-default btn-info" onclick="window.open('/vmanager/command/vmvnc/{{ deploy.machine_id }}', '_blank');"><span class="glyphicon glyphicon-console" aria-hidden="true"></span> Console</button>
|
||||||
|
{% else %}
|
||||||
|
<button class="command command-start btn btn-default btn-success" value="start" vmid="{{ deploy.machine_id }}"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Start</button>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img class="icon icons8-Time" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAGLklEQVRYhd2W3VNTZx7Hc+FFL3rRy73Yi170sv9Bd2ZzsaPUrQVJECnaZtVKUXTa7jK12tq0YkMtkJwEkCiEABaV5UUEDmtXG4pCMOckJ68kIQ/E8CIvSQgEDIlJzncv3DhgCS/pzF7sd+Y3c87MOb/P5zzPM2d+AsEuc1DOWgtrLbOvVnYV8zRLpn9zt/12nYIa8xRNeLxaJTfcwSyZXvj/L5AjZ8YLarh4Qa15Q71fySz9T7YgS6YXShpcs3VsEqk6f3ceWTK9JL00W3ug0jC+/4rhD79b4F3ZyF6Rkls5c9OHomaCklYvJA0uZMlGTqWDf36LrFwfWU7myBmSscT+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qntNRBkDNOFxqW8K96wLWInG4ZxZyQg6s7iGmcU1zC1FcbppFDThcarFPZdVPvKnTQUEAoHgkMr0oJFZQbs9hsIaE46pOQyMBjISIPOrKNZYIFGbcW04hB53ArkUO5cWLhAIBIVX7e8cq7fP0YRHWd8UpB2ejOCp3DXN43Tzi6//rnc6IFFb5VsKCAQCQX41x1zTL4EmPP5+042H7sUNy7pV/OEYEkn+5bVEbUaXM44uZxwH5Uxg/aiWNvtkw2/lqUyz7fYYOhzPcey6FS2PpsFOhFDRRzYAmVfmg5+tC9AOTmLIHcSRWg7q4RB6PUlIrttmj9ePntgWnsqBK4Y/H62zLna74uj1JFHeP4WcKgO4J0sbgKmJKJWlyHOIFAzO3nCizRYFTXiUtnlXD1LGsh3DUznWYDt+uIZ7mmrUyITx6U9OlN50opudBTMRQrHGAotvGf3meZTd8aBIY0PVgwXQhH8xT2idU4V15sZdw1PZe3nobbHS6Cvrm4n0uBOgCY82WxTl/3qK73omUaR14JvuJ/ienn45eNCEh2owmDhcbZ7LqTRIMoanIpTq9mQrmM9EStP8+a4ny+tB66vNFkVZ/0z0cA3nF1NGjVCqe+N3w18V2SfT/0VMme6IKJbkV3PewlrLbH415xOrjOMiyjj43o+Gv+1o6l2X/wCiI4hGh4OMCwAAAABJRU5ErkJggg==">
|
||||||
|
{% if deploy.enabled == False %}
|
||||||
|
<button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}','_self');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate</button></td>
|
||||||
|
{% else %}
|
||||||
|
{% if deploy.warning == True %}
|
||||||
|
<button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate ({{ deploy.daysleft }} days left)</button></td>
|
||||||
|
{% else %}
|
||||||
|
<td data-title="Time Left">{{ deploy.daysleft }} day(s)</td>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="graphs{{ deploy.machine_id }}" class="tab-pane fade">
|
||||||
|
<p>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['cpu'] }}'>
|
||||||
|
<img class="icon icons8-Electronics" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYheWXMWuDQBiG/Tn+DCdxNFpdBDtLh0L2rjrW4yIEF+lPcJJMnapL7jy4krXQpN2E0KUuyXUSQlNpGr1+lL5wwze9D7zHx/cqSo/0sFSNqNKMqNL0sFSHzn0+vXIxyYOMN0HGGxeTfOh8FsBitRWL1VZ4CS2Gzn8HwET1tRXTzQVmrZ9y4adcODPWDp3NmLxOEJ1+C2DFdDNf7oSMZ6F6fWSoh6XqYpJ7CS28hBYOZu+yAJwZazsfF5NcD0tVMaJKCzLedHldplyK+Xy5E37KRedzdff4ZkSVBg8AHgE4AHgEpwDcP+3FT/XwvB/vD4wFcPYfkAoAHgE4AHgE4ADgEYAvIvBVDA4AHgE4AHgEnzVB9EUWgI3Z8VH6BcDURvXoZ7mN2dq8pTenlQPlPzejQwDQcvpb9fwDkojR+HkAxLYAAAAASUVORK5CYII=">
|
||||||
|
Processor {{ deploy.machine_cpu }} {% if deploy.machine_cpu > 1 %}cores{% else %}core{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['mem'] }}'>
|
||||||
|
<img class="icon icons8-Memory-Slot" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABpklEQVRYhe2XzUsCURTF35/Ssj/DVQ20c9EXBrrJNrVokdQyoUHcRGUfkAViIbbIbNEyF+VDsKmsqVG0RIhxGgdKUCyYOS3MbPogRJhmMRcOD8595/JbXHg8QqyyihDiCHDLjlVOdG1cGqKxtQtxNHAeJoQQwrC0x711Jd4/aTBSkyG+3LeQ7CUMS20zEcFwgNloVmFYajMfwHpa1anlH+X1fqLYHnZS0ucOs+3cb/MsAAvAArAAzAtwUtKr5XNlvc/L7R4v63tcWQ/30zzzvgXGA/iofXj5rD5/kIeRGglwDcZH7YTxUfvgykV9Li7BSA0FMu8ALLU5g4L4dVv/0hJ9wUS4II2H8o+LyUZH2fW0CmdQED92wBkUxERRQ6UGhC5VVF+AeFbDtaThVtawf6ui9grsZFRUasBpScNkpPjM+OhUP0sn3OGC0mn+G0BG0gAAezcqgOalhypQqQHH981ePNs8hYoG15agMCy1dZs3B8CAP1Wd3hVkb+xOcW1el72xO8W9zUueaE72RHOye5uXPvemdwV5wJ+qtgC6yf/vh8QqM9QbwskG2n58EgAAAAAASUVORK5CYII=">
|
||||||
|
Allocated memory {{ deploy.machine_mem }} MB</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['net'] }}'>
|
||||||
|
<img class="icon icons8-Flow-Chart" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABlElEQVRYhe2Xz0vCUBzA35/g0T/Bo3+Ah13UIWQgSzQhjE4RHhPq5EHdENSGGkqEdAnpINhliNBOOnU/aBhlp4qIYTA2vNc6JfJ46gQLqX3hA9vjw9vn3d4AMDG+TN+OkxxmFk+64zCzr+nBSS4aLMl69HyoLCJcHqibebGx8oDj65FRFj4WkmxpRoCWGCvACvh7AbHas5FsaQs5rL/9QADVdQVoiYHx53getb6RF2IrDZg1Xopjf+VDVsD/CvBSHGsWD9XRlvHdqbZzpada0q3iJIdZAVbA+gV40h1HsCA2IiWJiZQkhjjh+ckzLdRhn6CFOsoNFsQGfBveosXk1F7dcFG8+X7Hqa4LAAAATnLYfnWgNu91A2b7VFLhgFBRfEe5Bxd3Y/iEoYL4gHJzzRcDJ7noJCBeGypP+qcBs1uRFThgp3L7inKPrh5VVADKveyNrAArYM0CCFrQ4rWhAuPP9sZwgD/bG6NcghY0OICgBRnl7p3J+iQAS7C2eb/acMA8F0uwtmnXnWo7Z7m+TN8OAABf+SW5Q83GlOAAAAAASUVORK5CYII=">
|
||||||
|
Network traffic
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6"><img class="img-responsive" src='data:image/png;base64,{{ rrd[deploy.machine_id]['hdd'] }}'>
|
||||||
|
<img class="icon icons8-SSD" width="32" height="32" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADMElEQVRYhcWXy0/TcADHe/DgwQNHDhz8Izx44LCD0gHycBiDjygcFjV6UfFCohKdrAPdA4JMkZfxrcEgvkdcjLiOrSuPAQ4HTAQdMLYOcWRutF8PphOyTUlc6y/5HLvPp02/yUoQKY6ixrpJSdlzlVpakREoe66ixro5lSvpkFR/4dGOsdnGN3PhTHKkfXSuWO8s/2vAweah6Y9BAb5wZpnkBFS2uGf+KFdq6a2655+DmZaLNPR+DSu19Na0AXm1tl03+4PfpAp4NLgUyau17UobUKJnzr30rMSlCrBORgWVia1NG7DbyHb3z8QlkfvCAlj/KsoaBl6lDVCZXBNjAV6yAG9IwMHmoem0AUc7RkJSyUWq7n4MpJQX1DmyL/Z8kmwBIobXs6GUSyC19I52OrAkdcA9lltOuYRiveP0s9HvMakDeieiq6UG5kJSQKnRdc82HZNU7gsLYL6sQmVyPU2eoIEZGV2QbgEi40EB5U0DU0kB6taRgNRykZO3x+fXyRU11qzzj32SL0Ck7sVMsKDOkZ0IyNfZt1/vWwjLFXDLEfpGam3KNQH9J7rd36NyBbzyrMSL9K7q3y+gaaDt3acfssh9YQGO2ThUJlfX7wAj63DPS78AkQ+LAsoa2IlEQGXL8MIUJ49c5FjHaFBcwJbqhxOcnHJfWMClp9O/lrBT17ft1P3JQM84DzmpejC1oNTSCkKppRUVrR6/meEhJ5VtnmDKAI2FQ/3bCMwMD511GTrrMswMj/q3EWgsHMwMD6MtCo2FQ6M9hkZ7DBoLB6MtmnT9WjoGNxhAUjTUnV6YGR4Hro1gb9MQzAyP43d8ICkaZoZH9ZN5kBQNjYWDzroMkqJxputL0vUiPk4AAAz4hY0FqEws1J1eFOsZFF1xQt3pxZ7GwcSP7ze7QVI0DrWM4fCNDyApGuVXh6Hu9IKkaOxrdidEN4d4iCcSw8YC/hWViV33BAbnBERiwPvPqZ4AZc/9Hy9hRavHr9TSCkJRY80qvOxYanLEZZM3O1dRYmAW83X2HIIgCKJI7zxZdIUJVbR6/HJQoncGSw3s2XX/CfJ19pyMfY7/hcSdEwTxE6x7GguhLb0ZAAAAAElFTkSuQmCC">
|
||||||
|
IOPS of {{ deploy.machine_hdd }} GB storage</div>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="misc{{ deploy.machine_id }}" class="tab-pane fade">
|
||||||
|
<br />
|
||||||
|
<p>
|
||||||
|
Unit: {{ deploy.machine_id }}<br />
|
||||||
|
State: {{ status[deploy.machine_id] }}<br />
|
||||||
|
Protected: {{ deploy.protected }}<br />
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- END OF HIDDEN PANEL -->
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ def createvm():
|
||||||
deployment_seeds = current_user.inv_deployments.filter_by(deleted=False).filter_by(protected=False).all()
|
deployment_seeds = current_user.inv_deployments.filter_by(deleted=False).filter_by(protected=False).all()
|
||||||
if deployment_seeds != []:
|
if deployment_seeds != []:
|
||||||
flash('Offline deployments still exist.')
|
flash('Offline deployments still exist.')
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
|
|
||||||
form = CreateForm()
|
form = CreateForm()
|
||||||
if current_user.confirmed and form.validate_on_submit():
|
if current_user.confirmed and form.validate_on_submit():
|
||||||
|
@ -68,7 +68,7 @@ def createvm():
|
||||||
flash('New point created successfully in region "{}".'.format(str(selected_region.description)))
|
flash('New point created successfully in region "{}".'.format(str(selected_region.description)))
|
||||||
else:
|
else:
|
||||||
flash('Point could not be created! Please try again later...')
|
flash('Point could not be created! Please try again later...')
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
else:
|
else:
|
||||||
#bridge found. lets see on which slave it is so we can create the instance on the same slave.
|
#bridge found. lets see on which slave it is so we can create the instance on the same slave.
|
||||||
data = { 'unit_id': int(selected_bridge.bridge_id),
|
data = { 'unit_id': int(selected_bridge.bridge_id),
|
||||||
|
@ -82,7 +82,7 @@ def createvm():
|
||||||
bridge_phy_id = query['phy_id']
|
bridge_phy_id = query['phy_id']
|
||||||
else:
|
else:
|
||||||
flash('Point found but cannot be used!')
|
flash('Point found but cannot be used!')
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
|
|
||||||
###
|
###
|
||||||
#create new machine...
|
#create new machine...
|
||||||
|
@ -101,20 +101,20 @@ def createvm():
|
||||||
query = contact_proxmaster(data, 'create')
|
query = contact_proxmaster(data, 'create')
|
||||||
except:
|
except:
|
||||||
flash('Region not available! Please try again later...')
|
flash('Region not available! Please try again later...')
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
|
|
||||||
if query['status'] == 'kvm_created':
|
if query['status'] == 'kvm_created':
|
||||||
deployment = Deployment(user_id=int(current_user.pid), machine_alias=str(form.servername.data), machine_id=query['unit_id'], machine_cpu=data['cpu'], machine_mem=data['mem'], machine_hdd=data['hdd'], enabled=True, protected=False, daysleft=15, warning=True, discount=0, bridge_id=int(selected_bridge.pid))
|
deployment = Deployment(user_id=int(current_user.pid), machine_alias=str(form.servername.data), machine_id=query['unit_id'], machine_cpu=data['cpu'], machine_mem=data['mem'], machine_hdd=data['hdd'], enabled=True, protected=False, daysleft=15, warning=True, discount=0, bridge_id=int(selected_bridge.pid))
|
||||||
db.session.add(deployment)
|
db.session.add(deployment)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash('New device created successfully in region "{}".'.format(str(selected_region.description)))
|
flash('New device created successfully in region "{}".'.format(str(selected_region.description)))
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
else:
|
else:
|
||||||
flash('Device could not be created! Please try again later...')
|
flash('Device could not be created! Please try again later...')
|
||||||
|
|
||||||
#TODO: cleanup bridge if the machine is new and we were not be able to create it
|
#TODO: cleanup bridge if the machine is new and we were not be able to create it
|
||||||
|
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
return render_template('vmanager/create.html', form=form)
|
return render_template('vmanager/create.html', form=form)
|
||||||
|
|
||||||
@vmanager.route('/activate/<int:itemid>', methods=['GET', 'POST'])
|
@vmanager.route('/activate/<int:itemid>', methods=['GET', 'POST'])
|
||||||
|
@ -204,7 +204,7 @@ def activate(itemid=0):
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
else:
|
else:
|
||||||
flash('Router cannot be created.')
|
flash('Router cannot be created.')
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
|
|
||||||
today = datetime.utcnow()
|
today = datetime.utcnow()
|
||||||
expiry = today + relativedelta(today, months=+(form.period.data))
|
expiry = today + relativedelta(today, months=+(form.period.data))
|
||||||
|
@ -231,7 +231,7 @@ def activate(itemid=0):
|
||||||
if current_user.is_administrator():
|
if current_user.is_administrator():
|
||||||
return redirect(url_for('admin.list_deployments'))
|
return redirect(url_for('admin.list_deployments'))
|
||||||
else:
|
else:
|
||||||
return redirect(url_for('main.dashboard'))
|
return redirect(url_for('panel.dashboard'))
|
||||||
return render_template('vmanager/activate.html', form=form, deploy=deploy, cpu_cost=cpu_cost, mem_cost=mem_cost, hdd_cost=hdd_cost, tpm=tpm, ppm=ppm, discount=discount, total=total, currency=owner.currency)
|
return render_template('vmanager/activate.html', form=form, deploy=deploy, cpu_cost=cpu_cost, mem_cost=mem_cost, hdd_cost=hdd_cost, tpm=tpm, ppm=ppm, discount=discount, total=total, currency=owner.currency)
|
||||||
|
|
||||||
@vmanager.route('/vmremove/<int:unit_id>', methods=['GET', 'POST'])
|
@vmanager.route('/vmremove/<int:unit_id>', methods=['GET', 'POST'])
|
||||||
|
|
Loading…
Reference in a new issue