Merge remote-tracking branch 'upstream/unstable' into backup

Conflicts:
	src/dist/js/script.min.js
This commit is contained in:
zamentur 2015-10-02 23:27:50 +02:00
commit 05b94e5c0b
9 changed files with 76 additions and 76 deletions

File diff suppressed because one or more lines are too long

View file

@ -7748,7 +7748,7 @@ var app = Sammy('#main', function (sam) {
*/
// Firewall status
sam.get('#/firewall', function (c) {
sam.get('#/tools/firewall', function (c) {
c.api('/firewall?raw', function(data) {
var firewall = {
ports : {},
@ -7769,12 +7769,12 @@ var app = Sammy('#main', function (sam) {
// Get UPnP status
firewall.upnp = data.uPnP.enabled;
c.view('firewall/firewall', firewall);
c.view('tools/tools_firewall', firewall);
});
});
// Enable/Disable UPnP
sam.get('#/firewall/upnp/:action', function (c) {
sam.get('#/tools/firewall/upnp/:action', function (c) {
c.confirm(
y18n.t('firewall'),
y18n.t('confirm_upnp_action', [y18n.t(c.params['action'])]),
@ -7782,12 +7782,12 @@ var app = Sammy('#main', function (sam) {
params = {'action' : c.params['action']};
c.api('/firewall/upnp', function(data) {
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}, 'GET', params);
},
function(){
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
);
});
@ -7802,7 +7802,7 @@ var app = Sammy('#main', function (sam) {
if (port != parseInt(port) || port < 0 || port > 65535) {
c.flash('fail', y18n.t('unknown_argument', [port]));
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
switch (connection) {
@ -7835,7 +7835,7 @@ var app = Sammy('#main', function (sam) {
default:
c.flash('fail', y18n.t('unknown_action', [action]));
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
if (method !== null && protocol !== null && port !== null) {
@ -7853,19 +7853,19 @@ var app = Sammy('#main', function (sam) {
};
c.api('/firewall/port?'+endurl, function(data) {
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}, method, params);
}
else {
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
return;
});
// Update port status from direct link
// #/firewall/port/{{@key}}/tcp/ipv4/close
sam.get('#/firewall/port/:port/:protocol/:connection/:action', function (c) {
sam.get('#/tools/firewall/port/:port/:protocol/:connection/:action', function (c) {
c.confirm(
y18n.t('firewall'),
y18n.t( 'confirm_firewall', [ y18n.t(c.params['action']), c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection'])]),
@ -7879,13 +7879,13 @@ var app = Sammy('#main', function (sam) {
},
function(){
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
);
});
// Update port status from form
sam.post('#/firewall/port', function (c) {
sam.post('#/tools/firewall/port', function (c) {
c.confirm(
y18n.t('firewall'),
y18n.t('confirm_firewall', [ y18n.t(c.params['action']), c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection']) ]),
@ -7899,7 +7899,7 @@ var app = Sammy('#main', function (sam) {
},
function(){
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
);
});
@ -7911,7 +7911,7 @@ var app = Sammy('#main', function (sam) {
*/
// Server monitoring
sam.get('#/monitor', function (c) {
sam.get('#/tools/monitor', function (c) {
monitorData = {};
// Why this method ?
@ -7939,7 +7939,7 @@ var app = Sammy('#main', function (sam) {
}
else {
monitorData.status = false;
c.view('monitor/monitor', monitorData);
c.view('tools/tools_monitor', monitorData);
}
}, 'GET');
@ -7990,7 +7990,7 @@ var app = Sammy('#main', function (sam) {
});
// System update & upgrade
sam.get('#/tools/update', function (c) {
sam.get('#/update', function (c) {
c.api('/update', function(data) {
packagesLength = data.packages.length;
for(var i = 0; i < packagesLength; i++) {
@ -8003,16 +8003,16 @@ var app = Sammy('#main', function (sam) {
data.packages[i].delayed = true;
}
}
c.view('tools/tools_update', data);
c.view('update/update', data);
}, 'PUT');
});
// Upgrade apps or packages
sam.get('#/tools/upgrade/:type', function (c) {
sam.get('#/upgrade/:type', function (c) {
if (c.params['type'] !== 'apps' && c.params['type'] !== 'packages') {
c.flash('fail', y18n.t('unknown_argument', [c.params['type']]));
store.clear('slide');
c.redirect('#/tools/update');
c.redirect('#/update');
}
else {
c.confirm(
@ -8026,13 +8026,13 @@ var app = Sammy('#main', function (sam) {
c.api('/upgrade?'+endurl, function(data) {
// 'log' is a reserved name, maybe in handlebars
data.logs = data.log;
c.view('tools/tools_upgrade', data);
c.view('upgrade/upgrade', data);
}, 'PUT');
},
function(){
store.clear('slide');
c.redirect('#/tools/update');
c.redirect('#/update');
}
);
}

View file

@ -1533,7 +1533,7 @@ var app = Sammy('#main', function (sam) {
*/
// Firewall status
sam.get('#/firewall', function (c) {
sam.get('#/tools/firewall', function (c) {
c.api('/firewall?raw', function(data) {
var firewall = {
ports : {},
@ -1554,12 +1554,12 @@ var app = Sammy('#main', function (sam) {
// Get UPnP status
firewall.upnp = data.uPnP.enabled;
c.view('firewall/firewall', firewall);
c.view('tools/tools_firewall', firewall);
});
});
// Enable/Disable UPnP
sam.get('#/firewall/upnp/:action', function (c) {
sam.get('#/tools/firewall/upnp/:action', function (c) {
c.confirm(
y18n.t('firewall'),
y18n.t('confirm_upnp_action', [y18n.t(c.params['action'])]),
@ -1567,12 +1567,12 @@ var app = Sammy('#main', function (sam) {
params = {'action' : c.params['action']};
c.api('/firewall/upnp', function(data) {
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}, 'GET', params);
},
function(){
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
);
});
@ -1587,7 +1587,7 @@ var app = Sammy('#main', function (sam) {
if (port != parseInt(port) || port < 0 || port > 65535) {
c.flash('fail', y18n.t('unknown_argument', [port]));
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
switch (connection) {
@ -1620,7 +1620,7 @@ var app = Sammy('#main', function (sam) {
default:
c.flash('fail', y18n.t('unknown_action', [action]));
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
if (method !== null && protocol !== null && port !== null) {
@ -1638,19 +1638,19 @@ var app = Sammy('#main', function (sam) {
};
c.api('/firewall/port?'+endurl, function(data) {
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}, method, params);
}
else {
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
return;
});
// Update port status from direct link
// #/firewall/port/{{@key}}/tcp/ipv4/close
sam.get('#/firewall/port/:port/:protocol/:connection/:action', function (c) {
sam.get('#/tools/firewall/port/:port/:protocol/:connection/:action', function (c) {
c.confirm(
y18n.t('firewall'),
y18n.t( 'confirm_firewall', [ y18n.t(c.params['action']), c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection'])]),
@ -1664,13 +1664,13 @@ var app = Sammy('#main', function (sam) {
},
function(){
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
);
});
// Update port status from form
sam.post('#/firewall/port', function (c) {
sam.post('#/tools/firewall/port', function (c) {
c.confirm(
y18n.t('firewall'),
y18n.t('confirm_firewall', [ y18n.t(c.params['action']), c.params['port'], y18n.t(c.params['protocol']), y18n.t(c.params['connection']) ]),
@ -1684,7 +1684,7 @@ var app = Sammy('#main', function (sam) {
},
function(){
store.clear('slide');
c.redirect('#/firewall');
c.redirect('#/tools/firewall');
}
);
});
@ -1696,7 +1696,7 @@ var app = Sammy('#main', function (sam) {
*/
// Server monitoring
sam.get('#/monitor', function (c) {
sam.get('#/tools/monitor', function (c) {
monitorData = {};
// Why this method ?
@ -1724,7 +1724,7 @@ var app = Sammy('#main', function (sam) {
}
else {
monitorData.status = false;
c.view('monitor/monitor', monitorData);
c.view('tools/tools_monitor', monitorData);
}
}, 'GET');
@ -1775,7 +1775,7 @@ var app = Sammy('#main', function (sam) {
});
// System update & upgrade
sam.get('#/tools/update', function (c) {
sam.get('#/update', function (c) {
c.api('/update', function(data) {
packagesLength = data.packages.length;
for(var i = 0; i < packagesLength; i++) {
@ -1788,16 +1788,16 @@ var app = Sammy('#main', function (sam) {
data.packages[i].delayed = true;
}
}
c.view('tools/tools_update', data);
c.view('update/update', data);
}, 'PUT');
});
// Upgrade apps or packages
sam.get('#/tools/upgrade/:type', function (c) {
sam.get('#/upgrade/:type', function (c) {
if (c.params['type'] !== 'apps' && c.params['type'] !== 'packages') {
c.flash('fail', y18n.t('unknown_argument', [c.params['type']]));
store.clear('slide');
c.redirect('#/tools/update');
c.redirect('#/update');
}
else {
c.confirm(
@ -1811,13 +1811,13 @@ var app = Sammy('#main', function (sam) {
c.api('/upgrade?'+endurl, function(data) {
// 'log' is a reserved name, maybe in handlebars
data.logs = data.log;
c.view('tools/tools_upgrade', data);
c.view('upgrade/upgrade', data);
}, 'PUT');
},
function(){
store.clear('slide');
c.redirect('#/tools/update');
c.redirect('#/update');
}
);
}

View file

@ -11,18 +11,14 @@
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading"><span class="fa-fw fa-rocket"></span> {{t 'applications'}}</h2>
</a>
<a href="#/update" class="list-group-item slide">
<span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading"><span class="fa-fw fa-refresh"></span> {{t 'system_update'}}</h2>
</a>
<a href="#/services" class="list-group-item slide clearfix">
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading"><span class="fa-fw fa-cog"></span> {{t 'services'}}</h2>
</a>
<a href="#/firewall" class="list-group-item slide clearfix">
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading"><span class="fa-fw fa-shield"></span> {{t 'firewall'}}</h2>
</a>
<a href="#/monitor" class="list-group-item slide clearfix">
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading"><span class="fa-fw fa-tachometer"></span> {{t 'monitoring'}}</h2>
</a>
<a href="#/tools" class="list-group-item slide clearfix">
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading"><span class="fa-fw fa-wrench"></span> {{t 'tools'}}</h2>

View file

@ -1,6 +1,7 @@
<div class="btn-breadcrumb">
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/firewall">{{t 'firewall'}}</a>
<a href="#/tools">{{t 'tools'}}</a>
<a href="#/tools/firewall">{{t 'firewall'}}</a>
</div>
<div class="separator"></div>
@ -28,20 +29,20 @@
<td>
{{#if this.ipv4}}
<span class="fa-check"></span>
<a class="btn btn-xs btn-danger" href="#/firewall/port/{{@key}}/tcp/ipv4/close">{{t 'close'}}</a>
<a class="btn btn-xs btn-danger" href="#/tools/firewall/port/{{@key}}/tcp/ipv4/close">{{t 'close'}}</a>
{{else}}
<span></span>
<span class="fa-times"></span>
<a class="btn btn-xs btn-success" href="#/firewall/port/{{@key}}/tcp/ipv4/open">{{t 'open'}}</a>
<a class="btn btn-xs btn-success" href="#/tools/firewall/port/{{@key}}/tcp/ipv4/open">{{t 'open'}}</a>
{{/if}}
</td>
<td>
{{#if this.ipv6}}
<span class="fa-check"></span>
<a class="btn btn-xs btn-danger" href="#/firewall/port/{{@key}}/tcp/ipv6/close">{{t 'close'}}</a>
<a class="btn btn-xs btn-danger" href="#/tools/firewall/port/{{@key}}/tcp/ipv6/close">{{t 'close'}}</a>
{{else}}
<span class="fa-times"></span>
<a class="btn btn-xs btn-success" href="#/firewall/port/{{@key}}/tcp/ipv6/open">{{t 'open'}}</a>
<a class="btn btn-xs btn-success" href="#/tools/firewall/port/{{@key}}/tcp/ipv6/open">{{t 'open'}}</a>
{{/if}}
</td>
<td>
@ -74,20 +75,20 @@
<td>
{{#if this.ipv4}}
<span class="fa-check"></span>
<a class="btn btn-xs btn-danger" href="#/firewall/port/{{@key}}/udp/ipv4/close">{{t 'close'}}</a>
<a class="btn btn-xs btn-danger" href="#/tools/firewall/port/{{@key}}/udp/ipv4/close">{{t 'close'}}</a>
{{else}}
<span></span>
<span class="fa-times"></span>
<a class="btn btn-xs btn-success" href="#/firewall/port/{{@key}}/udp/ipv4/open">{{t 'open'}}</a>
<a class="btn btn-xs btn-success" href="#/tools/firewall/port/{{@key}}/udp/ipv4/open">{{t 'open'}}</a>
{{/if}}
</td>
<td>
{{#if this.ipv6}}
<span class="fa-check"></span>
<a class="btn btn-xs btn-danger" href="#/firewall/port/{{@key}}/udp/ipv6/close">{{t 'close'}}</a>
<a class="btn btn-xs btn-danger" href="#/tools/firewall/port/{{@key}}/udp/ipv6/close">{{t 'close'}}</a>
{{else}}
<span class="fa-times"></span>
<a class="btn btn-xs btn-success" href="#/firewall/port/{{@key}}/udp/ipv6/open">{{t 'open'}}</a>
<a class="btn btn-xs btn-success" href="#/tools/firewall/port/{{@key}}/udp/ipv6/open">{{t 'open'}}</a>
{{/if}}
</td>
<td>
@ -121,7 +122,7 @@
<h2 class="panel-title"><span class="fa-fw fa-cog"></span> {{t 'operations'}}</h2>
</div>
<div class="panel-body">
<form action="#/firewall/port" method="POST" class="">
<form action="#/tools/firewall/port" method="POST" class="">
<div class="form-group row">
<div class="col-xs-6 col-sm-3">
<label for="action" class="control-label">{{t 'action'}}</label>
@ -167,10 +168,10 @@
<div class="panel-body">
{{#if upnp}}
<p class="text-success">{{t 'upnp_enabled'}}</p>
<a href="#/firewall/upnp/disable" class="btn btn-danger">{{t 'disable'}}</a>
<a href="#/tools/firewall/upnp/disable" class="btn btn-danger">{{t 'disable'}}</a>
{{else}}
<p class="text-danger">{{t 'upnp_disabled'}}</p>
<a href="#/firewall/upnp/enable" class="btn btn-success">{{t 'enable'}}</a>
<a href="#/tools/firewall/upnp/enable" class="btn btn-success">{{t 'enable'}}</a>
{{/if}}
</div>
</div>

View file

@ -11,10 +11,6 @@
<span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading">{{t 'tools_adminpw'}}</h2>
</a>
<a href="#/tools/update" class="list-group-item slide">
<span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading">{{t 'system_update'}}</h2>
</a>
<a href="#/tools/ca" class="list-group-item slide">
<span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading">{{t 'tools_download_ca'}}</h2>
@ -23,4 +19,12 @@
<span class="fa-chevron-right pull-right"></span>
<h2 class="list-group-item-heading">{{t 'tools_security_feed'}}</h2>
</a>
<a href="#/tools/monitor" class="list-group-item slide clearfix">
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading">{{t 'monitoring'}}</h2>
</a>
<a href="#/tools/firewall" class="list-group-item slide clearfix">
<span class="pull-right fa-chevron-right"></span>
<h2 class="list-group-item-heading">{{t 'firewall'}}</h2>
</a>
</div>

View file

@ -1,6 +1,7 @@
<div class="btn-breadcrumb">
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/monitor">{{t 'monitoring'}}</a>
<a href="#/tools">{{t 'tools'}}</a>
<a href="#/tools/monitor">{{t 'monitoring'}}</a>
</div>
<div class="separator"></div>

View file

@ -1,7 +1,6 @@
<div class="btn-breadcrumb">
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/tools">{{t 'tools'}}</a>
<a href="#/tools/update">{{t 'system_update'}}</a>
<a href="#/update">{{t 'system_update'}}</a>
</div>
<div class="separator"></div>
@ -27,7 +26,7 @@
{{/packages}}
</div>
<div class="panel-footer">
<a href="#/tools/upgrade/packages" class="btn btn-success">{{t 'system_upgrade_btn'}}</a>
<a href="#/upgrade/packages" class="btn btn-success">{{t 'system_upgrade_btn'}}</a>
</div>
{{else}}
<div class="panel-body">
@ -49,7 +48,7 @@
{{/apps}}
</div>
<div class="panel-footer">
<a href="#/tools/upgrade/apps" class="btn btn-success">{{t 'system_upgrade_btn'}}</a>
<a href="#/upgrade/apps" class="btn btn-success">{{t 'system_upgrade_btn'}}</a>
</div>
{{else}}
<div class="panel-body">

View file

@ -1,8 +1,7 @@
<div class="btn-breadcrumb">
<a href="#/" ><i class="fa-home"></i><span class="sr-only">{{t 'home'}}</span></a>
<a href="#/tools">{{t 'tools'}}</a>
<a href="#/tools/update">{{t 'system_update'}}</a>
<a href="#/tools/upgrade">{{t 'system_upgrade'}}</a>
<a href="#/update">{{t 'system_update'}}</a>
<a href="#/upgrade">{{t 'system_upgrade'}}</a>
</div>
<div class="separator"></div>