fix UPID parser

Allow '-' in host names.
This commit is contained in:
Dietmar Maurer 2011-09-23 13:27:26 +02:00
parent b203155d00
commit 55d19d9bab

View File

@ -383,7 +383,7 @@ Ext.define('PVE.Utils', { statics: {
parse_task_upid: function(upid) {
var task = {};
var res = upid.match(/^UPID:(\w+):([0-9A-Fa-f]{8}):([0-9A-Fa-f]{8}):([0-9A-Fa-f]{8}):([^:\s]+):([^:\s]*):([^:\s]+):$/);
var res = upid.match(/^UPID:(\S+):([0-9A-Fa-f]{8}):([0-9A-Fa-f]{8}):([0-9A-Fa-f]{8}):([^:\s]+):([^:\s]*):([^:\s]+):$/);
if (!res) {
throw "unable to parse upid '" + upid + "'";
}