mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Merge pull request #236 from kay0u/add-apps-infos
Add apps infos in backup_info
This commit is contained in:
commit
ed57c01825
4 changed files with 22 additions and 12 deletions
|
@ -134,8 +134,8 @@
|
||||||
};
|
};
|
||||||
data.other_storages = [];
|
data.other_storages = [];
|
||||||
data.name = c.params['archive'];
|
data.name = c.params['archive'];
|
||||||
data.system_parts = c.groupHooks(Object.keys(data['system']));
|
data.system_parts = c.groupHooks(Object.keys(data['system']),data['system']);
|
||||||
data.items = (data['hooks']!={} || data['apps']!=[]);
|
data.items = (data['system']!={} || data['apps']!=[]);
|
||||||
data.locale = y18n.locale
|
data.locale = y18n.locale
|
||||||
c.view('backup/backup_info', data, c.selectAllOrNone);
|
c.view('backup/backup_info', data, c.selectAllOrNone);
|
||||||
});
|
});
|
||||||
|
|
|
@ -363,7 +363,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
groupHooks: function(hooks) {
|
groupHooks: function(hooks, raw_infos){
|
||||||
var data = {};
|
var data = {};
|
||||||
var rules = [
|
var rules = [
|
||||||
{
|
{
|
||||||
|
@ -376,6 +376,7 @@
|
||||||
|
|
||||||
$.each(hooks, function(i, hook) {
|
$.each(hooks, function(i, hook) {
|
||||||
var group_id=hook;
|
var group_id=hook;
|
||||||
|
var hook_size=(raw_infos && raw_infos[hook] && raw_infos[hook].size)?raw_infos[hook].size:0;
|
||||||
$.each(rules, function(i, rule) {
|
$.each(rules, function(i, rule) {
|
||||||
if (rule.isIn(hook)) {
|
if (rule.isIn(hook)) {
|
||||||
group_id = 'adminjs_group_'+rule.id;
|
group_id = 'adminjs_group_'+rule.id;
|
||||||
|
@ -387,14 +388,16 @@
|
||||||
data[group_id] = {
|
data[group_id] = {
|
||||||
name:y18n.t('hook_'+group_id),
|
name:y18n.t('hook_'+group_id),
|
||||||
value:data[group_id].value+','+hook,
|
value:data[group_id].value+','+hook,
|
||||||
description:data[group_id].description+', '+y18n.t('hook_'+hook)
|
description:data[group_id].description+', '+y18n.t('hook_'+hook),
|
||||||
|
size:data[group_id].size + hook_size
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
data[group_id] = {
|
data[group_id] = {
|
||||||
name:y18n.t('hook_'+group_id),
|
name:y18n.t('hook_'+group_id),
|
||||||
value:hook,
|
value:hook,
|
||||||
description:(group_id==hook)?y18n.t('hook_'+hook+'_desc'):y18n.t('hook_'+hook)
|
description:(group_id==hook)?y18n.t('hook_'+hook+'_desc'):y18n.t('hook_'+hook),
|
||||||
|
size:hook_size
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -155,20 +155,21 @@
|
||||||
"good_practices_about_admin_password": "You are now about to define a new admin password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).",
|
"good_practices_about_admin_password": "You are now about to define a new admin password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).",
|
||||||
"good_practices_about_user_password": "You are now about to define a new user password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).",
|
"good_practices_about_user_password": "You are now about to define a new user password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).",
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"hook_adminjs_group_configuration": "Configuration",
|
"hook_adminjs_group_configuration": "System configurations",
|
||||||
"hook_conf_cron": "Regular tasks",
|
"hook_conf_cron": "Automatic tasks",
|
||||||
"hook_conf_ldap": "LDAP",
|
"hook_conf_ynh_currenthost": "Current main domain",
|
||||||
|
"hook_conf_ldap": "LDAP database",
|
||||||
"hook_conf_nginx": "Nginx",
|
"hook_conf_nginx": "Nginx",
|
||||||
"hook_conf_ssh": "SSH",
|
"hook_conf_ssh": "SSH",
|
||||||
"hook_conf_ssowat": "SSOwat",
|
"hook_conf_ssowat": "SSOwat",
|
||||||
"hook_conf_xmpp": "XMPP",
|
"hook_conf_xmpp": "XMPP",
|
||||||
"hook_conf_ynh_certs": "Security certificates",
|
"hook_conf_ynh_certs": "SSL certificates",
|
||||||
"hook_conf_ynh_firewall": "Firewall",
|
"hook_conf_ynh_firewall": "Firewall",
|
||||||
"hook_conf_ynh_mysql": "Password MySQL",
|
"hook_conf_ynh_mysql": "MySQL password",
|
||||||
"hook_data_home": "User data",
|
"hook_data_home": "User data",
|
||||||
"hook_data_home_desc": "User data located in /home/USER",
|
"hook_data_home_desc": "User data located in /home/USER",
|
||||||
"hook_data_mail": "Mail",
|
"hook_data_mail": "Mail",
|
||||||
"hook_data_mail_desc": "Mails stored on the server",
|
"hook_data_mail_desc": "Raw emails stored on the server",
|
||||||
"hostname": "Hostname",
|
"hostname": "Hostname",
|
||||||
"id": "ID",
|
"id": "ID",
|
||||||
"inactive": "Inactive",
|
"inactive": "Inactive",
|
||||||
|
|
|
@ -40,7 +40,11 @@
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<input type="checkbox" id="{{@key}}" name="system_parts" value="{{value}}" checked class="nice-checkbox">
|
<input type="checkbox" id="{{@key}}" name="system_parts" value="{{value}}" checked class="nice-checkbox">
|
||||||
<label for="{{@key}}" class="pull-right"><span class="sr-only">{{t 'check'}}</span></label>
|
<label for="{{@key}}" class="pull-right"><span class="sr-only">{{t 'check'}}</span></label>
|
||||||
|
{{#if size}}
|
||||||
|
<h2 class="list-group-item-heading">{{name}} <small>({{ humanSize size }})</small></h2>
|
||||||
|
{{else}}
|
||||||
<h2 class="list-group-item-heading">{{name}}</h2>
|
<h2 class="list-group-item-heading">{{name}}</h2>
|
||||||
|
{{/if}}
|
||||||
<p class="list-group-item-text">{{description}}</p>
|
<p class="list-group-item-text">{{description}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -48,7 +52,9 @@
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<input type="checkbox" id="{{@key}}" name="apps" value="{{@key}}" checked class="nice-checkbox">
|
<input type="checkbox" id="{{@key}}" name="apps" value="{{@key}}" checked class="nice-checkbox">
|
||||||
<label for="{{@key}}" class="pull-right"><span class="sr-only">{{t 'check'}}</span></label>
|
<label for="{{@key}}" class="pull-right"><span class="sr-only">{{t 'check'}}</span></label>
|
||||||
<h2 class="list-group-item-heading">{{name}} <small>{{@key}}</small></h2>
|
<h2 class="list-group-item-heading">{{name}} <small>{{@key}} ({{ humanSize size }})</small></h2>
|
||||||
|
<p class="list-group-item-text">{{description}}</p>
|
||||||
|
<p class="list-group-item-text">{{t 'version'}} {{version}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<div class="list-group-item clearfix">
|
<div class="list-group-item clearfix">
|
||||||
|
|
Loading…
Add table
Reference in a new issue