Added file transfar setting support
This commit is contained in:
parent
48822c604a
commit
71bd55dada
5 changed files with 97 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
- Improved hostbanner reload (Not flicker anymore)
|
- Improved hostbanner reload (Not flicker anymore)
|
||||||
- Added sounds on servergroup assignment and on revoke as well for channel group changed
|
- Added sounds on servergroup assignment and on revoke as well for channel group changed
|
||||||
- Added client multiselect and multi actions
|
- Added client multiselect and multi actions
|
||||||
|
- Implemented serveredit file transfer support
|
||||||
|
|
||||||
* **03.11.18**
|
* **03.11.18**
|
||||||
- Reworked on the basic overlay sizes
|
- Reworked on the basic overlay sizes
|
||||||
|
|
|
@ -65,6 +65,32 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.container-file-transfer {
|
||||||
|
.settings {
|
||||||
|
.setting {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: stretch;
|
||||||
|
|
||||||
|
div {
|
||||||
|
flex-grow: 0;
|
||||||
|
|
||||||
|
&.suffix {
|
||||||
|
width: 50px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
&:first-of-type {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.channel_perm_tbl .value {
|
.channel_perm_tbl .value {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -431,7 +431,40 @@
|
||||||
</x-entry>
|
</x-entry>
|
||||||
<x-entry>
|
<x-entry>
|
||||||
<x-tag>Transfers</x-tag>
|
<x-tag>Transfers</x-tag>
|
||||||
<x-content>This needs to be implemented :)</x-content>
|
<x-content>
|
||||||
|
<div class="container-file-transfer">
|
||||||
|
<div class="group_box">
|
||||||
|
<div class="header">Upload</div>
|
||||||
|
<div class="content settings">
|
||||||
|
<div class="setting">
|
||||||
|
<div class="key">Bandwidth Limit:</div>
|
||||||
|
<input type="number" class="value virtualserver_max_upload_total_bandwidth" value="{{>virtualserver_max_upload_total_bandwidth}}"/>
|
||||||
|
<div class="suffix">Bytes/s</div>
|
||||||
|
</div>
|
||||||
|
<div class="setting">
|
||||||
|
<div class="key">Upload Quota:</div>
|
||||||
|
<input type="number" class="value virtualserver_upload_quota" value="{{>virtualserver_upload_quota}}"/>
|
||||||
|
<div class="suffix">MiB</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="group_box">
|
||||||
|
<div class="header">Download</div>
|
||||||
|
<div class="content settings">
|
||||||
|
<div class="setting">
|
||||||
|
<div class="key">Bandwidth Limit:</div>
|
||||||
|
<input type="number" class="value virtualserver_max_download_total_bandwidth" value="{{>virtualserver_max_download_total_bandwidth}}"/>
|
||||||
|
<div class="suffix">Bytes/s</div>
|
||||||
|
</div>
|
||||||
|
<div class="setting">
|
||||||
|
<div class="key">Download Quota:</div>
|
||||||
|
<input type="number" class="value virtualserver_download_quota" value="{{>virtualserver_download_quota}}"/>
|
||||||
|
<div class="suffix">MiB</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-content>
|
||||||
</x-entry>
|
</x-entry>
|
||||||
<x-entry>
|
<x-entry>
|
||||||
<x-tag>Anti-Flood</x-tag>
|
<x-tag>Anti-Flood</x-tag>
|
||||||
|
|
|
@ -30,6 +30,7 @@ namespace Modals {
|
||||||
});
|
});
|
||||||
|
|
||||||
server_applyGeneralListener(properties, modal.htmlTag.find(".properties_general"), modal.htmlTag.find(".button_ok"));
|
server_applyGeneralListener(properties, modal.htmlTag.find(".properties_general"), modal.htmlTag.find(".button_ok"));
|
||||||
|
server_applyTransferListener(properties, server, modal.htmlTag.find('.container-file-transfer'));
|
||||||
server_applyHostListener(properties, server.properties, modal.htmlTag.find(".properties_host"), modal.htmlTag.find(".button_ok"));
|
server_applyHostListener(properties, server.properties, modal.htmlTag.find(".properties_host"), modal.htmlTag.find(".button_ok"));
|
||||||
server_applyMessages(properties, server, modal.htmlTag.find(".properties_messages"));
|
server_applyMessages(properties, server, modal.htmlTag.find(".properties_messages"));
|
||||||
server_applyFlood(properties, server, modal.htmlTag.find(".properties_flood"));
|
server_applyFlood(properties, server, modal.htmlTag.find(".properties_flood"));
|
||||||
|
@ -319,4 +320,34 @@ namespace Modals {
|
||||||
properties.virtualserver_weblist_enabled = $(this).prop("checked");
|
properties.virtualserver_weblist_enabled = $(this).prop("checked");
|
||||||
}).prop("disabled", !globalClient.permissions.neededPermission(PermissionType.B_VIRTUALSERVER_MODIFY_WEBLIST).granted(1));
|
}).prop("disabled", !globalClient.permissions.neededPermission(PermissionType.B_VIRTUALSERVER_MODIFY_WEBLIST).granted(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function server_applyTransferListener(properties: ServerProperties, server: ServerEntry, tag: JQuery) {
|
||||||
|
server.updateProperties().then(() => {
|
||||||
|
//virtualserver_max_upload_total_bandwidth
|
||||||
|
//virtualserver_upload_quota
|
||||||
|
//virtualserver_max_download_total_bandwidth
|
||||||
|
//virtualserver_download_quota
|
||||||
|
|
||||||
|
tag.find(".virtualserver_max_upload_total_bandwidth").val(server.properties.virtualserver_max_upload_total_bandwidth);
|
||||||
|
tag.find(".virtualserver_upload_quota").val(server.properties.virtualserver_upload_quota);
|
||||||
|
tag.find(".virtualserver_max_download_total_bandwidth").val(server.properties.virtualserver_max_download_total_bandwidth);
|
||||||
|
tag.find(".virtualserver_download_quota").val(server.properties.virtualserver_download_quota);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
tag.find(".virtualserver_max_upload_total_bandwidth").change(function (this: HTMLInputElement) {
|
||||||
|
properties.virtualserver_max_upload_total_bandwidth = this.valueAsNumber;
|
||||||
|
}).prop("disabled", !globalClient.permissions.neededPermission(PermissionType.B_VIRTUALSERVER_MODIFY_FT_SETTINGS).granted(1));
|
||||||
|
tag.find(".virtualserver_max_download_total_bandwidth").change(function (this: HTMLInputElement) {
|
||||||
|
properties.virtualserver_max_download_total_bandwidth = this.valueAsNumber;
|
||||||
|
}).prop("disabled", !globalClient.permissions.neededPermission(PermissionType.B_VIRTUALSERVER_MODIFY_FT_SETTINGS).granted(1));
|
||||||
|
|
||||||
|
tag.find(".virtualserver_upload_quota").change(function (this: HTMLInputElement) {
|
||||||
|
properties.virtualserver_upload_quota = this.valueAsNumber;
|
||||||
|
}).prop("disabled", !globalClient.permissions.neededPermission(PermissionType.B_VIRTUALSERVER_MODIFY_FT_QUOTAS).granted(1));
|
||||||
|
tag.find(".virtualserver_download_quota").change(function (this: HTMLInputElement) {
|
||||||
|
properties.virtualserver_download_quota = this.valueAsNumber;
|
||||||
|
}).prop("disabled", !globalClient.permissions.neededPermission(PermissionType.B_VIRTUALSERVER_MODIFY_FT_QUOTAS).granted(1));
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -59,6 +59,11 @@ class ServerProperties {
|
||||||
virtualserver_needed_identity_security_level: number = 8;
|
virtualserver_needed_identity_security_level: number = 8;
|
||||||
virtualserver_weblist_enabled: boolean = false;
|
virtualserver_weblist_enabled: boolean = false;
|
||||||
virtualserver_min_clients_in_channel_before_forced_silence: number = 0;
|
virtualserver_min_clients_in_channel_before_forced_silence: number = 0;
|
||||||
|
|
||||||
|
virtualserver_max_upload_total_bandwidth: number = 0;
|
||||||
|
virtualserver_upload_quota: number = 0;
|
||||||
|
virtualserver_max_download_total_bandwidth: number = 0;
|
||||||
|
virtualserver_download_quota: number = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ServerAddress {
|
interface ServerAddress {
|
||||||
|
|
Loading…
Add table
Reference in a new issue