        // delete related routing rules
        newRules = newTemplateSettings.routing.rules;
        if (oldData.type == "bridge") {
          newRules = newTemplateSettings.routing.rules.filter(r => !(r.inboundTag && r.inboundTag.length == 1 && r.inboundTag[0] == oldData.tag));
        } else if (oldData.type == "portal") {
          newRules = newTemplateSettings.routing.rules.filter(r => r.outboundTag != oldData.tag);
        }
        newTemplateSettings.routing.rules = newRules;

        this.template