@windward/integrations 0.2.0 → 0.3.0

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.
Files changed (26) hide show
  1. package/components/Content/Blocks/ExternalIntegration/LtiConsumer.vue +3 -2
  2. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumer.vue +1 -1
  3. package/components/ExternalIntegration/Driver/Lti1p1/ManageConsumers.vue +44 -25
  4. package/components/ExternalIntegration/Driver/Lti1p1/ManageProvider.vue +5 -5
  5. package/components/ExternalIntegration/Driver/Lti1p1/ManageProviders.vue +48 -24
  6. package/components/ExternalIntegration/Driver/Lti1p3/ManageConsumer.vue +1 -1
  7. package/components/ExternalIntegration/Driver/Lti1p3/ManageConsumers.vue +67 -44
  8. package/components/ExternalIntegration/Driver/Lti1p3/ManageProvider.vue +1 -1
  9. package/components/ExternalIntegration/Driver/Lti1p3/ManageProviders.vue +44 -24
  10. package/components/ExternalIntegration/Driver/Lti1p3/ViewConsumer.vue +1 -1
  11. package/components/ExternalIntegration/ProviderTargetPicker.vue +2 -2
  12. package/components/FileImport/FileImportMenu.vue +1 -1
  13. package/components/FileImport/Resourcespace.vue +1 -1
  14. package/components/Integration/Driver/ManageBase.vue +1 -1
  15. package/components/Integration/JobLog.vue +1 -1
  16. package/components/Integration/JobTable.vue +2 -1
  17. package/components/Navigation/Items/CourseJobLog.vue +2 -1
  18. package/components/Settings/ExternalIntegration/LtiConsumerSettings.vue +5 -2
  19. package/helpers/IntegrationHelper.ts +2 -2
  20. package/i18n/en-US/components/external_integration/driver/lti1p1.ts +3 -0
  21. package/i18n/es-ES/components/external_integration/driver/lti1p1.ts +3 -0
  22. package/i18n/sv-SE/components/external_integration/driver/lti1p1.ts +3 -0
  23. package/package.json +2 -2
  24. package/pages/admin/vendors.vue +2 -2
  25. package/test/__mocks__/componentsMock.js +1 -48
  26. package/test/__mocks__/modelMock.js +12 -95
@@ -154,7 +154,7 @@ import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
154
154
  import Course from '~/models/Course'
155
155
  import Organization from '~/models/Organization'
156
156
  import Enrollment from '~/models/Enrollment'
157
- import DialogBox from '~/components/DialogBox.vue'
157
+ import DialogBox from '~/components/Core/DialogBox.vue'
158
158
 
159
159
  export default {
160
160
  name: 'ContentBlockExternalIntegrationLti1p1Consumer',
@@ -321,7 +321,8 @@ export default {
321
321
  },
322
322
  onBeforeSave() {
323
323
  // Set a generic body since we don't use this field
324
- this.block.body = 'lti-' + this.consumer.version + '-consumer'
324
+ this.block.body =
325
+ 'lti-' + _.get(this.consumer, 'version', '0.0') + '-consumer'
325
326
  },
326
327
  },
327
328
  }
@@ -154,7 +154,7 @@ import LtiConsumer from '../../../../models/ExternalIntegration/LtiConsumer'
154
154
  import Organization from '~/models/Organization'
155
155
  import Course from '~/models/Course'
156
156
  import TextEditor from '~/components/Text/TextEditor.vue'
157
- import FormVue from '~/components/Form'
157
+ import FormVue from '~/components/Core/Form'
158
158
 
159
159
  export default {
160
160
  name: 'ManageLti1p1ConsumerDriver',
@@ -44,33 +44,51 @@
44
44
  {{ $d(new Date(item.created_at), 'long') }}
45
45
  </template>
46
46
  <template #[`item.actions`]="{ index, item }">
47
- <DialogBox color="primary" action-save @click:save="onSaved">
48
- <template #title>{{
49
- $t(
50
- 'windward.integrations.components.external_integration.driver.lti1p1.edit'
51
- )
52
- }}</template>
53
- <template #trigger>
54
- <v-icon small>mdi-pencil</v-icon>
47
+ <SpeedDial
48
+ direction="left"
49
+ color="primary"
50
+ transition="slide-x-reverse-transition"
51
+ >
52
+ <v-btn
53
+ color="error"
54
+ outlined
55
+ class="outlined"
56
+ @click="onConfirmDelete(item)"
57
+ >
58
+ {{ $t('shared.forms.delete') }}
55
59
  <span class="sr-only">{{
60
+ $t('shared.forms.delete')
61
+ }}</span>
62
+ </v-btn>
63
+ <DialogBox
64
+ color="primary"
65
+ outlined
66
+ :class-prop="'outlined'"
67
+ action-save
68
+ @click:save="onSaved"
69
+ >
70
+ <template #title>{{
56
71
  $t(
57
72
  'windward.integrations.components.external_integration.driver.lti1p1.edit'
58
73
  )
59
- }}</span>
60
- </template>
61
- <template #form="{ on, attrs }"
62
- ><ManageConsumer
63
- v-model="consumers[index]"
64
- v-bind="attrs"
65
- v-on="on"
66
- ></ManageConsumer
67
- ></template>
68
- </DialogBox>
69
-
70
- <v-btn icon>
71
- <v-icon @click="onConfirmDelete(item)"> mdi-delete </v-icon>
72
- <span class="sr-only">{{ $t('shared.forms.delete') }}</span>
73
- </v-btn>
74
+ }}</template>
75
+ <template #trigger>
76
+ {{ $t('shared.forms.edit') }}
77
+ <span class="sr-only">{{
78
+ $t(
79
+ 'windward.integrations.components.external_integration.driver.lti1p1.edit'
80
+ )
81
+ }}</span>
82
+ </template>
83
+ <template #form="{ on, attrs }"
84
+ ><ManageConsumer
85
+ v-model="consumers[index]"
86
+ v-bind="attrs"
87
+ v-on="on"
88
+ ></ManageConsumer
89
+ ></template>
90
+ </DialogBox>
91
+ </SpeedDial>
74
92
  </template>
75
93
  </v-data-table>
76
94
  </div>
@@ -83,11 +101,12 @@ import LtiConsumer from '../../../../models/ExternalIntegration/LtiConsumer'
83
101
  import ManageConsumer from './ManageConsumer.vue'
84
102
  import Course from '~/models/Course'
85
103
  import Organization from '~/models/Organization'
86
- import DialogBox from '~/components/DialogBox.vue'
104
+ import DialogBox from '~/components/Core/DialogBox.vue'
105
+ import SpeedDial from '~/components/Core/SpeedDial.vue'
87
106
 
88
107
  export default {
89
108
  name: 'ManageLti1p1ConsumersDriver',
90
- components: { DialogBox, ManageConsumer },
109
+ components: { DialogBox, ManageConsumer, SpeedDial },
91
110
  data() {
92
111
  return {
93
112
  consumers: [],
@@ -52,12 +52,12 @@
52
52
  "
53
53
  :label="
54
54
  $t(
55
- 'windward.integrations.components.external_integration.driver.lti1p1.key'
55
+ 'windward.integrations.components.external_integration.driver.lti1p1.key_auto'
56
56
  )
57
57
  "
58
58
  :hint="
59
59
  $t(
60
- 'windward.integrations.components.external_integration.driver.lti1p1.key'
60
+ 'windward.integrations.components.external_integration.driver.lti1p1.key_auto'
61
61
  )
62
62
  "
63
63
  ></v-text-field>
@@ -72,12 +72,12 @@
72
72
  "
73
73
  :label="
74
74
  $t(
75
- 'windward.integrations.components.external_integration.driver.lti1p1.secret'
75
+ 'windward.integrations.components.external_integration.driver.lti1p1.secret_auto'
76
76
  )
77
77
  "
78
78
  :hint="
79
79
  $t(
80
- 'windward.integrations.components.external_integration.driver.lti1p1.secret'
80
+ 'windward.integrations.components.external_integration.driver.lti1p1.secret_auto'
81
81
  )
82
82
  "
83
83
  >
@@ -256,7 +256,7 @@ import _ from 'lodash'
256
256
  import { mapGetters } from 'vuex'
257
257
  import ProviderTargetPicker from '../../ProviderTargetPicker.vue'
258
258
  import LtiProvider from '../../../../models/ExternalIntegration/LtiProvider'
259
- import FormVue from '~/components/Form.vue'
259
+ import FormVue from '~/components/Core/Form.vue'
260
260
  import Role from '~/models/Role'
261
261
  import Organization from '~/models/Organization'
262
262
  import Course from '~/models/Course'
@@ -63,33 +63,55 @@
63
63
  {{ $d(new Date(item.created_at), 'short') }}
64
64
  </template>
65
65
  <template #[`item.actions`]="{ index, item }">
66
- <DialogBox color="primary" action-save @click:save="onSaved">
67
- <template #title>{{
68
- $t(
69
- 'windward.integrations.components.external_integration.driver.lti1p1.edit'
70
- )
71
- }}</template>
72
- <template #trigger>
73
- <v-icon small>mdi-pencil</v-icon>
66
+ <SpeedDial
67
+ direction="left"
68
+ color="primary"
69
+ transition="slide-x-reverse-transition"
70
+ >
71
+ <v-btn
72
+ color="error"
73
+ outlined
74
+ class="outlined"
75
+ @click="onConfirmDelete(item)"
76
+ >
77
+ {{ $t('shared.forms.delete') }}
74
78
  <span class="sr-only">{{
79
+ $t('shared.forms.delete')
80
+ }}</span>
81
+ </v-btn>
82
+ <DialogBox
83
+ color="primary"
84
+ outlined
85
+ :class-prop="'outlined'"
86
+ action-save
87
+ @click:save="onSaved"
88
+ >
89
+ <template #title>{{
75
90
  $t(
76
91
  'windward.integrations.components.external_integration.driver.lti1p1.edit'
77
92
  )
78
- }}</span>
79
- </template>
80
- <template #form="{ on, attrs }"
81
- ><ManageProvider
82
- v-model="providers[index]"
83
- v-bind="attrs"
84
- v-on="on"
85
- ></ManageProvider
86
- ></template>
87
- </DialogBox>
88
-
89
- <v-btn icon>
90
- <v-icon @click="onConfirmDelete(item)"> mdi-delete </v-icon>
91
- <span class="sr-only">{{ $t('shared.forms.delete') }}</span>
92
- </v-btn>
93
+ }}</template>
94
+ <template #trigger>
95
+ {{
96
+ $t(
97
+ 'windward.integrations.components.external_integration.driver.lti1p1.edit_display'
98
+ )
99
+ }}
100
+ <span class="sr-only">{{
101
+ $t(
102
+ 'windward.integrations.components.external_integration.driver.lti1p1.edit'
103
+ )
104
+ }}</span>
105
+ </template>
106
+ <template #form="{ on, attrs }"
107
+ ><ManageProvider
108
+ v-model="providers[index]"
109
+ v-bind="attrs"
110
+ v-on="on"
111
+ ></ManageProvider
112
+ ></template>
113
+ </DialogBox>
114
+ </SpeedDial>
93
115
  </template>
94
116
  </v-data-table>
95
117
  </div>
@@ -102,9 +124,10 @@ import LtiProvider from '../../../../models/ExternalIntegration/LtiProvider'
102
124
  import SecretField from '../../../SecretField.vue'
103
125
  import ProviderTargetViewer from '../../ProviderTargetViewer.vue'
104
126
  import ManageProvider from './ManageProvider.vue'
105
- import DialogBox from '~/components/DialogBox.vue'
127
+ import DialogBox from '~/components/Core/DialogBox.vue'
106
128
  import Organization from '~/models/Organization'
107
129
  import Course from '~/models/Course'
130
+ import SpeedDial from '~/components/Core/SpeedDial.vue'
108
131
 
109
132
  export default {
110
133
  name: 'ManageLti1p1ProvidersDriver',
@@ -113,6 +136,7 @@ export default {
113
136
  DialogBox,
114
137
  ManageProvider,
115
138
  ProviderTargetViewer,
139
+ SpeedDial,
116
140
  },
117
141
  data() {
118
142
  return {
@@ -145,7 +145,7 @@ import LtiConsumer from '../../../../models/ExternalIntegration/LtiConsumer'
145
145
  import Organization from '~/models/Organization'
146
146
  import Course from '~/models/Course'
147
147
  import TextEditor from '~/components/Text/TextEditor.vue'
148
- import FormVue from '~/components/Form'
148
+ import FormVue from '~/components/Core/Form'
149
149
 
150
150
  export default {
151
151
  name: 'ManageLti1p3ConsumerDriver',
@@ -44,55 +44,77 @@
44
44
  {{ $d(new Date(item.created_at), 'long') }}
45
45
  </template>
46
46
  <template #[`item.actions`]="{ index, item }">
47
- <DialogBox color="primary">
48
- <template #title>{{
49
- $t(
50
- 'windward.integrations.components.external_integration.driver.lti1p3.view'
51
- )
52
- }}</template>
53
- <template #trigger>
54
- <v-icon small>mdi-eye-outline</v-icon>
47
+ <SpeedDial
48
+ direction="left"
49
+ color="primary"
50
+ transition="slide-x-reverse-transition"
51
+ >
52
+ <v-btn
53
+ color="error"
54
+ outlined
55
+ class="outlined"
56
+ @click="onConfirmDelete(item)"
57
+ >
58
+ {{ $t('shared.forms.delete') }}
55
59
  <span class="sr-only">{{
60
+ $t('shared.forms.delete')
61
+ }}</span>
62
+ </v-btn>
63
+ <DialogBox
64
+ color="primary"
65
+ outlined
66
+ :class-prop="'outlined'"
67
+ >
68
+ <template #title>{{
56
69
  $t(
57
70
  'windward.integrations.components.external_integration.driver.lti1p3.view'
58
71
  )
59
- }}</span>
60
- </template>
61
- <template #form="{ on, attrs }"
62
- ><ViewConsumer
63
- v-model="consumers[index]"
64
- v-bind="attrs"
65
- v-on="on"
66
- ></ViewConsumer
67
- ></template>
68
- </DialogBox>
69
- <DialogBox color="primary" action-save @click:save="onSaved">
70
- <template #title>{{
71
- $t(
72
- 'windward.integrations.components.external_integration.driver.lti1p3.edit'
73
- )
74
- }}</template>
75
- <template #trigger>
76
- <v-icon small>mdi-pencil</v-icon>
77
- <span class="sr-only">{{
72
+ }}</template>
73
+ <template #trigger>
74
+ <v-icon small>mdi-eye-outline</v-icon>
75
+ <span class="sr-only">{{
76
+ $t(
77
+ 'windward.integrations.components.external_integration.driver.lti1p3.view'
78
+ )
79
+ }}</span>
80
+ </template>
81
+ <template #form="{ on, attrs }"
82
+ ><ViewConsumer
83
+ v-model="consumers[index]"
84
+ v-bind="attrs"
85
+ v-on="on"
86
+ ></ViewConsumer
87
+ ></template>
88
+ </DialogBox>
89
+ <DialogBox
90
+ color="primary"
91
+ outlined
92
+ :class-prop="'outlined'"
93
+ action-save
94
+ @click:save="onSaved"
95
+ >
96
+ <template #title>{{
78
97
  $t(
79
98
  'windward.integrations.components.external_integration.driver.lti1p3.edit'
80
99
  )
81
- }}</span>
82
- </template>
83
- <template #form="{ on, attrs }"
84
- ><ManageConsumer
85
- v-model="consumers[index]"
86
- v-bind="attrs"
87
- v-on="on"
88
- ></ManageConsumer
89
- ></template>
90
- </DialogBox>
91
-
92
- <v-btn icon>
93
- <v-icon @click="onConfirmDelete(item)"> mdi-delete </v-icon>
94
- <span class="sr-only">{{ $t('shared.forms.delete') }}</span>
95
- </v-btn>
100
+ }}</template>
101
+ <template #trigger>
102
+ <v-icon small>mdi-pencil</v-icon>
103
+ <span class="sr-only">{{
104
+ $t(
105
+ 'windward.integrations.components.external_integration.driver.lti1p3.edit'
106
+ )
107
+ }}</span>
108
+ </template>
109
+ <template #form="{ on, attrs }"
110
+ ><ManageConsumer
111
+ v-model="consumers[index]"
112
+ v-bind="attrs"
113
+ v-on="on"
114
+ ></ManageConsumer
115
+ ></template>
116
+ </DialogBox>
117
+ </SpeedDial>
96
118
  </template>
97
119
  </v-data-table>
98
120
  </div>
@@ -106,11 +128,12 @@ import ManageConsumer from './ManageConsumer.vue'
106
128
  import ViewConsumer from './ViewConsumer.vue'
107
129
  import Course from '~/models/Course'
108
130
  import Organization from '~/models/Organization'
109
- import DialogBox from '~/components/DialogBox.vue'
131
+ import DialogBox from '~/components/Core/DialogBox.vue'
132
+ import SpeedDial from '~/components/Core/SpeedDial.vue'
110
133
 
111
134
  export default {
112
135
  name: 'ManageLti1p1ConsumersDriver',
113
- components: { DialogBox, ManageConsumer, ViewConsumer },
136
+ components: { DialogBox, ManageConsumer, ViewConsumer, SpeedDial },
114
137
  data() {
115
138
  return {
116
139
  consumers: [],
@@ -356,7 +356,7 @@ import { mapGetters } from 'vuex'
356
356
  import ProviderTargetPicker from '../../ProviderTargetPicker.vue'
357
357
  import LtiProvider from '../../../../models/ExternalIntegration/LtiProvider'
358
358
 
359
- import FormVue from '~/components/Form.vue'
359
+ import FormVue from '~/components/Core/Form.vue'
360
360
  import Role from '~/models/Role'
361
361
  import Organization from '~/models/Organization'
362
362
  import Course from '~/models/Course'
@@ -69,33 +69,51 @@
69
69
  {{ $d(new Date(item.created_at), 'short') }}
70
70
  </template>
71
71
  <template #[`item.actions`]="{ index, item }">
72
- <DialogBox color="primary" action-save @click:save="onSaved">
73
- <template #title>{{
74
- $t(
75
- 'windward.integrations.components.external_integration.driver.lti1p3.edit'
76
- )
77
- }}</template>
78
- <template #trigger>
79
- <v-icon small>mdi-pencil</v-icon>
72
+ <SpeedDial
73
+ direction="left"
74
+ color="primary"
75
+ transition="slide-x-reverse-transition"
76
+ >
77
+ <v-btn
78
+ color="error"
79
+ outlined
80
+ class="outlined"
81
+ @click="onConfirmDelete(item)"
82
+ >
83
+ {{ $t('shared.forms.delete') }}
80
84
  <span class="sr-only">{{
85
+ $t('shared.forms.delete')
86
+ }}</span>
87
+ </v-btn>
88
+ <DialogBox
89
+ color="primary"
90
+ outlined
91
+ :class-prop="'outlined'"
92
+ action-save
93
+ @click:save="onSaved"
94
+ >
95
+ <template #title>{{
81
96
  $t(
82
97
  'windward.integrations.components.external_integration.driver.lti1p3.edit'
83
98
  )
84
- }}</span>
85
- </template>
86
- <template #form="{ on, attrs }"
87
- ><ManageProvider
88
- v-model="providers[index]"
89
- v-bind="attrs"
90
- v-on="on"
91
- ></ManageProvider
92
- ></template>
93
- </DialogBox>
94
-
95
- <v-btn icon>
96
- <v-icon @click="onConfirmDelete(item)"> mdi-delete </v-icon>
97
- <span class="sr-only">{{ $t('shared.forms.delete') }}</span>
98
- </v-btn>
99
+ }}</template>
100
+ <template #trigger>
101
+ {{ $t('shared.forms.edit') }}
102
+ <span class="sr-only">{{
103
+ $t(
104
+ 'windward.integrations.components.external_integration.driver.lti1p3.edit'
105
+ )
106
+ }}</span>
107
+ </template>
108
+ <template #form="{ on, attrs }"
109
+ ><ManageProvider
110
+ v-model="providers[index]"
111
+ v-bind="attrs"
112
+ v-on="on"
113
+ ></ManageProvider
114
+ ></template>
115
+ </DialogBox>
116
+ </SpeedDial>
99
117
  </template>
100
118
  </v-data-table>
101
119
  </div>
@@ -108,9 +126,10 @@ import LtiProvider from '../../../../models/ExternalIntegration/LtiProvider'
108
126
  import SecretField from '../../../SecretField.vue'
109
127
  import ProviderTargetViewer from '../../ProviderTargetViewer.vue'
110
128
  import ManageProvider from './ManageProvider.vue'
111
- import DialogBox from '~/components/DialogBox.vue'
129
+ import DialogBox from '~/components/Core/DialogBox.vue'
112
130
  import Organization from '~/models/Organization'
113
131
  import Course from '~/models/Course'
132
+ import SpeedDial from '~/components/Core/SpeedDial.vue'
114
133
 
