emailengine-app 2.81.2 → 2.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ncurc.js +33 -10
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +71 -0
- package/DOCKER_DEPLOYMENT.md +13 -12
- package/Dockerfile +2 -0
- package/bin/emailengine.js +105 -25
- package/config/default.toml +0 -5
- package/config/test.toml +0 -5
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +70 -42
- package/getswagger.sh +0 -4
- package/lib/account/account-state.js +2 -110
- package/lib/account/expected-identity.js +1 -1
- package/lib/account-assignment.js +138 -1
- package/lib/account.js +289 -869
- package/lib/api-reference/index.js +2 -3
- package/lib/api-reference/schema-tree.js +53 -3
- package/lib/api-routes/account-binding.js +58 -0
- package/lib/api-routes/account-routes.js +65 -37
- package/lib/api-routes/behavior-notes.js +4 -0
- package/lib/api-routes/blocklist-routes.js +2 -2
- package/lib/api-routes/bull-board-routes.js +1 -6
- package/lib/api-routes/export-routes.js +2 -22
- package/lib/api-routes/gateway-routes.js +15 -16
- package/lib/api-routes/index.js +1 -13
- package/lib/api-routes/mailbox-routes.js +2 -7
- package/lib/api-routes/mcp-oauth-routes.js +2 -1
- package/lib/api-routes/mcp-routes.js +7 -7
- package/lib/api-routes/message-routes.js +50 -238
- package/lib/api-routes/mint-bounds.js +110 -0
- package/lib/api-routes/oauth2-app-routes.js +23 -32
- package/lib/api-routes/operation-impact.js +1 -1
- package/lib/api-routes/outbox-routes.js +3 -3
- package/lib/api-routes/permission-map.js +1 -7
- package/lib/api-routes/route-helpers.js +11 -5
- package/lib/api-routes/settings-routes.js +20 -21
- package/lib/api-routes/stats-routes.js +1 -1
- package/lib/api-routes/submit-routes.js +17 -18
- package/lib/api-routes/template-routes.js +4 -9
- package/lib/api-routes/token-routes.js +28 -6
- package/lib/api-token-scheme.js +71 -0
- package/lib/arf-detect.js +33 -6
- package/lib/auth-token.js +44 -24
- package/lib/autodetect-imap-settings.js +305 -123
- package/lib/bounce-detect.js +25 -16
- package/lib/calendar-event.js +78 -0
- package/lib/consts.js +54 -5
- package/lib/create-imap-client.js +24 -0
- package/lib/db.js +77 -30
- package/lib/delivery-error.js +70 -2
- package/lib/egress-fetch.js +54 -3
- package/lib/egress-filter.js +11 -0
- package/lib/email-client/api-retry.js +147 -0
- package/lib/email-client/base-client.js +383 -536
- package/lib/email-client/credential-errors.js +21 -5
- package/lib/email-client/gmail/gmail-api.js +38 -125
- package/lib/email-client/gmail/send-request.js +1 -1
- package/lib/email-client/gmail-client.js +77 -51
- package/lib/email-client/imap/mailbox.js +158 -324
- package/lib/email-client/imap/stale-view.js +109 -0
- package/lib/email-client/imap/subconnection.js +46 -9
- package/lib/email-client/imap/sync-operations.js +5 -37
- package/lib/email-client/imap-client.js +190 -65
- package/lib/email-client/message-builder.js +50 -25
- package/lib/email-client/notification-handler.js +5 -219
- package/lib/email-client/outlook/graph-api.js +147 -126
- package/lib/email-client/outlook/send-request.js +10 -4
- package/lib/email-client/outlook-client.js +389 -463
- package/lib/email-client/smtp-pool-manager.js +3 -2
- package/lib/encrypt.js +184 -19
- package/lib/enum-descriptions.js +6 -3
- package/lib/export.js +141 -41
- package/lib/gateway.js +25 -6
- package/lib/get-raw-email.js +26 -44
- package/lib/get-secret.js +1 -21
- package/lib/handlebars-helpers.js +31 -10
- package/lib/imap-proxy-auth.js +13 -29
- package/lib/imapproxy/imap-core/README.md +1 -0
- package/lib/imapproxy/imap-core/lib/handler/imap-parser.js +12 -0
- package/lib/imapproxy/imap-core/lib/imap-command.js +74 -10
- package/lib/imapproxy/imap-core/lib/imap-connection.js +9 -1
- package/lib/imapproxy/imap-core/lib/imap-server.js +112 -26
- package/lib/imapproxy/imap-core/lib/imap-stream.js +41 -1
- package/lib/imapproxy/imap-core/lib/imap-tools.js +10 -2
- package/lib/imapproxy/imap-core/lib/indexer/indexer.js +4 -2
- package/lib/imapproxy/imap-server.js +17 -177
- package/lib/imapproxy/proxy-handoff.js +235 -0
- package/lib/imapproxy/response-error.js +33 -0
- package/lib/imapproxy/upstream-client.js +2 -2
- package/lib/license-beacon.js +3 -9
- package/lib/llm-pre-process.js +182 -43
- package/lib/logger.js +1 -1
- package/lib/lua/ee-export-queue-add.lua +39 -0
- package/lib/lua/ee-get-idempotency.lua +15 -3
- package/lib/lua/ee-release-attempts.lua +23 -0
- package/lib/lua/ee-reserve-attempts.lua +42 -0
- package/lib/lua/h-set-bigger.lua +12 -2
- package/lib/lua/s-list-accounts.lua +6 -3
- package/lib/mcp/index.js +1 -2
- package/lib/mcp/listen.js +221 -18
- package/lib/mcp/oauth.js +44 -5
- package/lib/mcp/resources.js +8 -2
- package/lib/mcp/tools.js +108 -36
- package/lib/message-port-stream.js +64 -6
- package/lib/oauth/external-account-signer.js +16 -13
- package/lib/oauth/gmail.js +64 -32
- package/lib/oauth/mail-ru.js +24 -17
- package/lib/oauth/outlook.js +53 -40
- package/lib/oauth/pubsub/google.js +38 -2
- package/lib/oauth/scope-checker.js +39 -8
- package/lib/oauth/scope-list.js +55 -0
- package/lib/oauth/token-fetch.js +47 -0
- package/lib/oauth/verify-app.js +2 -2
- package/lib/oauth2-apps.js +154 -90
- package/lib/openapi/build-document.js +1 -1
- package/lib/openapi/joi-schema.js +78 -9
- package/lib/outbox.js +2 -7
- package/lib/parse-message.js +21 -0
- package/lib/payload-examples-webhooks.json +4 -7
- package/lib/pbkdf2-phc.js +101 -0
- package/lib/privileged-settings.js +0 -14
- package/lib/queue-retention.js +4 -2
- package/lib/rate-limit.js +54 -15
- package/lib/read-env-value.js +33 -2
- package/lib/redis-scan-delete.js +56 -29
- package/lib/redis-url.js +3 -1
- package/lib/respawn-backoff.js +5 -4
- package/lib/response-stream.js +25 -4
- package/lib/rewrite-text-nodes.js +27 -40
- package/lib/routes-ui.js +0 -5
- package/lib/schemas.js +180 -253
- package/lib/sentry.js +21 -5
- package/lib/settings.js +58 -59
- package/lib/smtp-auth.js +6 -2
- package/lib/smtp-message-processor.js +28 -7
- package/lib/sso.js +7 -3
- package/lib/stream-encrypt.js +14 -13
- package/lib/swagger-options.js +3 -1
- package/lib/tls/provision.js +69 -3
- package/lib/tls/store.js +14 -1
- package/lib/token-audit-log.js +3 -2
- package/lib/tools.js +114 -53
- package/lib/totp.js +16 -1
- package/lib/ui-routes/account-routes.js +67 -70
- package/lib/ui-routes/admin-config-routes.js +111 -134
- package/lib/ui-routes/admin-entities-routes.js +101 -191
- package/lib/ui-routes/ai-options.js +104 -0
- package/lib/ui-routes/auth-routes.js +98 -18
- package/lib/ui-routes/export-routes.js +3 -23
- package/lib/ui-routes/internals-routes.js +12 -9
- package/lib/ui-routes/network-config-routes.js +8 -18
- package/lib/ui-routes/oauth-config-routes.js +83 -228
- package/lib/ui-routes/route-helpers.js +63 -67
- package/lib/ui-routes/special-use-paths.js +33 -0
- package/lib/ui-routes/unsubscribe-routes.js +2 -2
- package/lib/utils/decode-headers.js +32 -5
- package/lib/utils/header-map.js +62 -1
- package/lib/utils/network.js +11 -17
- package/lib/web-safe-html.js +77 -4
- package/lib/webhook-request.js +9 -1
- package/lib/webhook-routing.js +27 -1
- package/lib/webhooks.js +120 -43
- package/lib/worker-rpc-error.js +43 -2
- package/list-generate.js +13 -2
- package/package.json +38 -46
- package/sbom.json +1 -1
- package/scripts/refresh-test-tokens.js +42 -14
- package/server.js +338 -292
- package/setup-production.sh +16 -7
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +7 -8
- package/static/js/ee-client.js +145 -70
- package/static/js/ui.js +350 -154
- package/static/licenses.html +349 -1740
- package/translations/messages.pot +129 -111
- package/views/account-workspace-error.hbs +30 -0
- package/views/accounts/account.hbs +9 -4
- package/views/accounts/browse.hbs +10 -4
- package/views/accounts/edit.hbs +11 -2
- package/views/config/ai.hbs +49 -41
- package/views/config/oauth/app.hbs +2 -1
- package/views/dashboard.hbs +18 -16
- package/views/internals/index.hbs +1 -1
- package/views/layout/app.hbs +0 -22
- package/views/layout/login.hbs +2 -1
- package/views/partials/filter_editor_js.hbs +4 -3
- package/views/partials/gmail_api_scopes.hbs +16 -0
- package/views/partials/oauth_form.hbs +67 -94
- package/views/partials/oauth_pubsub_app_select.hbs +43 -0
- package/views/partials/scope_info.hbs +14 -23
- package/views/partials/side_menu.hbs +0 -4
- package/views/partials/ui/account-picker.hbs +6 -32
- package/views/partials/ui/model-picker.hbs +31 -0
- package/views/partials/ui/pagination.hbs +6 -1
- package/views/partials/ui/picker.hbs +47 -0
- package/views/unsubscribe.hbs +1 -1
- package/workers/api.js +82 -47
- package/workers/export.js +55 -60
- package/workers/imap.js +132 -49
- package/workers/submit.js +5 -6
- package/workers/webhooks.js +46 -27
- package/.githooks/pre-commit +0 -80
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/contributing.md +0 -17
- package/.github/dependabot.yml +0 -22
- package/.github/docker-smoke-test.sh +0 -61
- package/.github/workflows/deploy.yml +0 -215
- package/.github/workflows/e2e.yml +0 -55
- package/.github/workflows/release.yaml +0 -217
- package/.github/workflows/test.yml +0 -307
- package/lib/api-routes/chat-routes.js +0 -535
- package/lib/document-store.js +0 -75
- package/lib/es.js +0 -757
- package/lib/generate-text-preview.js +0 -61
- package/lib/imapproxy/imap-core/memory-notifier.js +0 -129
- package/lib/pre-process.js +0 -196
- package/lib/threads.js +0 -155
- package/lib/ui-routes/document-store-routes.js +0 -806
- package/playwright.config.js +0 -47
- package/views/config/document-store/chat.hbs +0 -286
- package/views/config/document-store/index.hbs +0 -146
- package/views/config/document-store/mappings/index.hbs +0 -108
- package/views/config/document-store/mappings/new.hbs +0 -68
- package/views/config/document-store/pre-processing/index.hbs +0 -103
- package/views/partials/document_store_header.hbs +0 -30
- package/workers/documents.js +0 -1128
package/playwright.config.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Playwright config for the EmailEngine happy-path e2e suite (test/e2e). Boots a fresh
|
|
4
|
-
// EmailEngine via the webServer command (flush the isolated Redis db 14, then `node server.js`
|
|
5
|
-
// with NODE_ENV=e2e -> config/e2e.toml) and drives it with a real browser.
|
|
6
|
-
//
|
|
7
|
-
// Run once: npm run test:e2e:install (fetch the Chromium browser)
|
|
8
|
-
// Run suite: npm run test:e2e
|
|
9
|
-
|
|
10
|
-
const { defineConfig, devices } = require('@playwright/test');
|
|
11
|
-
|
|
12
|
-
const { BASE_URL } = require('./test/e2e/helpers/bootstrap');
|
|
13
|
-
|
|
14
|
-
module.exports = defineConfig({
|
|
15
|
-
testDir: './test/e2e',
|
|
16
|
-
testMatch: '**/*.spec.js',
|
|
17
|
-
// One worker against one app + one database keeps the fresh-instance flow predictable.
|
|
18
|
-
fullyParallel: false,
|
|
19
|
-
workers: 1,
|
|
20
|
-
forbidOnly: !!process.env.CI,
|
|
21
|
-
retries: process.env.CI ? 1 : 0,
|
|
22
|
-
// The single happy-path test chains several slow external steps (Ethereal provisioning,
|
|
23
|
-
// trial activation against postalsys.com, IMAP connect, message read-back).
|
|
24
|
-
timeout: 300000,
|
|
25
|
-
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list',
|
|
26
|
-
use: {
|
|
27
|
-
baseURL: BASE_URL,
|
|
28
|
-
trace: 'on-first-retry'
|
|
29
|
-
},
|
|
30
|
-
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
|
31
|
-
webServer: {
|
|
32
|
-
// Flush the isolated e2e Redis DB so every run starts from a clean, unconfigured instance.
|
|
33
|
-
command: 'node test/helpers/flush-redis.js && node server.js',
|
|
34
|
-
url: BASE_URL,
|
|
35
|
-
timeout: 120000,
|
|
36
|
-
// Always boot fresh: the suite asserts fresh-instance behaviour (enabling auth, activating
|
|
37
|
-
// the trial), so a reused server with those already set would break it. The dedicated
|
|
38
|
-
// db 14 makes the pre-boot flush safe.
|
|
39
|
-
reuseExistingServer: false,
|
|
40
|
-
stdout: 'pipe',
|
|
41
|
-
stderr: 'pipe',
|
|
42
|
-
// EENGINE_DOCUMENT_STORE_ENABLED opens the deprecated Document Store
|
|
43
|
-
// gate so its admin pages render (they 404 with the gate off) - the
|
|
44
|
-
// pages-admin spec smoke-tests them
|
|
45
|
-
env: Object.assign({}, process.env, { NODE_ENV: 'e2e', EENGINE_DOCUMENT_STORE_ENABLED: 'true' })
|
|
46
|
-
}
|
|
47
|
-
});
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
{{> document_store_header}}
|
|
2
|
-
|
|
3
|
-
<form method="post" action="/admin/config/document-store/chat">
|
|
4
|
-
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
5
|
-
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
6
|
-
|
|
7
|
-
<div class="card bg-base-100 shadow-md mb-6">
|
|
8
|
-
|
|
9
|
-
<div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
|
|
10
|
-
|
|
11
|
-
<div>
|
|
12
|
-
<div class="flex items-center gap-2">
|
|
13
|
-
<input type="checkbox"
|
|
14
|
-
class="checkbox checkbox-sm{{#if errors.documentStoreGenerateEmbeddings}} is-invalid{{/if}}"
|
|
15
|
-
id="documentStoreGenerateEmbeddings" name="documentStoreGenerateEmbeddings" {{#if
|
|
16
|
-
values.documentStoreGenerateEmbeddings}}checked{{/if}} />
|
|
17
|
-
<label class="label-text p-0" for="documentStoreGenerateEmbeddings">Enable the "Chat with emails"
|
|
18
|
-
feature</label>
|
|
19
|
-
|
|
20
|
-
{{#> ui/tooltip text="Requires Elasticsearch 8.8.0+"}}<span
|
|
21
|
-
class="icon-[tabler--info-circle] size-4 text-base-content/50"></span>{{/ui/tooltip}}
|
|
22
|
-
|
|
23
|
-
{{#unless documentStoreEnabled}}
|
|
24
|
-
{{#> ui/tooltip-rich icon="icon-[tabler--alert-triangle] text-error"}}
|
|
25
|
-
<strong>Document store is not enabled</strong><br>
|
|
26
|
-
Document Store syncing must be enabled to use the "Chat with emails" feature
|
|
27
|
-
{{/ui/tooltip-rich}}
|
|
28
|
-
{{/unless}}
|
|
29
|
-
</div>
|
|
30
|
-
{{#if errors.documentStoreGenerateEmbeddings}}
|
|
31
|
-
<span class="helper-text text-error">{{errors.documentStoreGenerateEmbeddings}}</span>
|
|
32
|
-
{{/if}}
|
|
33
|
-
<span class="helper-text">If enabled, then EmailEngine uses the OpenAI API to produce text embeddings
|
|
34
|
-
for emails in the document store. For this feature to work, ensure document store syncing is active
|
|
35
|
-
and that the OpenAI API key is configured. You can run chat requests with the <a
|
|
36
|
-
href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount" target="_blank" rel="noopener noreferrer"
|
|
37
|
-
class="link link-animated">Chat API method</a>.</span>
|
|
38
|
-
<div class="mt-2"><small><strong>Important:</strong> EmailEngine will only create embeddings for emails
|
|
39
|
-
processed when the feature is active. To generate embeddings for previously stored emails,
|
|
40
|
-
use the <a href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
|
|
41
|
-
rel="noopener noreferrer" class="link link-animated">Flush API method</a>. This will force
|
|
42
|
-
EmailEngine to re-process all emails in the Document Store.</small>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div class="text-end flex flex-col justify-between gap-2">
|
|
50
|
-
|
|
51
|
-
<div class="space-y-1">
|
|
52
|
-
{{!-- nofloat: stacked reference column, like the two entries under it --}}
|
|
53
|
-
{{> ui/setting-ref name="documentStoreGenerateEmbeddings" nofloat=true class="whitespace-nowrap"}}
|
|
54
|
-
|
|
55
|
-
{{> ui/setting-ref name="Chat with emails" href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount"
|
|
56
|
-
nofloat=true class="whitespace-nowrap"}}
|
|
57
|
-
|
|
58
|
-
{{> ui/setting-ref name="Request account flush" href="/admin/reference/account#putV1AccountAccountFlush"
|
|
59
|
-
nofloat=true class="whitespace-nowrap"}}
|
|
60
|
-
|
|
61
|
-
<div>
|
|
62
|
-
{{#if values.documentStoreGenerateEmbeddings}}
|
|
63
|
-
{{> ui/badge label="enabled" variant="success"}}
|
|
64
|
-
{{else}}
|
|
65
|
-
{{> ui/badge label="disabled" variant="warning"}}
|
|
66
|
-
{{/if}}
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<div class="self-end">
|
|
71
|
-
{{> ui/btn label="Try it" style="soft" size="sm" icon="icon-[tabler--message]" id="try-chat-btn"
|
|
72
|
-
overlay="#tryChatModal"}}
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div class="card-body space-y-4">
|
|
80
|
-
|
|
81
|
-
{{#if indexInfo.error}}
|
|
82
|
-
<div class="alert alert-soft alert-error block">
|
|
83
|
-
<strong>Index handling failed:</strong> <br>
|
|
84
|
-
<pre class="ee-code-block">{{indexInfo.error}}</pre>
|
|
85
|
-
</div>
|
|
86
|
-
{{/if}}
|
|
87
|
-
|
|
88
|
-
<div>
|
|
89
|
-
{{> ui/setting-ref name="openAiAPIKey"}}
|
|
90
|
-
{{#> ui/form-field id="openAiAPIKey" label="OpenAI API key" error=errors.openAiAPIKey}}
|
|
91
|
-
<input type="password" class="input{{#if errors.openAiAPIKey}} is-invalid{{/if}}" id="openAiAPIKey"
|
|
92
|
-
name="openAiAPIKey" value="{{values.openAiAPIKey}}" data-lpignore="true" autocomplete="off" {{#if
|
|
93
|
-
hasOpenAiAPIKey}} placeholder="API key is set but not shown…" {{/if}} />
|
|
94
|
-
<span class="helper-text">OpenAI API key. This is the same key that is set on the <a
|
|
95
|
-
href="/admin/config/ai" class="link link-animated">AI Processing</a> page.</span>
|
|
96
|
-
{{/ui/form-field}}
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
<div>
|
|
100
|
-
{{> ui/setting-ref name="documentStoreChatModel"}}
|
|
101
|
-
{{#> ui/form-field id="settingsServicedocumentStoreChatModel" label="OpenAI Model"
|
|
102
|
-
error=errors.documentStoreChatModel}}
|
|
103
|
-
<select id="settingsServicedocumentStoreChatModel"
|
|
104
|
-
class="select max-w-md{{#if errors.documentStoreChatModel}} is-invalid{{/if}}"
|
|
105
|
-
name="documentStoreChatModel">
|
|
106
|
-
{{#each openAiModels}}
|
|
107
|
-
<option value="{{id}}" {{#if selected}}selected{{/if}}>{{name}}</option>
|
|
108
|
-
{{/each}}
|
|
109
|
-
</select>
|
|
110
|
-
<span class="helper-text">Select the model to use to ask questions. Ensure your account can use the
|
|
111
|
-
selected model, or chat requests will fail.</span>
|
|
112
|
-
{{/ui/form-field}}
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<div class="mb-6">
|
|
120
|
-
{{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
</form>
|
|
124
|
-
|
|
125
|
-
{{#> ui/modal id="tryChatModal" title="Send a chat message" titleId="tryChatModalLabel" dialogClass="max-w-3xl"}}
|
|
126
|
-
<form id="chatPayloadForm" method="post" action=".">
|
|
127
|
-
<div class="modal-body space-y-4">
|
|
128
|
-
<div>
|
|
129
|
-
{{> ui/setting-ref prefix="API Reference: " name="/v1/chat/{account}" href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount"}}
|
|
130
|
-
{{#> ui/form-field id="inputAccount" label="Account ID"}}
|
|
131
|
-
<input type="text" class="input" name="account" id="inputAccount" aria-describedby="inputAccountHelp"
|
|
132
|
-
value="" required>
|
|
133
|
-
<span class="helper-text">ID of the account whose emails you want to search.</span>
|
|
134
|
-
{{/ui/form-field}}
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<div>
|
|
138
|
-
{{#> ui/form-field id="question" label="Question"}}
|
|
139
|
-
<input type="text" class="input" name="question" id="question" aria-describedby="questionHelp" value=""
|
|
140
|
-
required>
|
|
141
|
-
<span class="helper-text">Ask a question about this account's stored emails.</span>
|
|
142
|
-
{{/ui/form-field}}
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<div id="chat-error" class="hidden">
|
|
146
|
-
<div class="alert alert-soft alert-error">
|
|
147
|
-
<span><strong>Request failed</strong>: <span id="chat-error-text"></span></span>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<div id="chat-response" class="hidden">
|
|
152
|
-
<div class="card border border-base-content/10">
|
|
153
|
-
<div class="card-body">
|
|
154
|
-
<div>
|
|
155
|
-
<div id="chat-response-answer"></div>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
<ul class="hidden mt-2 divide-y divide-base-content/10 border-t border-base-content/10"
|
|
159
|
-
id="chat-response-messages">
|
|
160
|
-
</ul>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
</div>
|
|
165
|
-
<div class="modal-footer">
|
|
166
|
-
{{> ui/btn label="Close" variant="neutral" style="soft" overlay="#tryChatModal"}}
|
|
167
|
-
<button type="submit" id="send-question-btn" class="btn btn-primary">
|
|
168
|
-
<span class="icon-[tabler--message] size-4" id="send-question-btn-icon"></span>
|
|
169
|
-
Ask
|
|
170
|
-
</button>
|
|
171
|
-
</div>
|
|
172
|
-
</form>
|
|
173
|
-
{{/ui/modal}}
|
|
174
|
-
|
|
175
|
-
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
176
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
177
|
-
|
|
178
|
-
const sendQuestionPayload = async () => {
|
|
179
|
-
const data = await uiPostJson('/admin/config/document-store/chat/test', {
|
|
180
|
-
account: document.getElementById('inputAccount').value,
|
|
181
|
-
question: document.getElementById('question').value
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
if (data.error) {
|
|
185
|
-
throw new Error(data.error);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return data;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
let sendQuestionBtn = document.getElementById('send-question-btn')
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
let chatErrorElm = document.getElementById('chat-error')
|
|
195
|
-
let chatErrorTextElm = document.getElementById('chat-error-text')
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
let chatResponseElm = document.getElementById('chat-response');
|
|
199
|
-
let chatResponseAnswerElm = document.getElementById('chat-response-answer');
|
|
200
|
-
let chatResponseMessagesElm = document.getElementById('chat-response-messages');
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
function showError(message) {
|
|
204
|
-
chatErrorElm.classList.remove('hidden');
|
|
205
|
-
chatResponseElm.classList.add('hidden');
|
|
206
|
-
|
|
207
|
-
chatErrorTextElm.textContent = message
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function showChatResponse(message) {
|
|
211
|
-
chatErrorElm.classList.add('hidden');
|
|
212
|
-
chatResponseElm.classList.remove('hidden');
|
|
213
|
-
|
|
214
|
-
chatResponseAnswerElm.innerHTML = ''
|
|
215
|
-
if (message.answer) {
|
|
216
|
-
chatResponseAnswerElm.textContent = message.answer;
|
|
217
|
-
} else {
|
|
218
|
-
let mutedElm = document.createElement('small');
|
|
219
|
-
mutedElm.classList.add('text-base-content/60')
|
|
220
|
-
mutedElm.textContent = 'EmailEngine was not able to find an answer to this question.'
|
|
221
|
-
chatResponseAnswerElm.appendChild(mutedElm)
|
|
222
|
-
}
|
|
223
|
-
chatResponseMessagesElm.innerHTML = ''
|
|
224
|
-
|
|
225
|
-
if (message.messages && message.messages.length) {
|
|
226
|
-
chatResponseMessagesElm.classList.remove('hidden');
|
|
227
|
-
} else {
|
|
228
|
-
chatResponseMessagesElm.classList.add('hidden');
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
for (let messageData of message.messages || []) {
|
|
232
|
-
let liElm = document.createElement('li');
|
|
233
|
-
liElm.classList.add('p-3')
|
|
234
|
-
let smallElm = document.createElement('small');
|
|
235
|
-
smallElm.textContent = `\u2022 ${messageData.subject}`;
|
|
236
|
-
chatResponseMessagesElm.appendChild(liElm);
|
|
237
|
-
liElm.appendChild(smallElm)
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function clearMessages() {
|
|
243
|
-
chatErrorElm.classList.add('hidden');
|
|
244
|
-
chatResponseElm.classList.add('hidden');
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
let sending = false;
|
|
248
|
-
function sendTestQuestion() {
|
|
249
|
-
if (sending) {
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
clearMessages();
|
|
254
|
-
|
|
255
|
-
sending = true;
|
|
256
|
-
uiButtonBusy(sendQuestionBtn, true);
|
|
257
|
-
sendQuestionPayload().then(info => {
|
|
258
|
-
if (info.error) {
|
|
259
|
-
return showError(info.error);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
showChatResponse(info);
|
|
263
|
-
|
|
264
|
-
}).catch(err => {
|
|
265
|
-
showError(err.message);
|
|
266
|
-
}).finally(() => {
|
|
267
|
-
sending = false;
|
|
268
|
-
uiButtonBusy(sendQuestionBtn, false);
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
document.getElementById('tryChatModal').addEventListener('open.overlay', () => {
|
|
273
|
-
if (sending) {
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
clearMessages();
|
|
277
|
-
document.getElementById('inputAccount').value = '';
|
|
278
|
-
document.getElementById('question').value = '';
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
document.getElementById('chatPayloadForm').addEventListener('submit', e => {
|
|
282
|
-
e.preventDefault();
|
|
283
|
-
sendTestQuestion();
|
|
284
|
-
});
|
|
285
|
-
})
|
|
286
|
-
</script>
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
{{> document_store_header}}
|
|
2
|
-
|
|
3
|
-
{{#> ui/stat-card variant="warning" icon="icon-[tabler--alert-triangle]" class="mb-6"}}
|
|
4
|
-
<ul class="list-disc ps-6">
|
|
5
|
-
<li>The Document Store backend only supports Elasticsearch v8+. Older Elasticsearch versions and
|
|
6
|
-
other alternatives like OpenSearch aren't compatible.</li>
|
|
7
|
-
<li>Syncing uses a best-effort process, so the Document Store may not contain every mailbox change.</li>
|
|
8
|
-
<li>Email attachments won't be saved in the Document Store.</li>
|
|
9
|
-
<li>To index accounts, turn on the Document Store feature first. If it's off, any processed emails
|
|
10
|
-
won't sync to the Document Store. You can force EmailEngine to resync all emails for an account
|
|
11
|
-
by using the Account Flush API method.
|
|
12
|
-
</li>
|
|
13
|
-
<li>You <em>can</em> modify entries stored in the Document Store. Adding new fields is allowed.
|
|
14
|
-
Changing existing field values is allowed if you do not change the type. Do not modify system
|
|
15
|
-
fields <code>_id</code>, <code>id</code>, <code>account</code>, <code>uid</code> and
|
|
16
|
-
<code>path</code>.
|
|
17
|
-
</li>
|
|
18
|
-
</ul>
|
|
19
|
-
{{/ui/stat-card}}
|
|
20
|
-
|
|
21
|
-
<form method="post" action="/admin/config/document-store">
|
|
22
|
-
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
23
|
-
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
24
|
-
|
|
25
|
-
<div class="card bg-base-100 shadow-md mb-6">
|
|
26
|
-
<div class="card-header flex flex-wrap items-center justify-between gap-3">
|
|
27
|
-
<h6 class="card-title text-primary">General settings</h6>
|
|
28
|
-
{{> ui/btn label="Test connection" variant="info" style="soft" size="sm" icon="icon-[tabler--link]"
|
|
29
|
-
id="test-payload-btn"}}
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="px-6 py-4 border-b border-base-content/10 ee-toggle-row flex items-start justify-between gap-4">
|
|
33
|
-
<div>
|
|
34
|
-
{{> ui/checkbox id="documentStoreEnabled" name="documentStoreEnabled"
|
|
35
|
-
label="Enable syncing to the Document Store" checked=values.documentStoreEnabled
|
|
36
|
-
error=errors.documentStoreEnabled
|
|
37
|
-
hint="Store structured email content in Elasticsearch, including attachment metadata but not attachment contents."}}
|
|
38
|
-
|
|
39
|
-
<div class="mt-2"><small><strong>Important:</strong> EmailEngine only saves emails to the Document
|
|
40
|
-
Store if processed while the feature is active. To add existing emails, use the <a
|
|
41
|
-
href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
|
|
42
|
-
rel="noopener noreferrer" class="link link-animated">Flush API method</a>. This makes
|
|
43
|
-
EmailEngine re-process all emails for a specific account.</small>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="text-end space-y-1">
|
|
48
|
-
{{!-- nofloat: this is a stacked reference column, and a floated first entry collides with the block under it --}}
|
|
49
|
-
{{> ui/setting-ref name="documentStoreEnabled" nofloat=true class="whitespace-nowrap"}}
|
|
50
|
-
|
|
51
|
-
{{> ui/setting-ref name="Request account flush" href="/admin/reference/account#putV1AccountAccountFlush"
|
|
52
|
-
nofloat=true class="whitespace-nowrap"}}
|
|
53
|
-
|
|
54
|
-
{{#if values.documentStoreEnabled}}
|
|
55
|
-
{{> ui/badge label="enabled" variant="success"}}
|
|
56
|
-
{{else}}
|
|
57
|
-
{{> ui/badge label="disabled" variant="warning"}}
|
|
58
|
-
{{/if}}
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<div class="card-body space-y-4">
|
|
63
|
-
|
|
64
|
-
<div>
|
|
65
|
-
{{> ui/setting-ref name="documentStoreUrl"}}
|
|
66
|
-
{{#> ui/form-field id="documentStoreUrl" label="URL to Elasticsearch" error=errors.documentStoreUrl}}
|
|
67
|
-
<input type="url" class="input trigger-example-render{{#if errors.documentStoreUrl}} is-invalid{{/if}}"
|
|
68
|
-
id="documentStoreUrl" name="documentStoreUrl" value="{{values.documentStoreUrl}}">
|
|
69
|
-
<span class="helper-text">URL to Elasticsearch API, for example "http://localhost:9200".</span>
|
|
70
|
-
{{/ui/form-field}}
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div>
|
|
74
|
-
{{> ui/setting-ref name="documentStoreIndex"}}
|
|
75
|
-
{{#> ui/form-field id="documentStoreIndex" label="Index name" error=errors.documentStoreIndex}}
|
|
76
|
-
<input type="text" class="input{{#if errors.documentStoreIndex}} is-invalid{{/if}}"
|
|
77
|
-
id="documentStoreIndex" name="documentStoreIndex" value="{{values.documentStoreIndex}}" />
|
|
78
|
-
<span class="helper-text">Index to use for data. EmailEngine will create a separate index with the same
|
|
79
|
-
prefix for threading.</span>
|
|
80
|
-
{{/ui/form-field}}
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<div>
|
|
84
|
-
{{> ui/setting-ref name="documentStoreAuthEnabled"}}
|
|
85
|
-
{{> ui/checkbox id="documentStoreAuthEnabled" name="documentStoreAuthEnabled"
|
|
86
|
-
label="Enable authentication" class="trigger-example-render" checked=values.documentStoreAuthEnabled
|
|
87
|
-
error=errors.documentStoreAuthEnabled}}
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div>
|
|
91
|
-
{{> ui/setting-ref name="documentStoreUsername"}}
|
|
92
|
-
{{#> ui/form-field id="documentStoreUsername" label="Username" error=errors.documentStoreUsername}}
|
|
93
|
-
<input type="text" class="input{{#if errors.documentStoreUsername}} is-invalid{{/if}}"
|
|
94
|
-
id="documentStoreUsername" name="documentStoreUsername" value="{{values.documentStoreUsername}}" />
|
|
95
|
-
<span class="helper-text">Authentication username.</span>
|
|
96
|
-
{{/ui/form-field}}
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
<div>
|
|
100
|
-
{{> ui/setting-ref name="documentStorePassword"}}
|
|
101
|
-
{{#> ui/form-field id="documentStorePassword" label="Password" error=errors.documentStorePassword}}
|
|
102
|
-
<input type="password" class="input{{#if errors.documentStorePassword}} is-invalid{{/if}}"
|
|
103
|
-
id="documentStorePassword" name="documentStorePassword" value="{{values.documentStorePassword}}"
|
|
104
|
-
{{#if hasDocumentStorePassword}} placeholder="Password is set but not shown…" {{/if}} />
|
|
105
|
-
<span class="helper-text">Authentication password.</span>
|
|
106
|
-
{{/ui/form-field}}
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
|
|
112
|
-
<div class="mb-6">
|
|
113
|
-
{{> ui/btn label="Save changes" type="submit" icon="icon-[tabler--settings]"}}
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
</form>
|
|
117
|
-
|
|
118
|
-
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
119
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
120
|
-
|
|
121
|
-
const sendTestPayload = async () => {
|
|
122
|
-
const documentStoreUrl = document.getElementById('documentStoreUrl').value.trim();
|
|
123
|
-
const documentStoreAuthEnabled = !!document.getElementById('documentStoreAuthEnabled').checked;
|
|
124
|
-
const documentStoreUsername = document.getElementById('documentStoreUsername').value;
|
|
125
|
-
const documentStorePassword = document.getElementById('documentStorePassword').value;
|
|
126
|
-
|
|
127
|
-
const data = await uiPostJson('/admin/config/document-store/test', {
|
|
128
|
-
documentStoreUrl,
|
|
129
|
-
documentStoreAuthEnabled,
|
|
130
|
-
documentStoreUsername,
|
|
131
|
-
documentStorePassword
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
return data;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const testPayloadBtn = document.getElementById('test-payload-btn');
|
|
138
|
-
testPayloadBtn.addEventListener('click', e => {
|
|
139
|
-
e.preventDefault()
|
|
140
|
-
// Busy until Elasticsearch answers, rather than looking unpressed and being clicked again.
|
|
141
|
-
uiBusyAction(testPayloadBtn, () =>
|
|
142
|
-
sendTestPayload().then(data => uiToastResult(data, data.message || 'Connection successful', 'Failed to establish connection'))
|
|
143
|
-
);
|
|
144
|
-
});
|
|
145
|
-
})
|
|
146
|
-
</script>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
{{> document_store_header}}
|
|
2
|
-
|
|
3
|
-
{{#> ui/stat-card variant="info" icon="icon-[tabler--alert-circle]" class="mb-6"}}
|
|
4
|
-
<div class="mb-2">
|
|
5
|
-
You can create custom field type mappings for emails saved in Elasticsearch. While EmailEngine
|
|
6
|
-
automatically maps types for its default fields, it doesn't do this for custom fields you've added
|
|
7
|
-
using the Document Store's pre-processing functions. Define a mapping when Elasticsearch's automatic type detection does not match your data.
|
|
8
|
-
</div>
|
|
9
|
-
<div>
|
|
10
|
-
<strong>Important:</strong> Once you've set a field mapping, you can't change it without migrating
|
|
11
|
-
the entire index. This also holds true for fields that Elasticsearch has auto-mapped. If
|
|
12
|
-
Elasticsearch sets a type for a field automatically, you won't be able to change that type later.
|
|
13
|
-
Make sure to set your desired mappings before saving data to Elasticsearch.
|
|
14
|
-
</div>
|
|
15
|
-
{{/ui/stat-card}}
|
|
16
|
-
|
|
17
|
-
<div class="card bg-base-100 shadow-md mb-6">
|
|
18
|
-
<div class="card-header">
|
|
19
|
-
<h6 class="card-title text-primary">Custom mappings</h6>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="card-body">
|
|
23
|
-
|
|
24
|
-
<div class="flex flex-wrap gap-2" role="toolbar" aria-label="Mapping actions">
|
|
25
|
-
{{#> ui/tooltip text="Create mapping for a new field"}}
|
|
26
|
-
{{> ui/btn bare=true style="soft" size="sm" href="/admin/config/document-store/mappings/new" icon="icon-[tabler--plus]" label="Add new mapping"}}
|
|
27
|
-
{{/ui/tooltip}}
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div class="overflow-x-auto">
|
|
32
|
-
<table class="table">
|
|
33
|
-
<thead>
|
|
34
|
-
|
|
35
|
-
<tr>
|
|
36
|
-
<th>Field</th>
|
|
37
|
-
<th>Type</th>
|
|
38
|
-
<th>Searchable</th>
|
|
39
|
-
</tr>
|
|
40
|
-
</thead>
|
|
41
|
-
|
|
42
|
-
<tbody>
|
|
43
|
-
{{#if customMappingsList}}
|
|
44
|
-
|
|
45
|
-
{{#each customMappingsList}}
|
|
46
|
-
<tr>
|
|
47
|
-
<th>{{key}}</th>
|
|
48
|
-
<td>{{type}}</td>
|
|
49
|
-
<td>
|
|
50
|
-
{{#if indexed}}
|
|
51
|
-
{{> ui/badge label="Yes" variant="success"}}
|
|
52
|
-
{{else}}
|
|
53
|
-
{{> ui/badge label="No" variant="warning"}}
|
|
54
|
-
{{/if}}
|
|
55
|
-
</td>
|
|
56
|
-
|
|
57
|
-
</tr>
|
|
58
|
-
{{/each}}
|
|
59
|
-
|
|
60
|
-
{{else}}
|
|
61
|
-
<tr>
|
|
62
|
-
<td colspan="3">No custom mappings defined</td>
|
|
63
|
-
</tr>
|
|
64
|
-
{{/if}}
|
|
65
|
-
</tbody>
|
|
66
|
-
</table>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<div class="card bg-base-100 shadow-md mb-6">
|
|
73
|
-
|
|
74
|
-
<div class="card-header">
|
|
75
|
-
<h6 class="card-title text-primary">Built-in mappings</h6>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div class="overflow-x-auto">
|
|
79
|
-
<table class="table">
|
|
80
|
-
<thead>
|
|
81
|
-
<tr>
|
|
82
|
-
<th>Field</th>
|
|
83
|
-
<th>Type</th>
|
|
84
|
-
<th>Searchable</th>
|
|
85
|
-
</tr>
|
|
86
|
-
</thead>
|
|
87
|
-
<tbody>
|
|
88
|
-
|
|
89
|
-
{{#each defaultMappingsList}}
|
|
90
|
-
<tr>
|
|
91
|
-
<th>{{key}}</th>
|
|
92
|
-
<td>{{type}}</td>
|
|
93
|
-
<td>
|
|
94
|
-
{{#if indexed}}
|
|
95
|
-
{{> ui/badge label="Yes" variant="success"}}
|
|
96
|
-
{{else}}
|
|
97
|
-
{{> ui/badge label="No" variant="warning"}}
|
|
98
|
-
{{/if}}
|
|
99
|
-
</td>
|
|
100
|
-
|
|
101
|
-
</tr>
|
|
102
|
-
{{/each}}
|
|
103
|
-
|
|
104
|
-
</tbody>
|
|
105
|
-
</table>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
</div>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
{{> document_store_header}}
|
|
2
|
-
|
|
3
|
-
{{> ui/breadcrumb parentHref="/admin/config/document-store" parentLabel="Document Store"
|
|
4
|
-
midHref="/admin/config/document-store/mappings" midLabel="Field mappings" current="New mapping" class="mt-6 mb-6"}}
|
|
5
|
-
|
|
6
|
-
<form method="post" action="/admin/config/document-store/mappings/new">
|
|
7
|
-
<input type="hidden" name="crumb" value="{{crumb}}">
|
|
8
|
-
|
|
9
|
-
<div class="card bg-base-100 shadow-md mb-6">
|
|
10
|
-
|
|
11
|
-
<div class="card-header">
|
|
12
|
-
<h6 class="card-title text-primary">Field data</h6>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<div class="card-body space-y-4">
|
|
16
|
-
|
|
17
|
-
<div>
|
|
18
|
-
{{#> ui/form-field id="field" label="Field name" error=errors.field}}
|
|
19
|
-
<input type="text" class="input lowercase{{#if errors.field}} is-invalid{{/if}}" id="field" name="field"
|
|
20
|
-
value="{{values.field}}" placeholder="For example "type"" data-lpignore="true"
|
|
21
|
-
autocomplete="off" required />
|
|
22
|
-
<span class="helper-text">Field name to create the mapping for. Must be a new field without existing
|
|
23
|
-
mapping.</span>
|
|
24
|
-
{{/ui/form-field}}
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
{{#> ui/form-field id="type" label="Field type" error=errors.type}}
|
|
29
|
-
<select class="select max-w-md{{#if errors.type}} is-invalid{{/if}}" id="type" name="type" required>
|
|
30
|
-
{{#each fieldTypes}}
|
|
31
|
-
<option value="{{type}}" {{#if selected}}selected{{/if}}>{{name}}</option>
|
|
32
|
-
{{/each}}
|
|
33
|
-
</select>
|
|
34
|
-
<span class="helper-text">Only basic types are available. Complex types like nested objects must be
|
|
35
|
-
managed manually.</span>
|
|
36
|
-
{{/ui/form-field}}
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div>
|
|
40
|
-
<div class="float-right">
|
|
41
|
-
{{#> ui/tooltip-rich icon="icon-[tabler--help-circle]"}}
|
|
42
|
-
<strong>Index status</strong><br>
|
|
43
|
-
If a field is not searchable, then it is stored in the Document Store, but it is not part of the
|
|
44
|
-
index. When listing documents, the field is included in the result.
|
|
45
|
-
{{/ui/tooltip-rich}}
|
|
46
|
-
</div>
|
|
47
|
-
{{> ui/checkbox id="indexed" name="indexed" label="Searchable" checked=values.indexed
|
|
48
|
-
error=errors.indexed}}
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<div class="mb-6">
|
|
55
|
-
{{> ui/btn label="Add mapping" type="button" overlay="#submitModal" icon="icon-[tabler--plus]"}}
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
{{#> ui/modal id="submitModal" title="Add mapping" titleId="submitModalLabel"}}
|
|
59
|
-
<div class="modal-body">
|
|
60
|
-
<p>Add this field mapping? Changing or deleting it later requires reindexing all stored documents.</p>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="modal-footer">
|
|
63
|
-
{{> ui/btn label="Close" variant="neutral" style="soft" overlay="#submitModal"}}
|
|
64
|
-
{{> ui/btn label="Add mapping" type="submit"}}
|
|
65
|
-
</div>
|
|
66
|
-
{{/ui/modal}}
|
|
67
|
-
|
|
68
|
-
</form>
|