@windward/integrations 0.0.9 → 0.0.11
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/components/FileImport/Dropbox.vue +9 -0
- package/components/FileImport/FileImportMenu.vue +111 -0
- package/components/FileImport/GoogleDrive.vue +9 -0
- package/components/FileImport/Resourcespace.vue +202 -0
- package/components/Integration/Driver/ManageAtutor.vue +20 -12
- package/components/Integration/Driver/ManageResourcespace.vue +137 -0
- package/components/Integration/JobLog.vue +370 -45
- package/components/Integration/JobTable.vue +18 -2
- package/components/Navigation/Items/CourseJobLog.vue +55 -0
- package/components/SecretField.vue +1 -0
- package/config/integration.config.js +2 -0
- package/helpers/Driver/Resourcespace.ts +15 -0
- package/i18n/en-US/components/file_import/index.ts +5 -0
- package/i18n/en-US/components/file_import/resourcespace.ts +4 -0
- package/i18n/en-US/components/index.ts +2 -0
- package/i18n/en-US/components/integration/driver.ts +7 -0
- package/i18n/en-US/components/integration/index.ts +2 -0
- package/i18n/en-US/components/integration/job.ts +0 -2
- package/i18n/en-US/components/integration/job_log.ts +24 -0
- package/i18n/en-US/shared/error.ts +1 -0
- package/i18n/en-US/shared/file.ts +5 -0
- package/i18n/en-US/shared/index.ts +2 -0
- package/models/OrganizationIntegration.ts +5 -0
- package/models/RemoteFile.ts +12 -0
- package/package.json +1 -1
- package/pages/admin/importCourse.vue +7 -1
- package/plugin.js +50 -0
- package/test/Components/FileImport/Dropbox.spec.js +24 -0
- package/test/Components/FileImport/GoogleDrive.spec.js +24 -0
- package/test/Components/FileImport/Resourcespace.spec.js +24 -0
- package/test/Components/Integration/Driver/ManageAtutor.spec.js +22 -0
- package/test/Components/Integration/Driver/ManageResourcespace.spec.js +22 -0
- package/test/__mocks__/componentsMock.js +12 -0
- package/test/__mocks__/modelMock.js +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
view_log: 'View Log',
|
|
3
|
+
view_course_import_log: 'View Course Import Log',
|
|
4
|
+
no_results: 'No results found',
|
|
5
|
+
remote_course_id: 'Remote Course Id',
|
|
6
|
+
remote_content_id: 'Remtote Content Id',
|
|
7
|
+
remote_content_name: 'Remote Content Name',
|
|
8
|
+
remote_url: 'Remote Url',
|
|
9
|
+
remote_code: 'Remote Code',
|
|
10
|
+
remote_sso: 'Remote SSO',
|
|
11
|
+
log_level: 'Log Level',
|
|
12
|
+
level_prefix: 'level',
|
|
13
|
+
search: {
|
|
14
|
+
level_info: 'Info Messages',
|
|
15
|
+
level_warning: 'Warning Messages',
|
|
16
|
+
level_error: 'Error Messages',
|
|
17
|
+
file_missing_error: 'File Missing',
|
|
18
|
+
data_error: 'Unexpected Data Error',
|
|
19
|
+
converted_file: 'File Converted',
|
|
20
|
+
converted_file_error: 'File Conversion Error',
|
|
21
|
+
parse_error: 'Content Block Parsing Error',
|
|
22
|
+
linking_error: 'Content Linking Error',
|
|
23
|
+
},
|
|
24
|
+
}
|
|
@@ -2,6 +2,7 @@ import contentBlocks from './content_blocks'
|
|
|
2
2
|
import settings from './settings'
|
|
3
3
|
import menu from './menu'
|
|
4
4
|
import permission from './permission'
|
|
5
|
+
import file from './file'
|
|
5
6
|
import error from './error'
|
|
6
7
|
|
|
7
8
|
export default {
|
|
@@ -9,5 +10,6 @@ export default {
|
|
|
9
10
|
settings,
|
|
10
11
|
menu,
|
|
11
12
|
permission,
|
|
13
|
+
file,
|
|
12
14
|
error,
|
|
13
15
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Model from '~/models/Model'
|
|
2
2
|
import RemoteOrganization from './RemoteOrganization'
|
|
3
|
+
import RemoteFile from './RemoteFile'
|
|
3
4
|
|
|
4
5
|
export default class OrganizationIntegration extends Model {
|
|
5
6
|
get required(): string[] {
|
|
@@ -14,4 +15,8 @@ export default class OrganizationIntegration extends Model {
|
|
|
14
15
|
remoteOrganizations() {
|
|
15
16
|
return this.hasMany(RemoteOrganization)
|
|
16
17
|
}
|
|
18
|
+
|
|
19
|
+
remoteFiles() {
|
|
20
|
+
return this.hasMany(RemoteFile)
|
|
21
|
+
}
|
|
17
22
|
}
|
package/package.json
CHANGED
|
@@ -210,13 +210,19 @@ export default {
|
|
|
210
210
|
},
|
|
211
211
|
async fetch() {
|
|
212
212
|
this.loading.integration = true
|
|
213
|
-
|
|
213
|
+
const organizationIntegrations = await new Organization({
|
|
214
214
|
id: this.organization.id,
|
|
215
215
|
})
|
|
216
216
|
.integrations()
|
|
217
217
|
.with(['vendor'])
|
|
218
218
|
.where('enabled', true)
|
|
219
219
|
.get()
|
|
220
|
+
|
|
221
|
+
// Filter out any vendors that don't support course imports
|
|
222
|
+
this.organizationIntegrations = organizationIntegrations.filter((o) => {
|
|
223
|
+
return _.get(o, 'vendor.driver.course_import', false)
|
|
224
|
+
})
|
|
225
|
+
|
|
220
226
|
this.loading.integration = false
|
|
221
227
|
},
|
|
222
228
|
computed: {
|
package/plugin.js
CHANGED
|
@@ -9,6 +9,13 @@ import IntegrationHelper from './helpers/IntegrationHelper'
|
|
|
9
9
|
import LtiConsumerBlock from './components/Content/Blocks/ExternalIntegration/LtiConsumer'
|
|
10
10
|
import LtiConsumerBlockSettings from './components/Settings/ExternalIntegration/LtiConsumerSettings'
|
|
11
11
|
|
|
12
|
+
import FileImportMenu from './components/FileImport/FileImportMenu.vue'
|
|
13
|
+
import FileImportResourcespace from './components/FileImport/Resourcespace.vue'
|
|
14
|
+
import FileImportGoogleDrive from './components/FileImport/GoogleDrive.vue'
|
|
15
|
+
import FileImportDropbox from './components/FileImport/Dropbox.vue'
|
|
16
|
+
|
|
17
|
+
import CourseJobLog from './components/Navigation/Items/CourseJobLog.vue'
|
|
18
|
+
|
|
12
19
|
export default {
|
|
13
20
|
name: 'windward.integrations.name',
|
|
14
21
|
hooks: {
|
|
@@ -180,6 +187,18 @@ export default {
|
|
|
180
187
|
},
|
|
181
188
|
],
|
|
182
189
|
},
|
|
190
|
+
{
|
|
191
|
+
i18n: 'windward.integrations.components.integration.job_log.view_course_import_log',
|
|
192
|
+
template: CourseJobLog,
|
|
193
|
+
icon: 'mdi-note-search',
|
|
194
|
+
context: ['course'],
|
|
195
|
+
display: ['course_tools.append-9'],
|
|
196
|
+
permissions: {
|
|
197
|
+
'plugin.windward.integrations.course.externalIntegration': {
|
|
198
|
+
readable: true,
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
183
202
|
],
|
|
184
203
|
contentBlock: [
|
|
185
204
|
{
|
|
@@ -204,6 +223,37 @@ export default {
|
|
|
204
223
|
},
|
|
205
224
|
},
|
|
206
225
|
],
|
|
226
|
+
fileImport: [
|
|
227
|
+
{
|
|
228
|
+
tag: 'windward-integrations-file-import-menu',
|
|
229
|
+
template: FileImportMenu,
|
|
230
|
+
metadata: {
|
|
231
|
+
vendors: [
|
|
232
|
+
{
|
|
233
|
+
template: FileImportResourcespace,
|
|
234
|
+
i18n: 'windward.integrations.shared.file.import_resourcespace',
|
|
235
|
+
icon: 'mdi-cube',
|
|
236
|
+
product_code: 'resourcespace',
|
|
237
|
+
disabled: false,
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
template: FileImportGoogleDrive,
|
|
241
|
+
i18n: 'windward.integrations.shared.file.import_google_drive',
|
|
242
|
+
icon: 'mdi-google-drive',
|
|
243
|
+
product_code: 'google_drive',
|
|
244
|
+
disabled: true,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
template: FileImportDropbox,
|
|
248
|
+
i18n: 'windward.integrations.shared.file.import_dropbox',
|
|
249
|
+
icon: 'mdi-dropbox',
|
|
250
|
+
product_code: 'dropbox',
|
|
251
|
+
disabled: true,
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
],
|
|
207
257
|
},
|
|
208
258
|
services: {
|
|
209
259
|
Integration: IntegrationHelper,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
import Vuetify from 'vuetify'
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
|
|
7
|
+
import Dropbox from '@/components/FileImport/Dropbox.vue'
|
|
8
|
+
|
|
9
|
+
Vue.use(Vuetify)
|
|
10
|
+
|
|
11
|
+
describe('Dropbox', () => {
|
|
12
|
+
test('Dropbox is a Vue instance', () => {
|
|
13
|
+
const wrapper = shallowMount(Dropbox, {
|
|
14
|
+
vuetify: new Vuetify(),
|
|
15
|
+
propsData: {
|
|
16
|
+
organizationIntegration: {
|
|
17
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
mocks: defaultMocks,
|
|
21
|
+
})
|
|
22
|
+
expect(wrapper.vm).toBeTruthy()
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
import Vuetify from 'vuetify'
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
|
|
7
|
+
import GoogleDrive from '@/components/FileImport/GoogleDrive.vue'
|
|
8
|
+
|
|
9
|
+
Vue.use(Vuetify)
|
|
10
|
+
|
|
11
|
+
describe('GoogleDrive', () => {
|
|
12
|
+
test('GoogleDrive is a Vue instance', () => {
|
|
13
|
+
const wrapper = shallowMount(GoogleDrive, {
|
|
14
|
+
vuetify: new Vuetify(),
|
|
15
|
+
propsData: {
|
|
16
|
+
organizationIntegration: {
|
|
17
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
mocks: defaultMocks,
|
|
21
|
+
})
|
|
22
|
+
expect(wrapper.vm).toBeTruthy()
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
import Vuetify from 'vuetify'
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
|
|
7
|
+
import Resourcespace from '@/components/FileImport/Resourcespace.vue'
|
|
8
|
+
|
|
9
|
+
Vue.use(Vuetify)
|
|
10
|
+
|
|
11
|
+
describe('Resourcespace', () => {
|
|
12
|
+
test('Resourcespace is a Vue instance', () => {
|
|
13
|
+
const wrapper = shallowMount(Resourcespace, {
|
|
14
|
+
vuetify: new Vuetify(),
|
|
15
|
+
propsData: {
|
|
16
|
+
organizationIntegration: {
|
|
17
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
mocks: defaultMocks,
|
|
21
|
+
})
|
|
22
|
+
expect(wrapper.vm).toBeTruthy()
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
import Vuetify from 'vuetify'
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
|
|
7
|
+
import ManageAtutor from '@/components/Integration/Driver/ManageAtutor.vue'
|
|
8
|
+
|
|
9
|
+
Vue.use(Vuetify)
|
|
10
|
+
|
|
11
|
+
describe('ManageAtutor', () => {
|
|
12
|
+
test('ManageAtutor is a Vue instance', () => {
|
|
13
|
+
const wrapper = shallowMount(ManageAtutor, {
|
|
14
|
+
vuetify: new Vuetify(),
|
|
15
|
+
mocks: defaultMocks,
|
|
16
|
+
propsData: {
|
|
17
|
+
vendor: {},
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
expect(wrapper.vm).toBeTruthy()
|
|
21
|
+
})
|
|
22
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils'
|
|
2
|
+
|
|
3
|
+
import Vue from 'vue'
|
|
4
|
+
import Vuetify from 'vuetify'
|
|
5
|
+
import { defaultMocks } from '@/test/mocks'
|
|
6
|
+
|
|
7
|
+
import ManageResourcespace from '@/components/Integration/Driver/ManageResourcespace.vue'
|
|
8
|
+
|
|
9
|
+
Vue.use(Vuetify)
|
|
10
|
+
|
|
11
|
+
describe('ManageResourcespace', () => {
|
|
12
|
+
test('ManageResourcespace is a Vue instance', () => {
|
|
13
|
+
const wrapper = shallowMount(ManageResourcespace, {
|
|
14
|
+
vuetify: new Vuetify(),
|
|
15
|
+
mocks: defaultMocks,
|
|
16
|
+
propsData: {
|
|
17
|
+
vendor: {},
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
expect(wrapper.vm).toBeTruthy()
|
|
21
|
+
})
|
|
22
|
+
})
|
|
@@ -11,6 +11,18 @@ jest.mock(
|
|
|
11
11
|
{ virtual: true }
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
jest.mock(
|
|
15
|
+
'~/components/Breadcrumbs.vue',
|
|
16
|
+
() => {
|
|
17
|
+
return {
|
|
18
|
+
data() {
|
|
19
|
+
return { validation: {} }
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{ virtual: true }
|
|
24
|
+
)
|
|
25
|
+
|
|
14
26
|
jest.mock(
|
|
15
27
|
'~/components/SearchField.vue',
|
|
16
28
|
() => {
|