Browse Source
- Refactor the Admin panel and include WebSocket
- Refactor the Admin panel and include WebSocket
- Put color in the daemon - Add new tests to AdminTestpull/16/head
24 changed files with 385 additions and 221 deletions
-
7app/helpers/StringHelper.php
-
6app/models/config/Config.php
-
10app/models/config/ConfigDAO.php
-
23app/views/admin.tpl
-
5app/widgets/AdminDB/AdminDB.php
-
10app/widgets/AdminDB/admindb.tpl
-
2app/widgets/AdminDB/locales.ini
-
6app/widgets/AdminMain/AdminMain.php
-
82app/widgets/AdminMain/adminmain.tpl
-
13app/widgets/AdminMain/locales.ini
-
8app/widgets/AdminTest/AdminTest.php
-
112app/widgets/AdminTest/admintest.css
-
48app/widgets/AdminTest/admintest.js
-
137app/widgets/AdminTest/admintest.tpl
-
14app/widgets/AdminTest/locales.ini
-
1app/widgets/Api/api.tpl
-
4app/widgets/Login/login.js
-
7app/widgets/Tabs/tabs.css
-
4bootstrap.php
-
17daemon.php
-
25src/Movim/Daemon/Behaviour.php
-
4system/Sessionx.php
-
52themes/movim/css/forms.css
-
9themes/movim/css/style.css
@ -1,17 +1,18 @@ |
|||||
<div id="main"> |
<div id="main"> |
||||
<?php $this->widget('Tabs');?> |
|
||||
|
<?php $this->widget('Tabs');?> |
||||
<div id="center" > |
<div id="center" > |
||||
<div class="fixed_block"> |
|
||||
<h1 class="paddedtopbottom"> |
|
||||
|
<div class="fixed_block"> |
||||
|
<h1 class="paddedtopbottom"> |
||||
<i class="fa fa-cogs"></i> <?php echo __('page.administration'); ?> |
<i class="fa fa-cogs"></i> <?php echo __('page.administration'); ?> |
||||
</h1> |
</h1> |
||||
</div> |
|
||||
<div> |
|
||||
<?php $this->widget('AdminMain');?> |
|
||||
<?php $this->widget('AdminDB');?> |
|
||||
<?php $this->widget('AdminTest');?> |
|
||||
<?php $this->widget('Statistics');?> |
|
||||
<?php $this->widget('Api');?> |
|
||||
</div> |
|
||||
|
</div> |
||||
|
<div> |
||||
|
<?php $this->widget('AdminTest');?> |
||||
|
<?php $this->widget('AdminMain');?> |
||||
|
<?php $this->widget('AdminDB');?> |
||||
|
|
||||
|
<?php $this->widget('Statistics');?> |
||||
|
<?php $this->widget('Api');?> |
||||
|
</div> |
||||
</div> |
</div> |
||||
</div> |
</div> |
||||
@ -0,0 +1,112 @@ |
|||||
|
figure { |
||||
|
width: 100%; |
||||
|
height: 40em; |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
figure div { |
||||
|
display: block; |
||||
|
width: 20%; |
||||
|
margin-top: -2.5em; |
||||
|
margin-left: -10%; |
||||
|
background-color: #EEE; |
||||
|
border-radius: 0.2em; |
||||
|
text-align: center; |
||||
|
position: absolute; |
||||
|
line-height: 5em; |
||||
|
font-weight: bold; |
||||
|
white-space: nowrap; |
||||
|
text-overflow: ellipsis; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
figure div#webserver { |
||||
|
width: 50%; |
||||
|
height: 30em; |
||||
|
border: 0.5em solid gray; |
||||
|
width: 26%; |
||||
|
border-radius: 0.2em; |
||||
|
height: 22em; |
||||
|
border: 0.5em dashed #F5F5F5; |
||||
|
left: 46%; |
||||
|
background-color: transparent; |
||||
|
top: 10%; |
||||
|
} |
||||
|
|
||||
|
figure div#movim_block { left: 50%; top: 50%; } |
||||
|
figure div#database_block { left: 50%; top: 85%; } |
||||
|
figure div#xmpp_block { left: 85%; top: 15%; } |
||||
|
figure div#browser_block { left: 15%; top: 15%; line-height: 19em; } |
||||
|
figure div#daemon_block { left: 50%; top: 15%; } |
||||
|
figure div#api_block { left: 85%; top: 50%; } |
||||
|
|
||||
|
figure div.link { |
||||
|
width: 0; |
||||
|
height: 0; |
||||
|
border-radius: 1em; |
||||
|
padding: 0.25em; |
||||
|
line-height: 0em; |
||||
|
overflow: initial; |
||||
|
} |
||||
|
|
||||
|
figure div.link i { |
||||
|
background-color: white; |
||||
|
margin-top: -0.75em; |
||||
|
padding: 0.25em; |
||||
|
border-radius: 2em; |
||||
|
font-size: 2em; |
||||
|
} |
||||
|
|
||||
|
figure div.disabled { background-color: rgba(0, 0, 0, 0.1); color: white;} |
||||
|
figure div.success { background-color: #6FCC43; color: white; } |
||||
|
figure div.warning { background-color: #FC8F12; color: white; } |
||||
|
figure div.error { background-color: #D92727; color: white; } |
||||
|
|
||||
|
figure div.link.disabled { color: #CCC; } |
||||
|
figure div.link.success { color: #6FCC43; } |
||||
|
figure div.link.warning { color: #FC8F12; } |
||||
|
figure div.link.error { color: #D92727; } |
||||
|
|
||||
|
figure div.link.horizontal { |
||||
|
width: 35%; |
||||
|
} |
||||
|
|
||||
|
figure div.link.vertical { |
||||
|
height: 35%; |
||||
|
} |
||||
|
|
||||
|
figure div.link.vertical i { |
||||
|
top: 50%; |
||||
|
position: absolute; |
||||
|
margin-left: -0.75em; |
||||
|
} |
||||
|
|
||||
|
figure div.link#movim-daemon { |
||||
|
left: 60%; |
||||
|
top: 20%; |
||||
|
} |
||||
|
|
||||
|
figure div.link#movim-database { |
||||
|
left: 60%; |
||||
|
top: 55%; |
||||
|
} |
||||
|
|
||||
|
figure div.link#movim-browser { |
||||
|
left: 25%; |
||||
|
top: 55%; |
||||
|
} |
||||
|
|
||||
|
figure div.link#browser-daemon { |
||||
|
left: 25%; |
||||
|
top: 20%; |
||||
|
} |
||||
|
|
||||
|
figure div.link#daemon-xmpp { |
||||
|
left: 60%; |
||||
|
top: 20%; |
||||
|
} |
||||
|
|
||||
|
figure div.link#movim-api { |
||||
|
left: 60%; |
||||
|
top: 55%; |
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
var AdminTest = { |
||||
|
databaseOK : false, |
||||
|
weksocketOK : false, |
||||
|
apiOK : false, |
||||
|
movimOK : true, |
||||
|
|
||||
|
toggleConfiguration : function() { |
||||
|
if(this.databaseOK && this.websocketOK && this.movimOK) { |
||||
|
movim_remove_class('li.admingen', 'disabled'); |
||||
|
movim_remove_class('li.api', 'disabled'); |
||||
|
} else { |
||||
|
movim_add_class('li.admingen', 'disabled'); |
||||
|
movim_add_class('li.api', 'disabled'); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
enableWebsocket : function() { |
||||
|
this.websocketOK = true; |
||||
|
this.toggleConfiguration(); |
||||
|
|
||||
|
movim_remove_class('figure #browser-daemon', 'error'); |
||||
|
movim_add_class('figure #browser-daemon', 'success'); |
||||
|
|
||||
|
movim_toggle_display('#websocket_error'); |
||||
|
}, |
||||
|
|
||||
|
enableAPI : function() { |
||||
|
this.apiOK = true; |
||||
|
|
||||
|
movim_remove_class('figure #movim-api', 'disabled'); |
||||
|
movim_add_class('figure #movim-api', 'success'); |
||||
|
}, |
||||
|
|
||||
|
disableMovim : function() { |
||||
|
this.movimOK = false; |
||||
|
|
||||
|
movim_add_class('figure #movim_block', 'error'); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
MovimWebsocket.attach(function() { |
||||
|
AdminTest.enableWebsocket(); |
||||
|
}); |
||||
|
|
||||
|
movim_add_onload(function() { |
||||
|
AdminTest.toggleConfiguration(); |
||||
|
movim_toggle_display('#websocket_error'); |
||||
|
}); |
||||
@ -1,68 +1,87 @@ |
|||||
<div id="admincomp" class="tabelem paddedtop" title="{$c->__('admin.compatibility')}"> |
|
||||
<figure class="block"> |
|
||||
<div id="webserver"> |
|
||||
|
|
||||
</div> |
|
||||
<div id="movim-daemon" class="link vertical disabled"><i class="fa fa-cog"></i></div> |
|
||||
<div id="movim-browser" class="link horizontal success"><i class="fa fa-globe"></i></div> |
|
||||
<div id="browser-daemon" class="link horizontal error"><i class="fa fa-plug"></i></div> |
|
||||
<div id="daemon-xmpp" class="link horizontal success"><i class="fa fa-code"></i></div> |
|
||||
<div id="movim-database" class="link vertical {if="$dbconnected"}success {if="$dbinfos > 0"}warning{/if} {else}error{/if}"> |
|
||||
<i class="fa fa-database"></i> |
|
||||
</div> |
|
||||
<div id="movim-api" class="link horizontal error"><i class="fa fa-puzzle-piece"></i></div> |
|
||||
<div id="browser"> |
|
||||
Browser |
|
||||
</div> |
|
||||
<div id="movim"> |
|
||||
Movim Core |
|
||||
</div> |
|
||||
<div id="daemon"> |
|
||||
Movim Daemon |
|
||||
</div> |
|
||||
<div id="database" class="{if="$dbconnected"}success {if="$dbinfos > 0"}warning{/if} {else}error{/if}"> |
|
||||
Database |
|
||||
</div> |
|
||||
<div id="api"> |
|
||||
API |
|
||||
</div> |
|
||||
<div id="xmpp"> |
|
||||
XMPP |
|
||||
</div> |
|
||||
</figure> |
|
||||
|
<div id="admincomp" class="tabelem" title="{$c->__('admin.compatibility')}"> |
||||
<div class="block"> |
<div class="block"> |
||||
|
<figure> |
||||
|
<div id="webserver"> |
||||
|
|
||||
|
</div> |
||||
|
<div id="movim-daemon" class="link vertical disabled"><i class="fa fa-cog"></i></div> |
||||
|
<div id="movim-browser" class="link horizontal success"><i class="fa fa-globe"></i></div> |
||||
|
<div id="browser-daemon" class="link horizontal error"><i class="fa fa-plug"></i></div> |
||||
|
<div id="daemon-xmpp" class="link horizontal success"><i class="fa fa-code"></i></div> |
||||
|
<div id="movim-database" class="link vertical {if="$dbconnected"}success {if="$dbinfos > 0"}warning{/if} {else}error{/if}"> |
||||
|
<i class="fa fa-database"></i> |
||||
|
</div> |
||||
|
<div id="movim-api" class="link horizontal disabled"><i class="fa fa-puzzle-piece"></i></div> |
||||
|
<div id="browser_block"> |
||||
|
Browser |
||||
|
</div> |
||||
|
<div id="movim_block"> |
||||
|
Movim Core |
||||
|
</div> |
||||
|
<div id="daemon_block"> |
||||
|
Movim Daemon |
||||
|
</div> |
||||
|
<div id="database_block" class="{if="$dbconnected"}success {if="$dbinfos > 0"}warning{/if} {else}error{/if}"> |
||||
|
Database |
||||
|
</div> |
||||
|
<div id="api_block"> |
||||
|
API |
||||
|
</div> |
||||
|
<div id="xmpp_block"> |
||||
|
XMPP |
||||
|
</div> |
||||
|
</figure> |
||||
</div> |
</div> |
||||
|
|
||||
<fieldset> |
|
||||
<legend>{$c->__('admin.compatibility')}</legend> |
|
||||
<div class="clear"></div> |
|
||||
|
|
||||
|
<div class="block"> |
||||
<p> |
<p> |
||||
{$c->__('compatibility.info')} |
{$c->__('compatibility.info')} |
||||
</p><br /> |
|
||||
|
|
||||
<div class="{$c->valid($c->version())}"> |
|
||||
{$c->__('compatibility.php', PHP_VERSION)} |
|
||||
</div> |
|
||||
<div class="{$c->valid(extension_loaded('gd'))}"> |
|
||||
{$c->__('compatibility.gd')} |
|
||||
</div> |
|
||||
<div class="{$c->valid(extension_loaded('SimpleXml'))}"> |
|
||||
{$c->__('compatibility.simplexml')} |
|
||||
</div> |
|
||||
<div class="{$c->valid($c->testDir(DOCUMENT_ROOT))}"> |
|
||||
{$c->__('compatibility.rights')} |
|
||||
</div> |
|
||||
<div class="{$c->valid(extension_loaded('OpenSSL'))}"> |
|
||||
{$c->__('compatibility.openssl')} |
|
||||
|
</p> |
||||
|
|
||||
|
{if="$dbconnected"} |
||||
|
{if="$dbinfos > 0"} |
||||
|
<div class="message warning"> |
||||
|
<i class="fa fa-refresh"></i> The database need to be updated, go to the database panel to fix this |
||||
|
</div> |
||||
|
{else} |
||||
|
<script type="text/javascript">AdminTest.databaseOK = true</script> |
||||
|
{/if} |
||||
|
{else} |
||||
|
<div class="message error"> |
||||
|
<i class="fa fa-database"></i> Database connection error, check if database configuration exist in the <code>config/</code> folder and fill it with proper values |
||||
|
</div> |
||||
|
{/if} |
||||
|
|
||||
|
<div id="websocket_error" class="message error"> |
||||
|
<i class="fa fa-plug"></i> WebSocket connection error, check if the Movim Daemon is running and is reacheable |
||||
</div> |
</div> |
||||
</fieldset> |
|
||||
|
|
||||
<fieldset> |
|
||||
<legend>{$c->__('compatibility.rewrite')}</legend> |
|
||||
<div class="clear"></div> |
|
||||
<div class="{$c->valid($_SERVER['HTTP_MOD_REWRITE'])}"> |
|
||||
{$c->__('compatibility.rewrite')} |
|
||||
|
{if="!$c->version()"} |
||||
|
<div class="message error"> |
||||
|
<i class="fa fa-code"></i> {$c->__('compatibility.php', PHP_VERSION)} |
||||
</div> |
</div> |
||||
</fieldset> |
|
||||
|
<script type="text/javascript">AdminTest.disableMovim()</script> |
||||
|
{/if} |
||||
|
|
||||
|
{if="!extension_loaded('gd')"} |
||||
|
<div class="message error"> |
||||
|
<i class="fa fa-file-image-o"></i> {$c->__('compatibility.gd')} |
||||
|
</div> |
||||
|
<script type="text/javascript">AdminTest.disableMovim()</script> |
||||
|
{/if} |
||||
|
|
||||
|
{if="!$c->testDir(DOCUMENT_ROOT)"} |
||||
|
<div class="message error"> |
||||
|
<i class="fa fa-folder"></i> {$c->__('compatibility.rights')} |
||||
|
</div> |
||||
|
<script type="text/javascript">AdminTest.disableMovim()</script> |
||||
|
{/if} |
||||
|
|
||||
|
{if="!$_SERVER['HTTP_MOD_REWRITE']"} |
||||
|
<div class="message info"> |
||||
|
<i class="fa fa-pencil"></i> {$c->__('compatibility.rewrite')} |
||||
|
</div> |
||||
|
{/if} |
||||
|
</div> |
||||
|
|
||||
</div> |
</div> |
||||
@ -1,11 +1,9 @@ |
|||||
admin.compatibility = 'Compatibility Check' |
|
||||
|
admin.compatibility = 'General Overview' |
||||
|
|
||||
[compatibility] |
[compatibility] |
||||
compatibility.info = 'Movim requires certain external components. Please install them before you can succeed:' |
|
||||
compatibility.php = 'Your PHP-Version: %s <br>Required: 5.3.0' |
|
||||
compatibility.curl = 'CURL-Library' |
|
||||
compatibility.gd = 'GD' |
|
||||
compatibility.simplexml = 'SimpleXML' |
|
||||
|
compatibility.info = 'Movim has found some issues or things that need to be fixed or improved' |
||||
|
compatibility.php = 'Update your PHP-Version: %s <br>Required: 5.3.0' |
||||
|
compatibility.curl = 'Install the php5-curl library' |
||||
|
compatibility.gd = 'Install the php5-gd library' |
||||
compatibility.rights = "Read and write rights for the webserver in Movim's root directory" |
compatibility.rights = "Read and write rights for the webserver in Movim's root directory" |
||||
compatibility.openssl = 'OpenSSL' |
|
||||
compatibility.rewrite = 'URL Rewriting support' |
|
||||
|
compatibility.rewrite = 'The URL Rewriting support is currently disabled' |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue