Skip to content

Commit a221397

Browse files
committed
fix: fix webpack build
Signed-off-by: Marcel Klehr <[email protected]>
1 parent 0209b80 commit a221397

File tree

4 files changed

+24
-70
lines changed

4 files changed

+24
-70
lines changed

src/admin.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import Vue from 'vue'
22
import App from './components/ViewAdmin.vue'
3-
import AppGlobal from './mixins/AppGlobal.js'
4-
5-
Vue.mixin(AppGlobal)
63

74
global.ContextChat = new Vue({
85
el: '#context_chat',

src/components/ViewAdmin.vue

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,42 @@
1313
<NcNoteCard v-else type="warning">
1414
{{ t('context_chat', 'The initial indexing is still running.') }}
1515
</NcNoteCard>
16-
<NcNoteCard type="warning" v-if="stats.initial_indexing_complete && stats.eligible_files_count > stats.vectordb_document_counts['files__default'] * 1.2">
17-
{{ t('context_chat', 'Less files were indexed than expected. Only {percent}% files out of {eligibleCount} are in the VectorDB.', {percent: Math.round((stats.vectordb_document_counts['files__default'] / stats.eligible_files_count) * 100), eligibleCount: stats.eligible_files_count}) }}
18-
</NcNoteCard>
19-
<NcNoteCard type="info">
20-
{{ t('context_chat', 'Eligible files for indexing: {count}', {count: stats.eligible_files_count}) }}
21-
</NcNoteCard>
22-
<NcNoteCard type="info">
23-
{{ t('context_chat', 'Queued files for indexing: {count}', {count: stats.queued_files_count}) }}
24-
</NcNoteCard>
25-
<NcNoteCard type="info" v-for="(count, providerId) in stats.queued_documents_counts">
26-
{{ t('context_chat', 'Queued documents from provider {providerId} for indexing: {count}', {count, providerId}) }}
27-
</NcNoteCard>
28-
<NcNoteCard type="info" v-for="(count, providerId) in stats.vectordb_document_counts">
29-
{{ t('context_chat', 'Documents in VectorDB from provider {providerId} for indexing: {count}', {count, providerId}) }}
30-
</NcNoteCard>
31-
<NcNoteCard type="info">
32-
{{ t('context_chat', 'Queued content update actions: {count}', {count: stats.queued_actions_count}) }}
33-
</NcNoteCard>
16+
<NcNoteCard v-if="stats.initial_indexing_complete && stats.eligible_files_count > stats.vectordb_document_counts['files__default'] * 1.2" type="warning">
17+
{{ t('context_chat', 'Less files were indexed than expected. Only {percent}% files out of {eligibleCount} are in the VectorDB.', {percent: Math.round((stats.vectordb_document_counts['files__default'] / stats.eligible_files_count) * 100), eligibleCount: stats.eligible_files_count}) }}
18+
</NcNoteCard>
19+
<NcNoteCard type="info">
20+
{{ t('context_chat', 'Eligible files for indexing: {count}', {count: stats.eligible_files_count}) }}
21+
</NcNoteCard>
22+
<NcNoteCard type="info">
23+
{{ t('context_chat', 'Queued files for indexing: {count}', {count: stats.queued_files_count}) }}
24+
</NcNoteCard>
25+
<NcNoteCard v-for="(count, providerId) in stats.queued_documents_counts" :key="providerId" type="info">
26+
{{ t('context_chat', 'Queued documents from provider {providerId} for indexing: {count}', {count, providerId}) }}
27+
</NcNoteCard>
28+
<NcNoteCard v-for="(count, providerId) in stats.vectordb_document_counts" :key="providerId" type="info">
29+
{{ t('context_chat', 'Documents in VectorDB from provider {providerId} for indexing: {count}', {count, providerId}) }}
30+
</NcNoteCard>
31+
<NcNoteCard type="info">
32+
{{ t('context_chat', 'Queued content update actions: {count}', {count: stats.queued_actions_count}) }}
33+
</NcNoteCard>
3434
</NcSettingsSection>
3535
</div>
3636
</template>
3737

3838
<script>
39-
import { NcNoteCard, NcSettingsSection, NcCheckboxRadioSwitch, NcTextField } from '@nextcloud/vue'
39+
import { NcNoteCard, NcSettingsSection } from '@nextcloud/vue'
4040
import { loadState } from '@nextcloud/initial-state'
4141
import humanizeDuration from 'humanize-duration'
4242

4343
const MAX_RELATIVE_DATE = 1000 * 60 * 60 * 24 * 7 // one week
4444

4545
export default {
4646
name: 'ViewAdmin',
47-
components: { NcSettingsSection, NcNoteCard, NcCheckboxRadioSwitch, NcTextField },
47+
components: { NcSettingsSection, NcNoteCard },
4848

4949
data() {
5050
return {
51-
stats: {}
51+
stats: {},
5252
}
5353
},
5454

@@ -62,8 +62,8 @@ export default {
6262
this.stats = loadState('context_chat', 'stats')
6363
},
6464

65-
methods: {
66-
showDate(timestamp) {
65+
methods: {
66+
showDate(timestamp) {
6767
if (!timestamp) {
6868
return this.t('context_chat', 'never')
6969
}

src/components/icons/CwydIcon.vue

Lines changed: 0 additions & 44 deletions
This file was deleted.

webpack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ webpackConfig.stats = {
2020

2121
// const appId = 'context_chat'
2222
webpackConfig.entry = {
23+
'admin': './src/admin.js',
2324
}
2425

2526
webpackConfig.plugins.push(

0 commit comments

Comments
 (0)