From: 胡玮文 Date: Mon, 20 Dec 2021 04:54:23 +0000 (+0800) Subject: mgr/dashboard: fix white screen on Safari X-Git-Tag: v16.2.8~126^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45301%2Fhead;p=ceph.git mgr/dashboard: fix white screen on Safari Safari do not support lookbehind in regular expression. Fixes: https://tracker.ceph.com/issues/53665 Signed-off-by: 胡玮文 (cherry picked from commit d4b239c63595e1dc9772a135bf6b9c0608f852ce) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.ts index a36f1fbacaff..6bfb79d679c8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/host-form/host-form.component.ts @@ -110,7 +110,7 @@ export class HostFormComponent extends CdForm implements OnInit { // pattern to replace range [0-5] to [0..5](valid expression for brace expansion) // replace any kind of brackets with curly braces return hostname - .replace(/(?<=\d)\s*-\s*(?=\d)/g, '..') + .replace(/(\d)\s*-\s*(\d)/g, '$1..$2') .replace(/\(/g, '{') .replace(/\)/g, '}') .replace(/\[/g, '{')