Skip to content

Commit

Permalink
Merge pull request #90 from lakewik/develop
Browse files Browse the repository at this point in the history
Develop v. 0.1.9.1a
  • Loading branch information
lakewik authored Jul 27, 2017
2 parents 2f5ad05 + 1be35a4 commit 7a6421b
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 2 deletions.
20 changes: 20 additions & 0 deletions UI/flask_ownstorj/ownstorj/templates/buckets_list_manager.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends "base.html" %}
{% block title %}Buckets{% endblock %}
{% set active_page = "dashboard" %}


{% block content %}



<article class="content dashboard-page">
<section class="section">
<div id="buckets_list_table_content">
</div>

</section>
</article>



{% endblock %}
9 changes: 9 additions & 0 deletions UI/flask_ownstorj/ownstorj/templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<footer class="footer">
<div class="footer-block buttons"><b>OwnStorj Version 0.1 Alpha</b></div>
<div class="footer-block author">
<ul>
<li> <b>Created by <a href="https://github.com/lakewik">Wiktor `lakewik` Jezioro</a>, Marco Rosa and <a href="https://github.com/modularcode">ModularCode</a></b> </li>

</ul>
</div>
</footer>
9 changes: 8 additions & 1 deletion UI/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
from .mainUI import MainUI
from .qt_interfaces.login_ui_new import Ui_Login
from .utilities.account_manager import AccountManager
from resources.constants import DEFAULT_BRIDGE_API_URL


# Login section
class LoginUI(QtGui.QMainWindow):

__logger = logging.getLogger('%s.LoginUI' % __name__)

def __init__(self, parent=None):
def __init__(self, parent=None, init_window=None):
QtGui.QWidget.__init__(self, parent)

# Login UI
Expand All @@ -26,6 +27,8 @@ def __init__(self, parent=None):
# Account manager
self.login_ui.password.setEchoMode(QtGui.QLineEdit.Password)

self.login_ui.bridge_url.setText(DEFAULT_BRIDGE_API_URL)

QtCore.QObject.connect(self.login_ui.login_bt,
QtCore.SIGNAL('clicked()'),
self.login) # Take login action
Expand All @@ -34,6 +37,10 @@ def login(self):
# Take login action
self.email = str(self.login_ui.email.text()).strip()
self.password = str(self.login_ui.password.text()).strip()
self.bridge_api_url = str(self.login_ui.bridge_url.text()).strip() # get bridge api url

if self.bridge_api_url == "":
self.bridge_api_url = DEFAULT_BRIDGE_API_URL

self.storj_client = storj.Client(email=self.email,
password=self.password)
Expand Down
26 changes: 25 additions & 1 deletion UI/qt_interfaces/file_upload_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def setupUi(self, SingleFileUpload):
self.tmp_path.setGeometry(QtCore.QRect(130, 100, 801, 31))
self.tmp_path.setObjectName(_fromUtf8("tmp_path"))
self.encrypt_files_checkbox = QtGui.QCheckBox(SingleFileUpload)
self.encrypt_files_checkbox.setGeometry(QtCore.QRect(20, 140, 171, 41))
self.encrypt_files_checkbox.setGeometry(QtCore.QRect(390, 140, 141, 41))
font = QtGui.QFont()
font.setFamily(_fromUtf8("Lato"))
font.setPointSize(11)
Expand Down Expand Up @@ -436,6 +436,28 @@ def setupUi(self, SingleFileUpload):
self.shard_size_unit.addItem(_fromUtf8(""))
self.shard_size_unit.addItem(_fromUtf8(""))
self.shard_size_unit.addItem(_fromUtf8(""))
self.label_19 = QtGui.QLabel(SingleFileUpload)
self.label_19.setGeometry(QtCore.QRect(20, 150, 261, 20))
font = QtGui.QFont()
font.setFamily(_fromUtf8("Lato"))
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.label_19.setFont(font)
self.label_19.setObjectName(_fromUtf8("label_19"))
self.ongoing_bridge_requests = QtGui.QLabel(SingleFileUpload)
self.ongoing_bridge_requests.setGeometry(QtCore.QRect(280, 150, 101, 16))
font = QtGui.QFont()
font.setFamily(_fromUtf8("Lato"))
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.ongoing_bridge_requests.setFont(font)
self.ongoing_bridge_requests.setStyleSheet(_fromUtf8("QLabel{\n"
"color: #2683ff;\n"
"}\n"
""))
self.ongoing_bridge_requests.setObjectName(_fromUtf8("ongoing_bridge_requests"))

self.retranslateUi(SingleFileUpload)
self.shard_size_unit.setCurrentIndex(0)
Expand Down Expand Up @@ -483,5 +505,7 @@ def retranslateUi(self, SingleFileUpload):
self.shard_size_unit.setItemText(2, _translate("SingleFileUpload", "GB", None))
self.shard_size_unit.setItemText(3, _translate("SingleFileUpload", "TB", None))
self.shard_size_unit.setItemText(4, _translate("SingleFileUpload", "PB", None))
self.label_19.setText(_translate("SingleFileUpload", "<html><head/><body><p><span style=\" color:#555555;\">ONGOING BRIDGE REQUESTS:</span></p></body></html>", None))
self.ongoing_bridge_requests.setText(_translate("SingleFileUpload", "<html><head/><body><p><span style=\" color:#2683ff;\">0</span></p></body></html>", None))

import resources_rc
14 changes: 14 additions & 0 deletions UI/utilities/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import errno
import hashlib
import requests
import miniupnpc
SYNC_SERVER_URL = "http://localhost:8234"

class Tools:
Expand Down Expand Up @@ -148,3 +149,16 @@ def generate_max_shard_size(self, max_shard_size_input, shard_size_unit):

return max_shard_size

# NETWORK

def map_port_UPnP(self, port, description):
upnp = miniupnpc.UPnP()

upnp.discoverdelay = 10
upnp.discover()

upnp.selectigd()

upnp.addportmapping(port, 'TCP', upnp.lanaddr, port, description, '')


0 comments on commit 7a6421b

Please sign in to comment.