From d4b239c63595e1dc9772a135bf6b9c0608f852ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Mon, 20 Dec 2021 12:54:23 +0800 Subject: [PATCH] mgr/dashboard: fix white screen on Safari MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Safari do not support lookbehind in regular expression. Fixes: https://tracker.ceph.com/issues/53665 Signed-off-by: 胡玮文 --- .../src/app/ceph/cluster/hosts/host-form/host-form.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a36f1fbacaff3..6bfb79d679c88 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, '{') -- 2.39.5