115
134
  export default {
116
135
  name: 'ManageLti1p1ProvidersDriver',
@@ -119,6 +138,7 @@ export default {
119
138
  DialogBox,
120
139
  ManageProvider,
121
140
  ProviderTargetViewer,
141
+ SpeedDial,
122
142
  },
123
143
  data() {
124
144
  return {
@@ -112,7 +112,7 @@ import LtiConsumer from '../../../../models/ExternalIntegration/LtiConsumer'
112
112
  import SecretField from '../../../SecretField.vue'
113
113
  import Organization from '~/models/Organization'
114
114
  import Course from '~/models/Course'
115
- import FormVue from '~/components/Form'
115
+ import FormVue from '~/components/Core/Form'
116
116
  export default {
117
117
  name: 'ViewLti1p3Consumer',
118
118
  components: { SecretField },
@@ -144,10 +144,10 @@ export default {
144
144
  targetType === 'locked_course_content' ||
145
145
  targetType === 'locked_course_content_children')
146
146
  ) {
147
- url = `/course/${this.course.id}/content/${this.selectedContent.id}`
147
+ url = `/course/${this.course.id}/section/{section.id}/content/${this.selectedContent.id}`
148
148
  this.provider.course_content_id = this.selectedContent.id
149
149
  } else if (targetType === 'course') {
150
- url = `/course/${this.course.id}/`
150
+ url = `/course/${this.course.id}/section/{section.id}`
151
151
  this.provider.course_content_id = null
152
152
  }
153
153
  this.provider.target = url
@@ -39,7 +39,7 @@
39
39
  import _ from 'lodash'
40
40
  import { mapGetters } from 'vuex'
41
41
  import Organization from '../../models/Organization'
42
- import DialogBox from '~/components/DialogBox.vue'
42
+ import DialogBox from '~/components/Core/DialogBox.vue'
43
43
 
44
44
  export default {
45
45
  name: 'FileImportMenu',
@@ -61,7 +61,7 @@ import { mapGetters } from 'vuex'
61
61
  import OrganizationIntegration from '../../models/OrganizationIntegration'
62
62
  import RemoteFile from '../../models/RemoteFile'
63
63
  import Course from '~/models/Course'
64
- import SearchField from '~/components/SearchField.vue'
64
+ import SearchField from '~/components/Core/SearchField.vue'
65
65
 
66
66
  export default {
67
67
  name: 'FileImportResourcespace',
@@ -3,7 +3,7 @@ import { mapGetters } from 'vuex'
3
3
  import Organization from '../../../models/Organization'
4
4
  import OrganizationIntegration from '../../../models/OrganizationIntegration'
5
5
  import Vendor from '../../../models/Vendor'
6
- import FormVue from '~/components/Form'
6
+ import FormVue from '~/components/Core/Form'
7
7
 
8
8
  export default {
9
9
  name: 'ManageBase',
@@ -187,8 +187,8 @@
187
187
  <script>
188
188
  import _ from 'lodash'
189
189
  import { mapGetters } from 'vuex'
190
- import SearchField from '~/components/SearchField.vue'
191
190
  import Organization from '../../models/Organization'
191
+ import SearchField from '~/components/Core/SearchField.vue'
192
192
 
193
193
  export default {
194
194
  name: 'IntegrationJobLog',
@@ -156,13 +156,14 @@
156
156
  import Confetti from 'canvas-confetti'
157
157
  import _ from 'lodash'
158
158
  import { mapGetters } from 'vuex'
159
+ import DialogBox from '~/components/Core/DialogBox.vue'
159
160
  import Vendor from '../../models/Vendor'
160
161
  import Organization from '../../models/Organization'
161
162
  import JobLog from './JobLog.vue'
162
163
 
163
164
  export default {
164
165
  name: 'IntegrationJobs',
165
- components: { JobLog },
166
+ components: { DialogBox, JobLog },
166
167
  props: {
167
168
  channel: { type: String, required: true },
168
169
  event: { type: String, required: true },
@@ -20,11 +20,12 @@
20
20
  <script>
21
21
  import _ from 'lodash'
22
22
  import { mapGetters } from 'vuex'
23
+ import DialogBox from '~/components/Core/DialogBox.vue'
23
24
  import JobLog from '../../Integration/JobLog.vue'
24
25
 
25
26
  export default {
26
27
  name: 'NavigationItemCourseJobLog',
27
- components: { JobLog },
28
+ components: { DialogBox, JobLog },
28
29
  props: {
29
30
  config: { type: Object, required: true },
30
31
  },
@@ -10,6 +10,7 @@
10
10
  'windward.integrations.components.settings.external_integration.lti_consumer.title'
11
11
  )
12
12
  "
13
+ :disabled="render"
13
14
  ></v-text-field>
14
15
  <v-textarea
15
16
  v-model="block.metadata.config.instructions"
@@ -21,6 +22,7 @@
21
22
  'windward.integrations.components.settings.external_integration.lti_consumer.instructions'
22
23
  )
23
24
  "
25
+ :disabled="render"
24
26
  ></v-textarea>
25
27
  <br />
26
28
  <v-divider class="primary"></v-divider>
@@ -35,6 +37,7 @@
35
37
  :items="launchTypes"
36
38
  item-text="name"
37
39
  item-value="value"
40
+ :disabled="render"
38
41
  ></v-select>
39
42
  {{
40
43
  $t(
@@ -50,8 +53,8 @@
50
53
  v-for="consumer in consumers"
51
54
  :key="consumer.id"
52
55
  two-line
53
- :disabled="!consumer.enabled"
54
56
  :value="consumer.id"
57
+ :disabled="render || !consumer.enabled"
55
58
  >
56
59
  <v-list-item-avatar
57
60
  :color="!consumer.enabled ? 'error' : ''"
@@ -88,7 +91,7 @@
88
91
  <script>
89
92
  import { mapGetters } from 'vuex'
90
93
  import LtiConsumer from '../../../models/ExternalIntegration/LtiConsumer'
91
- import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
94
+ import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
92
95
  import Course from '~/models/Course'
93
96
  import Organization from '~/models/Organization'
94
97
 
@@ -105,7 +105,7 @@ export default class IntegrationHelper {
105
105
  return new Driver()
106
106
  } else {
107
107
  throw new TypeError(
108
- `Could not determine assessment question driver for question type '${settings.vendor.product_code}' of id '${_vendorId}'`
108
+ `Could not determine integration driver for product code '${settings.vendor.product_code}' of id '${_vendorId}'`
109
109
  )
110
110
  }
111
111
  }
@@ -132,7 +132,7 @@ export default class IntegrationHelper {
132
132
  return settings
133
133
  } else {
134
134
  throw new TypeError(
135
- `Could not determine vendor driver for question type '${vendorModel.product_code}' of id '${_vendorId}'`
135
+ `Could not determine vendor driver for product code '${vendorModel.product_code}' of id '${_vendorId}'`
136
136
  )
137
137
  }
138
138
  }
@@ -1,6 +1,8 @@
1
1
  export default {
2
2
  key: 'Key',
3
3
  secret: 'Secret',
4
+ key_auto: 'Key (Autogenerated)',
5
+ secret_auto: 'Secret (Autogenerated)',
4
6
  parameter_name: 'Custom Parameter Name',
5
7
  value: 'Value',
6
8
  auto_key: 'Leave empty for autogenerated key',
@@ -11,4 +13,5 @@ export default {
11
13
  new_secret: 'New Secret',
12
14
  new: 'New LTI Link',
13
15
  edit: 'Edit LTI Link',
16
+ edit_display: 'Edit',
14
17
  }
@@ -1,6 +1,8 @@
1
1
  export default {
2
2
  key: 'Clave',
3
3
  secret: 'Secreto',
4
+ key_auto: 'Clave (generada automáticamente)',
5
+ secret_auto: 'Secreto (autogenerado)',
4
6
  parameter_name: 'Nombre de parámetro personalizado',
5
7
  value: 'Valor',
6
8
  auto_key: 'Dejar vacío para la clave generada automáticamente',
@@ -11,4 +13,5 @@ export default {
11
13
  new_secret: 'Nuevo secreto',
12
14
  new: 'Nuevo enlace LTI',
13
15
  edit: 'Editar enlace LTI',
16
+ edit_display: 'Editar',
14
17
  }
@@ -1,6 +1,8 @@
1
1
  export default {
2
2
  key: 'Nyckel',
3
3
  secret: 'Secret',
4
+ key_auto: 'Nyckel (autogenererad)',
5
+ secret_auto: 'Hemlighet (autogenererad)',
4
6
  parameter_name: 'Anpassat parameternamn',
5
7
  value: 'Värde',
6
8
  auto_key: 'Lämna tomt för autogenererad nyckel',
@@ -11,4 +13,5 @@ export default {
11
13
  new_secret: 'Ny hemlighet',
12
14
  new: 'Ny LTI-länk',
13
15
  edit: 'Redigera LTI-länk',
16
+ edit_display: 'Redigera',
14
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/integrations",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Windward UI Plugin Integrations for 3rd Party Systems",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://bitbucket.org/mindedge/windward-ui-plugin-integrations#readme",
23
23
  "dependencies": {
24
- "@windward/core": "^0.0.2",
24
+ "@windward/core": "^0.3.0",
25
25
  "canvas-confetti": "^1.6.0",
26
26
  "eslint": "^8.11.0",
27
27
  "laravel-echo": "^1.15.0",
@@ -153,8 +153,8 @@ import _ from 'lodash'
153
153
  import { mapGetters } from 'vuex'
154
154
  import Organization from '../../models/Organization'
155
155
  import IntegrationJobTable from '../../components/Integration/JobTable.vue'
156
- import Breadcrumbs from '~/components/Breadcrumbs.vue'
157
- import DialogBox from '~/components/DialogBox.vue'
156
+ import Breadcrumbs from '~/components/Core/Breadcrumbs.vue'
157
+ import DialogBox from '~/components/Core/DialogBox.vue'
158
158
 
159
159
  export default {
160
160
  name: 'PluginIntegrationsAdminVendorsPage',
@@ -1,48 +1 @@
1
- // TODO find better way for jest to recognize utils imports
2
- jest.mock(
3
- '~/components/Form.vue',
4
- () => {
5
- return {
6
- data() {
7
- return { validation: {} }
8
- },
9
- }
10
- },
11
- { virtual: true }
12
- )
13
-
14
- jest.mock(
15
- '~/components/Form',
16
- () => {
17
- return {
18
- data() {
19
- return { validation: {} }
20
- },
21
- }
22
- },
23
- { virtual: true }
24
- )
25
-
26
- jest.mock(
27
- '~/components/Breadcrumbs.vue',
28
- () => {
29
- return {
30
- data() {
31
- return { validation: {} }
32
- },
33
- }
34
- },
35
- { virtual: true }
36
- )
37
-
38
- jest.mock(
39
- '~/components/SearchField.vue',
40
- () => {
41
- return {
42
- props: {},
43
- computed: {},
44
- methods: {},
45
- }
46
- },
47
- { virtual: true }
48
- )
1
+ // Mock components from other repos
@@ -1,105 +1,22 @@
1
- import { Model as mockModel } from 'vue-api-query'
1
+ import { registerModels } from '@windward/core/test/__mocks__/modelMock.js'
2
2
 
3
- import axios from 'axios'
4
- jest.mock('axios')
5
- mockModel.$http = axios
6
-
7
- jest.mock('axios')
8
-
9
- // Define any new model mocks here. The imports / mocks will be auto-generated below
10
- const mockVirtualModels = [
11
- { path: '~/models/Role', resource: 'roles' },
12
- { path: '~/models/Organization', resource: 'organizations' },
13
- ]
14
-
15
- const mockModels = [
16
- { path: '../../models/Organization', resource: 'organizations' },
3
+ registerModels([
4
+ { path: '@/models/Organization', resource: 'organizations' },
17
5
  {
18
- path: '../../models/OrganizationIntegration',
6
+ path: '@/models/OrganizationIntegration',
19
7
  resource: 'organization-integrations',
20
8
  },
21
9
  {
22
- path: '../../models/CourseSectionIntegration',
10
+ path: '@/models/CourseSectionIntegration',
23
11
  resource: 'section-integrations',
24
12
  },
25
- { path: '../../models/IntegrationJob', resource: 'integration-jobs' },
26
- { path: '../../models/RemoteContent', resource: 'remote-content' },
27
- { path: '../../models/RemoteCourse', resource: 'remote-courses' },
13
+ { path: '@/models/IntegrationJob', resource: 'integration-jobs' },
14
+ { path: '@/models/RemoteContent', resource: 'remote-content' },
15
+ { path: '@/models/RemoteCourse', resource: 'remote-courses' },
28
16
  {
29
- path: '../../models/RemoteOrganization',
17
+ path: '@/models/RemoteOrganization',
30
18
  resource: 'remote-organizations',
31
19
  },
32
- { path: '../../models/Vendor', resource: 'vendors' },
33
- { path: '../../models/RemoteFile', resource: 'remote-files' },
34
- ]
35
-
36
- // DO NOT ALTER THE BELOW CODE
37
- jest.mock('', () => {
38
- return {
39
- __esModule: true,
40
- default: class Model {},
41
- }
42
- })
43
- class mockBaseModel extends mockModel {
44
- baseURL() {
45
- return 'http://windwardapi.local'
46
- }
47
-
48
- request(_config) {
49
- return new Promise((resolve) => {
50
- resolve({ data: {} })
51
- })
52
- }
53
- }
54
-
55
- jest.mock(
56
- '~/models/Model',
57
- () => {
58
- return {
59
- __esModule: true,
60
- default: class Model extends mockBaseModel {},
61
- }
62
- },
63
- { virtual: true }
64
- )
65
-
66
- for (let mockI = 0; mockI < mockVirtualModels.length; mockI++) {
67
- jest.mock(
68
- mockVirtualModels[mockI].path,
69
- () => {
70
- return {
71
- __esModule: true,
72
- default: class Model extends mockBaseModel {
73
- resource() {
74
- return (
75
- mockVirtualModels[mockI].resource ||
76
- this.constructor.name
77
- )
78
- }
79
- },
80
- }
81
- },
82
- { virtual: true }
83
- )
84
- }
85
-
86
- for (let mockJ = 0; mockJ < mockModels.length; mockJ++) {
87
- jest.mock(mockModels[mockJ].path, () => {
88
- return {
89
- __esModule: true,
90
- default: class Model extends mockBaseModel {
91
- resource() {
92
- return mockModels[mockJ].resource || this.constructor.name
93
- }
94
-
95
- integrations() {
96
- return this
97
- }
98
-
99
- get() {
100
- return []
101
- }
102
- },
103
- }
104
- })
105
- }
20
+ { path: '@/models/Vendor', resource: 'vendors' },
21
+ { path: '@/models/RemoteFile', resource: 'remote-files' },
22
+ ])