diff --git a/bot/admin/web/angular.json b/bot/admin/web/angular.json index 7efd6b7140..09e8b948b2 100644 --- a/bot/admin/web/angular.json +++ b/bot/admin/web/angular.json @@ -25,7 +25,8 @@ "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", "assets": ["src/favicon.ico", "src/assets", "src/img"], - "styles": ["src/app/theme/styles/styles.scss", "src/styles.css", "src/jsoneditor.css"], + "styles": ["src/app/theme/styles/styles.scss", "src/styles.css", "src/jsoneditor.css", + "node_modules/bootstrap-icons/font/bootstrap-icons.css"], "scripts": [] }, "configurations": { diff --git a/bot/admin/web/package-lock.json b/bot/admin/web/package-lock.json index 90edc9882d..14eb27a334 100644 --- a/bot/admin/web/package-lock.json +++ b/bot/admin/web/package-lock.json @@ -20,10 +20,10 @@ "@angular/platform-browser": "^17.3.12", "@angular/platform-browser-dynamic": "^17.3.12", "@angular/router": "^17.3.12", - "@nebular/eva-icons": "13.0.0", "@nebular/theme": "13.0.0", "ang-jsoneditor": "^3.1.1", "bootstrap": "^4.4.1", + "bootstrap-icons": "^1.11.3", "echarts": "^5.5.1", "file-saver-es": "^2.0.5", "html2pdf.js": "^0.10.1", @@ -3816,18 +3816,6 @@ "@tybys/wasm-util": "^0.9.0" } }, - "node_modules/@nebular/eva-icons": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/@nebular/eva-icons/-/eva-icons-13.0.0.tgz", - "integrity": "sha512-4M9vwo3OJeDjlVufeGTg1u/01uxZ0LH8f8GvD1wuyzGitY/3hlySmXP31Nz/koKcM9QJZsm0wECJVxd+8BDf3Q==", - "dependencies": { - "tslib": "^2.3.0" - }, - "peerDependencies": { - "@nebular/theme": "13.0.0", - "eva-icons": "^1.1.3" - } - }, "node_modules/@nebular/theme": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/@nebular/theme/-/theme-13.0.0.tgz", @@ -6300,6 +6288,21 @@ "popper.js": "^1.16.1" } }, + "node_modules/bootstrap-icons": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.11.3.tgz", + "integrity": "sha512-+3lpHrCw/it2/7lBL15VR0HEumaBss0+f/Lb6ZvHISn1mlK83jjFpooTLsMWbIjJMDjDjOExMsTxnXSIT4k4ww==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ] + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -8358,12 +8361,6 @@ "node": ">= 0.6" } }, - "node_modules/eva-icons": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/eva-icons/-/eva-icons-1.1.3.tgz", - "integrity": "sha512-QBSEWNbEx1H0numXP1qgxKVCZHonRaky5ft4pGzQBcO4cy7mEja6TuJ8rc7BqX2pmkvetVQWKDH+DK/8y7GTag==", - "peer": true - }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", diff --git a/bot/admin/web/package.json b/bot/admin/web/package.json index 3bc8063a67..2c4a6a9fff 100644 --- a/bot/admin/web/package.json +++ b/bot/admin/web/package.json @@ -28,10 +28,10 @@ "@angular/platform-browser": "^17.3.12", "@angular/platform-browser-dynamic": "^17.3.12", "@angular/router": "^17.3.12", - "@nebular/eva-icons": "13.0.0", "@nebular/theme": "13.0.0", "ang-jsoneditor": "^3.1.1", "bootstrap": "^4.4.1", + "bootstrap-icons": "^1.11.3", "echarts": "^5.5.1", "file-saver-es": "^2.0.5", "html2pdf.js": "^0.10.1", diff --git a/bot/admin/web/src/app/analytics/activity/activity.component.html b/bot/admin/web/src/app/analytics/activity/activity.component.html index a0784a03f8..798525e3f8 100644 --- a/bot/admin/web/src/app/analytics/activity/activity.component.html +++ b/bot/admin/web/src/app/analytics/activity/activity.component.html @@ -41,7 +41,7 @@ nbTooltip="Refresh" status="basic" > - +    @@ -112,12 +112,12 @@
{{ currentFilterNbUsers }}
New users
1234
- + 100% vs prev. 28 days
--> diff --git a/bot/admin/web/src/app/analytics/activity/activity.component.ts b/bot/admin/web/src/app/analytics/activity/activity.component.ts index d447dfa832..b629ab5555 100644 --- a/bot/admin/web/src/app/analytics/activity/activity.component.ts +++ b/bot/admin/web/src/app/analytics/activity/activity.component.ts @@ -235,17 +235,17 @@ export class ActivityComponent implements OnInit { getBigIcon(before, current) { if (current == before) { - return 'minus-outline'; + return 'dash-lg'; } else { - return this.metricIncreased(before, current) ? 'diagonal-arrow-right-up-outline' : 'diagonal-arrow-right-down-outline'; + return this.metricIncreased(before, current) ? 'arrow-up-right' : 'arrow-down-right'; } } getSmallIcon(before, current) { if (current == before) { - return 'minus-outline'; + return 'dash'; } else { - return this.metricIncreased(before, current) ? 'arrow-upward-outline' : 'arrow-downward-outline'; + return this.metricIncreased(before, current) ? 'arrow-up-short' : 'arrow-down-short'; } } diff --git a/bot/admin/web/src/app/analytics/analytics.module.ts b/bot/admin/web/src/app/analytics/analytics.module.ts index bbdc178030..56192198b4 100644 --- a/bot/admin/web/src/app/analytics/analytics.module.ts +++ b/bot/admin/web/src/app/analytics/analytics.module.ts @@ -80,6 +80,7 @@ import { DialogsListComponent } from './dialogs/dialogs-list/dialogs-list.compon NbButtonModule, NbInputModule, NbSelectModule, + NbFormFieldModule, NbCalendarModule, NbUserModule, NbDatepickerModule, diff --git a/bot/admin/web/src/app/analytics/behavior/behavior.component.html b/bot/admin/web/src/app/analytics/behavior/behavior.component.html index 13c5910088..59724f8852 100644 --- a/bot/admin/web/src/app/analytics/behavior/behavior.component.html +++ b/bot/admin/web/src/app/analytics/behavior/behavior.component.html @@ -41,7 +41,7 @@ nbTooltip="Refresh Data" status="basic" > - + - + diff --git a/bot/admin/web/src/app/analytics/chart/chart.component.ts b/bot/admin/web/src/app/analytics/chart/chart.component.ts index 8bc1eb8906..930680c3c1 100644 --- a/bot/admin/web/src/app/analytics/chart/chart.component.ts +++ b/bot/admin/web/src/app/analytics/chart/chart.component.ts @@ -423,7 +423,7 @@ export class ChartComponent implements OnChanges { } chartIcon(): string { - return this.mainChart.type == 'PieChart' ? 'pie-chart-outline' : 'bar-chart-outline'; + return this.mainChart.type == 'PieChart' ? 'pie-chart' : 'bar-chart'; } onFlipAction() { diff --git a/bot/admin/web/src/app/analytics/dialogs/dialogs-list/dialogs-list.component.html b/bot/admin/web/src/app/analytics/dialogs/dialogs-list/dialogs-list.component.html index 433defe2cf..0c18350f21 100644 --- a/bot/admin/web/src/app/analytics/dialogs/dialogs-list/dialogs-list.component.html +++ b/bot/admin/web/src/app/analytics/dialogs/dialogs-list/dialogs-list.component.html @@ -2,13 +2,19 @@
- + + + +
- - {{ c.id }} + + - + {{ c.id }} + + - - All - + + - {{ intent.name }} - - Unknown - + All + + {{ intent.name }} + + Unknown + +
- - All - + + - {{ config }} - - + All + + {{ config }} + + + - - Clear selection - + + - {{ intent }} - - + Clear selection + + {{ intent }} + + +
@@ -115,7 +145,7 @@

ghost (click)="refresh()" > - +

@@ -149,7 +179,7 @@

type="button" (click)="createFaq(action, dialog.actions)" > - + Create a FAQ with this question/answer pair

diff --git a/bot/admin/web/src/app/analytics/dialogs/dialogs.component.html b/bot/admin/web/src/app/analytics/dialogs/dialogs.component.html index 0971acd7d6..49aa9e8cc2 100644 --- a/bot/admin/web/src/app/analytics/dialogs/dialogs.component.html +++ b/bot/admin/web/src/app/analytics/dialogs/dialogs.component.html @@ -32,7 +32,7 @@

nbTooltip="Refresh dialogs" (click)="refresh()" > - + diff --git a/bot/admin/web/src/app/analytics/flow/flow.component.html b/bot/admin/web/src/app/analytics/flow/flow.component.html index a6e327a309..b450bc0276 100644 --- a/bot/admin/web/src/app/analytics/flow/flow.component.html +++ b/bot/admin/web/src/app/analytics/flow/flow.component.html @@ -25,7 +25,7 @@

Stories flow

Stories flow Stories flow Stories flow Stories flow
- - - - - - {{ selectedStory.storyName }} - - - All - - + + - - - - {{ entry.value.name }} - - - - - - - - - - - - - All - - + + + + {{ selectedStory.storyName }} + + + All + + + + + + {{ entry.value.name }} + + + - - - - - {{ entry.value.storyName }} - - + + + + + + + + + All + + + + + + + {{ entry.value.storyName }} + + +
@@ -46,7 +46,7 @@ > All messages @@ -57,7 +57,7 @@ > Users @@ -68,7 +68,7 @@ > Messages by days in calendar @@ -79,7 +79,7 @@ > Messages by story @@ -90,7 +90,7 @@ > Messages by intent @@ -101,7 +101,7 @@ > Messages by configuration @@ -112,7 +112,7 @@ > Messages by connector type @@ -131,7 +131,7 @@ > Messages by Story @@ -142,7 +142,7 @@ > Messages by intent @@ -153,7 +153,7 @@ > Messages by day of week @@ -164,7 +164,7 @@ > Messages by hour of day @@ -175,7 +175,7 @@ > Messages by action type @@ -186,7 +186,7 @@ > Messages by story category @@ -197,7 +197,7 @@ > Messages by story type @@ -208,7 +208,7 @@ > Messages by locale @@ -230,7 +230,7 @@ > Curved Lines @@ -241,7 +241,7 @@ > Stacked Area @@ -252,7 +252,7 @@ > Data point focus diff --git a/bot/admin/web/src/app/analytics/satisfaction/satisfaction-details/satisfaction-details.component.html b/bot/admin/web/src/app/analytics/satisfaction/satisfaction-details/satisfaction-details.component.html index 17fba8c215..c4394e61c1 100644 --- a/bot/admin/web/src/app/analytics/satisfaction/satisfaction-details/satisfaction-details.component.html +++ b/bot/admin/web/src/app/analytics/satisfaction/satisfaction-details/satisfaction-details.component.html @@ -17,7 +17,7 @@

(click)="refresh()" class="ml-2" > - +

@@ -39,7 +39,7 @@

{{ satisfactionStat.nbUsersRated }} users @@ -63,7 +63,7 @@
{{ getNbUsersByNote(index) }} users diff --git a/bot/admin/web/src/app/analytics/users/users.component.html b/bot/admin/web/src/app/analytics/users/users.component.html index e3c9279ded..e3b9ce302a 100644 --- a/bot/admin/web/src/app/analytics/users/users.component.html +++ b/bot/admin/web/src/app/analytics/users/users.component.html @@ -32,21 +32,27 @@

(click)="reload()" class="ml-2" > - +
- + + + +
- + + + + ghost="true" nbTooltip="Add dialog to Test Plan" > - + diff --git a/bot/admin/web/src/app/applications/application-upload/application-upload.component.html b/bot/admin/web/src/app/applications/application-upload/application-upload.component.html index 693f72cc69..e51e70f2ce 100644 --- a/bot/admin/web/src/app/applications/application-upload/application-upload.component.html +++ b/bot/admin/web/src/app/applications/application-upload/application-upload.component.html @@ -27,7 +27,7 @@ nbTooltip="Close" (click)="cancel()" > - + diff --git a/bot/admin/web/src/app/applications/application/application.component.html b/bot/admin/web/src/app/applications/application/application.component.html index f8b2eb4b6b..9175642099 100644 --- a/bot/admin/web/src/app/applications/application/application.component.html +++ b/bot/admin/web/src/app/applications/application/application.component.html @@ -24,28 +24,28 @@

@@ -179,24 +179,30 @@

Locales - - {{ locale.second }} - - + + + + + {{ locale.second }} + + +

*ngFor="let locale of application.supportedLocales" > {{ state.localeName(locale) }} - + > + +
diff --git a/bot/admin/web/src/app/applications/application/application.component.scss b/bot/admin/web/src/app/applications/application/application.component.scss index 6e627336c1..5e248f08a8 100644 --- a/bot/admin/web/src/app/applications/application/application.component.scss +++ b/bot/admin/web/src/app/applications/application/application.component.scss @@ -42,7 +42,7 @@ .tag { display: inline-flex; width: fit-content; - max-width: 8rem; + padding: 0.3rem 0.6rem 0.3rem 1rem; margin-right: 2px; margin-bottom: 2px; diff --git a/bot/admin/web/src/app/applications/applications.module.ts b/bot/admin/web/src/app/applications/applications.module.ts index 8f9e71662a..da5b187f7d 100644 --- a/bot/admin/web/src/app/applications/applications.module.ts +++ b/bot/admin/web/src/app/applications/applications.module.ts @@ -28,6 +28,7 @@ import { NbCardModule, NbCheckboxModule, NbDialogModule, + NbFormFieldModule, NbIconModule, NbInputModule, NbRadioModule, @@ -74,6 +75,7 @@ export class NlpApplicationConfig implements ApplicationConfig { NbTooltipModule, NbCheckboxModule, NbSelectModule, + NbFormFieldModule, NbAccordionModule, NbSpinnerModule, NbRadioModule, diff --git a/bot/admin/web/src/app/applications/applications/applications.component.html b/bot/admin/web/src/app/applications/applications/applications.component.html index 442b12121e..a2c68310c5 100644 --- a/bot/admin/web/src/app/applications/applications/applications.component.html +++ b/bot/admin/web/src/app/applications/applications/applications.component.html @@ -41,7 +41,7 @@

Welcome!

nbTooltip="Upload dump" (click)="showUploadDumpPanel()" > - +

routerLink="create" nbTooltip="Create new application" > - + NEW APPLICATION @@ -103,31 +103,32 @@

Welcome!

nbButton ghost shape="round" - (click)="downloadDump(app)" - nbTooltip="Download an application dump" + status="info" + routerLink="edit/{{ app._id }}" + nbTooltip="Edit application" > - + + -
diff --git a/bot/admin/web/src/app/applications/configuration-tabs.component.ts b/bot/admin/web/src/app/applications/configuration-tabs.component.ts index 4c3cb6fce9..8a3dd8c5cf 100644 --- a/bot/admin/web/src/app/applications/configuration-tabs.component.ts +++ b/bot/admin/web/src/app/applications/configuration-tabs.component.ts @@ -26,35 +26,7 @@ import { ApplicationsResolver } from './applications.resolver'; styleUrls: ['./configuration-tabs.component.css', './tabs.component.scss'] }) export class ConfigurationTabsComponent implements OnInit { - tabs = [ - { - title: 'Applications', - route: 'nlu', - icon: 'browser-outline', - resolve: { - applications: ApplicationsResolver - } - }, - { - title: 'Namespaces', - route: 'namespaces', - icon: 'folder-outline' - }, - { - title: 'Log', - route: 'users/logs', - icon: 'eye-outline' - } - ]; - - configurationTabLinks; - - constructor(private router: Router, private state: StateService) { - if (!state.hasRole(UserRole.technicalAdmin)) { - this.tabs = this.tabs.filter((t) => t.route !== 'users/logs'); - } - this.configurationTabLinks = this.tabs; - } + constructor(private router: Router) {} ngOnInit() { if (this.router.routerState.snapshot.url.endsWith('/configuration')) { diff --git a/bot/admin/web/src/app/applications/namespace/create-namespace/create-namespace.component.html b/bot/admin/web/src/app/applications/namespace/create-namespace/create-namespace.component.html index 111debca6e..373979f913 100644 --- a/bot/admin/web/src/app/applications/namespace/create-namespace/create-namespace.component.html +++ b/bot/admin/web/src/app/applications/namespace/create-namespace/create-namespace.component.html @@ -8,7 +8,7 @@ nbTooltip="Cancel" (click)="cancel()" > - + diff --git a/bot/admin/web/src/app/applications/namespace/namespaces.component.html b/bot/admin/web/src/app/applications/namespace/namespaces.component.html index a486fe138f..b05db0037c 100644 --- a/bot/admin/web/src/app/applications/namespace/namespaces.component.html +++ b/bot/admin/web/src/app/applications/namespace/namespaces.component.html @@ -27,7 +27,7 @@

Namespaces

(click)="createNamespace()" nbTooltip="Create a new namespace" > - + NEW NAMESPACE @@ -62,7 +62,7 @@

Namespaces

@@ -74,7 +74,7 @@

Namespaces

(click)="manageUsers(n.namespace)" nbTooltip="Manage Users" > - + @@ -109,7 +109,7 @@

Namespaces

@@ -121,27 +121,39 @@

Namespaces

(click)="deleteUserNamespace(u)" nbTooltip="Delete User" > - +
- + + + + + Owner +
@@ -186,12 +198,22 @@

Namespaces

- + + diff --git a/bot/admin/web/src/app/applications/user/user-logs.component.html b/bot/admin/web/src/app/applications/user/user-logs.component.html index 0bf13c05d9..b47abf3293 100644 --- a/bot/admin/web/src/app/applications/user/user-logs.component.html +++ b/bot/admin/web/src/app/applications/user/user-logs.component.html @@ -90,7 +90,7 @@

Users logs

*ngIf="row.newData" (click)="displayData(row)" > - + @@ -99,7 +99,7 @@

Users logs

*ngIf="row.error" > diff --git a/bot/admin/web/src/app/bot-admin-app.component.ts b/bot/admin/web/src/app/bot-admin-app.component.ts index 986cce6d70..e25eff0476 100644 --- a/bot/admin/web/src/app/bot-admin-app.component.ts +++ b/bot/admin/web/src/app/bot-admin-app.component.ts @@ -123,87 +123,89 @@ export class BotAdminAppComponent implements AuthListener, OnInit, OnDestroy { this.menu = [ { title: 'Language Understanding', - icon: 'message-circle-outline', + icon: 'chat-dots', hidden: !this.state.hasRole(UserRole.nlpUser), children: [ { link: '/language-understanding/try', - title: 'New Sentence', - icon: 'plus-circle-outline' + title: 'New sentence', + icon: 'plus-circle' }, { link: '/language-understanding/inbox', - title: 'Inbox', - icon: 'inbox-outline' + title: 'Inbox sentences', + icon: 'inboxes' }, { link: '/language-understanding/search', - title: 'Search', - icon: 'search-outline' + title: 'Search sentences', + icon: 'search' }, { link: '/language-understanding/unknown', - title: 'Unknown', - icon: 'question-mark-circle-outline' + title: 'Unknown sentences', + icon: 'question-circle' }, { link: '/language-understanding/intents', title: 'Intents', - icon: 'compass-outline' + icon: 'compass' }, { link: '/language-understanding/entities', title: 'Entities', - icon: 'attach-outline' + icon: 'paperclip' }, { link: '/language-understanding/logs', - title: 'Logs', - icon: 'list-outline' + title: 'Sentences logs', + icon: 'justify-left' } ] }, { title: 'Stories & Answers', - icon: 'book-open-outline', + icon: 'book', hidden: !this.state.hasRole(UserRole.botUser), children: [ { link: '/build/story-create', title: 'New Story', - icon: 'plus-circle-outline' + icon: 'plus-circle' }, { link: '/build/story-search', title: 'All stories', - icon: 'layers-outline' + icon: 'chat-left' }, { link: '/faq/management', - title: 'FAQs management', - icon: 'message-square-outline' - }, - { - link: '/build/story-rules', - title: 'Rules', - icon: 'toggle-right-outline' + title: 'FAQs stories', + icon: 'chat-left-text' }, + { link: '/build/i18n', title: 'Answers', - icon: 'color-palette-outline' + icon: 'chat-right-quote' }, { link: '/build/story-documents', title: 'Documents', - icon: 'folder-outline' + icon: 'images' + }, + + { + link: '/build/story-rules', + title: 'Rules', + icon: 'toggle-on' } ] }, { title: 'Gen AI', - icon: 'bulb-outline', + icon: 'cpu', children: [ // { // link: '/rag/sources', @@ -215,24 +217,24 @@ export class BotAdminAppComponent implements AuthListener, OnInit, OnDestroy { { link: '/rag/settings', title: 'Rag settings', - icon: 'settings-outline', + icon: 'lightbulb', hidden: !this.state.hasRole(UserRole.admin) }, { link: '/rag/exclusions', - title: 'Rag exclusions', - icon: { icon: 'ragexclude', pack: 'tock-custom' } + title: 'Sentences Rag exclusions', + icon: 'lightbulb-off' }, { title: 'Sentence generation settings', link: '/configuration/sentence-generation-settings', - icon: 'list-outline', + icon: 'list-columns', hidden: !this.state.hasRole(UserRole.admin) }, { title: 'Observability settings', link: '/configuration/observability-settings', - icon: 'monitor-outline', + icon: 'display', hidden: !this.state.hasRole(UserRole.admin) } ] @@ -240,154 +242,154 @@ export class BotAdminAppComponent implements AuthListener, OnInit, OnDestroy { { title: 'Test', - icon: 'play-circle-outline', + icon: 'play-circle', hidden: !this.state.hasRole(UserRole.botUser), children: [ { link: '/test/test', title: 'Test', - icon: 'smiling-face-outline' + icon: 'terminal' }, { link: '/test/plan', title: 'Test plans', - icon: 'map-outline' + icon: 'map' } ] }, { title: 'Analytics', - icon: 'trending-up-outline', + icon: 'activity', hidden: !this.state.hasRole(UserRole.botUser), children: [ { link: '/analytics/activity', title: 'Activity', - icon: 'activity-outline' + icon: 'graph-up-arrow' }, { link: '/analytics/behavior', title: 'Behavior', - icon: 'pie-chart-outline' + icon: 'pie-chart' }, { link: '/analytics/flow', title: 'Flow', - icon: 'funnel-outline' + icon: 'funnel' }, { link: '/analytics/users', title: 'Users', - icon: 'people-outline' + icon: 'people' }, { link: '/analytics/dialogs', - title: 'Search', - icon: 'search-outline' + title: 'Dialogs', + icon: 'wechat' }, { link: '/analytics/preferences', title: 'Preferences', - icon: 'settings-2-outline' + icon: 'sliders' }, { link: '/analytics/satisfaction', title: 'Satisfaction', - icon: 'star-outline' + icon: 'star' } ] }, { title: 'Custom Metrics', - icon: 'pie-chart-outline', + icon: 'clipboard-data', hidden: !this.state.hasRole(UserRole.botUser), children: [ { link: '/business-metrics/board', title: 'Metrics', - icon: 'pie-chart-outline' + icon: 'clipboard2-pulse' }, { link: '/business-metrics/indicators', title: 'Indicators', - icon: 'compass-outline' + icon: 'sign-merge-left' } ] }, { title: 'Model Quality', - icon: 'clipboard-outline', + icon: 'box-seam', hidden: !this.state.hasRole(UserRole.nlpUser), children: [ { link: '/model-quality/log-stats', title: 'Model Stats', - icon: 'activity-outline' + icon: 'award' }, { link: '/model-quality/intent-quality', title: 'Intent Distance', - icon: 'pantone-outline' + icon: 'rulers' }, { link: '/model-quality/count-stats', title: 'Count Stats', - icon: 'hash-outline' + icon: 'hash' }, { link: '/model-quality/model-builds', title: 'Model Builds', - icon: 'save-outline' + icon: 'building' }, { link: '/model-quality/test-builds', title: 'Test Trends', - icon: 'trending-down-outline' + icon: 'graph-down-arrow' }, { link: '/model-quality/test-intent-errors', title: 'Test Intent Errors', - icon: 'alert-triangle-outline' + icon: 'bug' }, { link: '/model-quality/test-entity-errors', title: 'Test Entity Errors', - icon: 'alert-triangle-outline' + icon: 'bug' } ] }, { title: 'Settings', - icon: 'settings-outline', + icon: 'gear', children: [ { title: 'Applications', link: '/configuration/nlp', - icon: 'browser-outline' + icon: 'window-stack' }, { title: 'Configurations', link: '/configuration/bot', - icon: 'link-outline', + icon: 'link-45deg', hidden: !this.state.hasRole(UserRole.admin) }, { title: 'Namespaces', link: '/configuration/namespaces', - icon: 'folder-outline' + icon: 'folder' }, { title: 'Log', link: '/configuration/users/logs', - icon: 'eye-outline', + icon: 'eye', hidden: !this.state.hasRole(UserRole.technicalAdmin) }, { title: 'Synchronization', link: '/configuration/synchronization', - icon: 'sync' + icon: 'arrow-repeat' } ] } diff --git a/bot/admin/web/src/app/bot-admin-app.module.ts b/bot/admin/web/src/app/bot-admin-app.module.ts index 39c32c0d91..9db9a4a2b8 100644 --- a/bot/admin/web/src/app/bot-admin-app.module.ts +++ b/bot/admin/web/src/app/bot-admin-app.module.ts @@ -36,8 +36,6 @@ import { import { APP_BASE_HREF, PlatformLocation } from '@angular/common'; import { BotService } from './bot/bot-service'; import { BotAdminAppRoutingModule } from './bot-admin-app-routing.module'; -import { ragIcon } from './theme/icons/rag'; -import { ragexcludeIcon } from './theme/icons/ragexclude'; import { NlpService } from './core-nlp/nlp.service'; @NgModule({ @@ -74,9 +72,7 @@ import { NlpService } from './core-nlp/nlp.service'; }) export class BotAdminAppModule { constructor(private iconLibraries: NbIconLibraries) { - this.iconLibraries.registerSvgPack('tock-custom', { - rag: ragIcon, - ragexclude: ragexcludeIcon - }); + this.iconLibraries.registerFontPack('bootstrap-icons', { iconClassPrefix: 'bi' }); + this.iconLibraries.setDefaultPack('bootstrap-icons'); } } diff --git a/bot/admin/web/src/app/bot/feature/application-feature/application-feature.component.html b/bot/admin/web/src/app/bot/feature/application-feature/application-feature.component.html index 8843105d95..818ab776c5 100644 --- a/bot/admin/web/src/app/bot/feature/application-feature/application-feature.component.html +++ b/bot/admin/web/src/app/bot/feature/application-feature/application-feature.component.html @@ -29,7 +29,7 @@ nbTooltip="Refresh" (click)="refresh()" > - + diff --git a/bot/admin/web/src/app/bot/feature/application-feature/application-features-table/application-features-table.component.html b/bot/admin/web/src/app/bot/feature/application-feature/application-features-table/application-features-table.component.html index 7d9ca475ff..83e7c6e60d 100644 --- a/bot/admin/web/src/app/bot/feature/application-feature/application-features-table/application-features-table.component.html +++ b/bot/admin/web/src/app/bot/feature/application-feature/application-features-table/application-features-table.component.html @@ -28,7 +28,7 @@ nbTooltip="Add a new Feature" (click)="newFeature()" > - + New {{ type }} feature @@ -154,7 +154,7 @@ nbTooltip="Delete rule" (click)="askDeleteFeature(feature)" > - + diff --git a/bot/admin/web/src/app/bot/feature/application-feature/create-feature/create-feature.component.html b/bot/admin/web/src/app/bot/feature/application-feature/create-feature/create-feature.component.html index 438534ce47..54b62712a8 100644 --- a/bot/admin/web/src/app/bot/feature/application-feature/create-feature/create-feature.component.html +++ b/bot/admin/web/src/app/bot/feature/application-feature/create-feature/create-feature.component.html @@ -9,7 +9,7 @@ nbTooltip="Close" (click)="cancel()" > - + @@ -42,14 +42,20 @@ [showError]="isSubmitted" [required]="true" > - + + + + @@ -62,16 +68,22 @@ [controls]="startDate" [showError]="isSubmitted" > - + + + + - + + + + + Cancel
diff --git a/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.html b/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.html index c304e22389..acd215e0e4 100644 --- a/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.html +++ b/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.html @@ -12,7 +12,7 @@ nbTooltip="Close" (click)="cancel()" > - + @@ -27,20 +27,26 @@ [showError]="isSubmitted" [required]="true" > - + + + + - + + + + + Cancel
diff --git a/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.ts b/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.ts index 31e42a2ac1..d70df3fa9a 100644 --- a/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.ts +++ b/bot/admin/web/src/app/bot/feature/story-rule/create-rule/create-rule.component.ts @@ -5,6 +5,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms'; import { BotService } from '../../../bot-service'; import { StateService } from '../../../../core-nlp/state.service'; import { Observable, of, take } from 'rxjs'; +import { getStoryIcon } from '../../../../shared/utils'; enum mainOrTarget { mainStory = 'mainStory', @@ -37,6 +38,8 @@ export class CreateRuleComponent implements OnInit { isSubmitted: boolean = false; + getStoryIcon = getStoryIcon; + @Input() type: RuleType; @Output() onSave = new EventEmitter(); @@ -155,16 +158,4 @@ export class CreateRuleComponent implements OnInit { cancel(): void { this.nbDialogRef.close({}); } - - getStoryIcon(story: StoryDefinitionConfiguration): string { - if (story.isBuiltIn()) { - return 'cube'; - } - if (story.isSimpleAnswer()) { - return 'message-square-outline'; - } - if (story.isScriptAnswer()) { - return 'code'; - } - } } diff --git a/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.html b/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.html index cf44da2769..1da0e5a023 100644 --- a/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.html +++ b/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.html @@ -12,7 +12,7 @@ > - + @@ -41,7 +41,7 @@ (click)="newRule()" class="new-rule-button" > - + New {{ type }} rule @@ -92,7 +92,7 @@ {{ feature.story.name }} @@ -109,7 +109,7 @@ > {{ feature.switchToStory.name }}
@@ -123,7 +123,7 @@ > {{ feature.endWithStory.name }}
@@ -169,7 +169,7 @@ nbTooltip="Delete rule" (click)="askDeleteFeature(feature)" > - + diff --git a/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.ts b/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.ts index 4782ee714f..10286c985c 100644 --- a/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.ts +++ b/bot/admin/web/src/app/bot/feature/story-rule/story-rule-table/story-rules-table.component.ts @@ -5,6 +5,7 @@ import { NbDialogService, NbToastrService } from '@nebular/theme'; import { CreateRuleComponent } from '../create-rule/create-rule.component'; import { ChoiceDialogComponent } from '../../../../shared/components'; import { BotService } from '../../../bot-service'; +import { getStoryIcon } from '../../../../shared/utils'; @Component({ selector: 'tock-story-rules-table', @@ -20,6 +21,8 @@ export class StoryRulesTableComponent implements OnChanges, OnDestroy { searchFilterString: string; + getStoryIcon = getStoryIcon; + @Input() type: RuleType; @Input() features: StoryFeature[] = []; @@ -38,18 +41,6 @@ export class StoryRulesTableComponent implements OnChanges, OnDestroy { return [RuleType.Redirection, RuleType.Ending].includes(this.type); } - getStoryIcon(story: StoryDefinitionConfiguration): string { - if (story.isBuiltIn()) { - return 'cube'; - } - if (story.isSimpleAnswer()) { - return 'message-square-outline'; - } - if (story.isScriptAnswer()) { - return 'code'; - } - } - newRule(): void { this.nbDialogService .open(CreateRuleComponent, { diff --git a/bot/admin/web/src/app/bot/feature/story-rule/story-rule.component.html b/bot/admin/web/src/app/bot/feature/story-rule/story-rule.component.html index bd7b57bb6d..8e379296a6 100644 --- a/bot/admin/web/src/app/bot/feature/story-rule/story-rule.component.html +++ b/bot/admin/web/src/app/bot/feature/story-rule/story-rule.component.html @@ -29,7 +29,7 @@ nbTooltip="Refresh" (click)="refresh()" > - + diff --git a/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.html b/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.html index 63abd35dfb..c30c89b6a5 100644 --- a/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.html +++ b/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.html @@ -29,7 +29,7 @@ nbTooltip="Refresh" (click)="refresh()" > - + {{ story.name }} @@ -97,7 +97,10 @@ class="pointer" nbTooltip="Click to view story details" > - + {{ story.name }} @@ -129,7 +132,10 @@ class="pointer" nbTooltip="Click to view story details" > - + {{ story.name }} @@ -161,7 +167,10 @@ class="pointer" nbTooltip="Click to view story details" > - + {{ story.name }} diff --git a/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.ts b/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.ts index 1bb6ab4665..f525cbc5dd 100644 --- a/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.ts +++ b/bot/admin/web/src/app/bot/feature/story-runtime-settings/story-runtime-settings.component.ts @@ -20,6 +20,7 @@ import { StoryDefinitionConfiguration } from '../../model/story'; import { StateService } from '../../../core-nlp/state.service'; import { Router } from '@angular/router'; import { Subject, takeUntil } from 'rxjs'; +import { getStoryIcon } from '../../../shared/utils'; @Component({ selector: 'tock-story-runtime-settings', @@ -37,6 +38,8 @@ export class StoryRuntimeSettingsComponent implements OnInit, OnDestroy { loading: boolean; + getStoryIcon = getStoryIcon; + constructor(private state: StateService, private botService: BotService, private router: Router) {} ngOnInit(): void { @@ -73,18 +76,6 @@ export class StoryRuntimeSettingsComponent implements OnInit, OnDestroy { } } - getStoryIcon(story: StoryDefinitionConfiguration) { - if (story.isBuiltIn()) { - return 'cube'; - } - if (story.isSimpleAnswer()) { - return 'message-square-outline'; - } - if (story.isScriptAnswer()) { - return 'code'; - } - } - editStory(story: StoryDefinitionConfiguration) { this.router.navigateByUrl('/build/story-edit/' + story._id); } diff --git a/bot/admin/web/src/app/bot/i18n/i18n-export/i18n-export.component.html b/bot/admin/web/src/app/bot/i18n/i18n-export/i18n-export.component.html index c08d03a476..23d0d14d55 100644 --- a/bot/admin/web/src/app/bot/i18n/i18n-export/i18n-export.component.html +++ b/bot/admin/web/src/app/bot/i18n/i18n-export/i18n-export.component.html @@ -25,7 +25,7 @@ nbTooltip="Close" (click)="cancel()" > - + diff --git a/bot/admin/web/src/app/bot/i18n/i18n-filters/i18n-filters.component.html b/bot/admin/web/src/app/bot/i18n/i18n-filters/i18n-filters.component.html index 9915bde917..b23efa4d63 100644 --- a/bot/admin/web/src/app/bot/i18n/i18n-filters/i18n-filters.component.html +++ b/bot/admin/web/src/app/bot/i18n/i18n-filters/i18n-filters.component.html @@ -5,7 +5,7 @@ - + @@ -37,7 +37,7 @@ - + Validate All @@ -158,7 +158,7 @@ (click)="translate()" *ngIf="state.currentApplication.supportedLocales.length !== 1" > - + Translate All @@ -172,7 +172,7 @@ nbTooltip="Import" (click)="import()" > - + Import @@ -186,7 +186,7 @@ nbTooltip="Export" (click)="export()" > - + Export diff --git a/bot/admin/web/src/app/bot/i18n/i18n-label/i18n-label.component.html b/bot/admin/web/src/app/bot/i18n/i18n-label/i18n-label.component.html index 45e4f986e7..10ecdc7b41 100644 --- a/bot/admin/web/src/app/bot/i18n/i18n-label/i18n-label.component.html +++ b/bot/admin/web/src/app/bot/i18n/i18n-label/i18n-label.component.html @@ -51,7 +51,7 @@ [disabled]="!deleteLabelAllowed" (click)="deleteLabel()" > - + @@ -77,12 +77,12 @@
@@ -129,7 +129,7 @@ (click)="addNewAlternative(l)" [disabled]="!isSupportedLocale(l)" > - + @@ -140,7 +140,7 @@ status="danger" ghost > - + @@ -171,11 +171,11 @@
@@ -209,7 +209,7 @@ status="danger" (click)="removeAlternative(l, index)" > - + diff --git a/bot/admin/web/src/app/bot/i18n/i18n.component.html b/bot/admin/web/src/app/bot/i18n/i18n.component.html index 82e20f6b69..5f178c5edf 100644 --- a/bot/admin/web/src/app/bot/i18n/i18n.component.html +++ b/bot/admin/web/src/app/bot/i18n/i18n.component.html @@ -26,7 +26,7 @@

Answers

(click)="refresh()" class="ml-2" > - + diff --git a/bot/admin/web/src/app/bot/model/story.ts b/bot/admin/web/src/app/bot/model/story.ts index 4bd9dce8cc..984f537429 100644 --- a/bot/admin/web/src/app/bot/model/story.ts +++ b/bot/admin/web/src/app/bot/model/story.ts @@ -78,6 +78,14 @@ export abstract class AnswerContainer { return this.currentType === AnswerConfigurationType.simple; } + isSimpleFaqAnswer(): boolean { + return this.currentType === AnswerConfigurationType.simple && this.category === 'faq'; + } + + isSimpleNonFaqAnswer(): boolean { + return this.currentType === AnswerConfigurationType.simple && this.category != 'faq'; + } + isMessageAnswer(): boolean { return this.currentType === AnswerConfigurationType.message; } @@ -153,6 +161,14 @@ export class StoryDefinitionConfigurationSummary { return this.currentType === AnswerConfigurationType.simple; } + isSimpleFaqAnswer(): boolean { + return this.currentType === AnswerConfigurationType.simple && this.category === 'faq'; + } + + isSimpleNonFaqAnswer(): boolean { + return this.currentType === AnswerConfigurationType.simple && this.category != 'faq'; + } + isMessageAnswer(): boolean { return this.currentType === AnswerConfigurationType.message; } diff --git a/bot/admin/web/src/app/bot/story/action/step-dialog/step-dialog.component.html b/bot/admin/web/src/app/bot/story/action/step-dialog/step-dialog.component.html index 1cdfc9cbb8..44549f2a2f 100644 --- a/bot/admin/web/src/app/bot/story/action/step-dialog/step-dialog.component.html +++ b/bot/admin/web/src/app/bot/story/action/step-dialog/step-dialog.component.html @@ -25,7 +25,7 @@ nbTooltip="Close" (click)="cancel()" > - + diff --git a/bot/admin/web/src/app/bot/story/action/step/step.component.html b/bot/admin/web/src/app/bot/story/action/step/step.component.html index d579e4cc3e..dc03176636 100644 --- a/bot/admin/web/src/app/bot/story/action/step/step.component.html +++ b/bot/admin/web/src/app/bot/story/action/step/step.component.html @@ -30,7 +30,7 @@ *ngIf="canUpward" class="d-block" > - + @@ -119,7 +119,7 @@ *ngIf="!step.entity || step.entity.value" > @@ -131,7 +131,7 @@ (click)="setEntity()" *ngIf="step.entity && !step.entity.value" > - + {{ step.entity ? (step.entity.value ? step.entity.value : step.entity.entityRole) : '' }} @@ -215,7 +215,7 @@ size="small" (click)="removeStep()" > - + Remove Action @@ -227,7 +227,7 @@ (click)="addChild()" *ngIf="!step.new && step.intent && !step.currentAnswer().isEmpty()" > - + Add action @@ -237,7 +237,7 @@ size="small" (click)="duplicateStep()" > - + Duplicate @@ -248,7 +248,7 @@ (click)="generateChildren()" *ngIf="!step.new && step.intent && !step.currentAnswer().isEmpty()" > - + Generate from entity diff --git a/bot/admin/web/src/app/bot/story/action/steps/steps.component.html b/bot/admin/web/src/app/bot/story/action/steps/steps.component.html index a74cf1e9e0..10c75cf82c 100644 --- a/bot/admin/web/src/app/bot/story/action/steps/steps.component.html +++ b/bot/admin/web/src/app/bot/story/action/steps/steps.component.html @@ -69,7 +69,7 @@ size="small" (click)="generate()" > - + Generate from Entity diff --git a/bot/admin/web/src/app/bot/story/answer/answer-dialog/answer-dialog.component.html b/bot/admin/web/src/app/bot/story/answer/answer-dialog/answer-dialog.component.html index 27aaf2dba5..ebd24a5547 100644 --- a/bot/admin/web/src/app/bot/story/answer/answer-dialog/answer-dialog.component.html +++ b/bot/admin/web/src/app/bot/story/answer/answer-dialog/answer-dialog.component.html @@ -24,7 +24,7 @@ nbTooltip="Close" (click)="cancel()" > - + diff --git a/bot/admin/web/src/app/bot/story/answer/answer/answer.component.html b/bot/admin/web/src/app/bot/story/answer/answer/answer.component.html index 534926351a..3abbc374aa 100644 --- a/bot/admin/web/src/app/bot/story/answer/answer/answer.component.html +++ b/bot/admin/web/src/app/bot/story/answer/answer/answer.component.html @@ -26,9 +26,10 @@ [size]="editableIconSize" (click)="$event.stopPropagation(); editAnswer()" > - + +
- + I18n
@@ -53,7 +53,7 @@ nbTooltip="Move upward" (click)="upward(a)" > - +