@windward/integrations 0.11.0 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### Release [0.13.0] created - 2025-04-29
4
+
5
+
6
+ ### Release [0.12.0] created - 2025-03-25
7
+
8
+
3
9
  ### Release [0.11.0] created - 2025-03-11
4
10
 
5
11
 
@@ -4,7 +4,12 @@
4
4
  <v-progress-circular size="128" indeterminate />
5
5
  </div>
6
6
  <div v-if="render">
7
- <v-form v-model="formValid" @submit.prevent>
7
+ <v-form
8
+ ref="form"
9
+ :key="updateKey"
10
+ v-model="formValid"
11
+ @submit.prevent
12
+ >
8
13
  <v-row justify="center" align="center" class="mt-5">
9
14
  <v-col cols="12">
10
15
  <v-text-field
@@ -19,12 +24,14 @@
19
24
  'windward.integrations.components.external_integration.target_url'
20
25
  )
21
26
  "
27
+ :rules="$Validation.getRule('url')"
22
28
  ></v-text-field>
23
29
  <v-text-field
24
30
  v-model="consumer.name"
25
31
  :placeholder="$t('shared.forms.name')"
26
32
  :label="$t('shared.forms.name')"
27
33
  :hint="$t('shared.forms.name')"
34
+ :rules="$Validation.getRule('exists')"
28
35
  ></v-text-field>
29
36
 
30
37
  <label for="description">{{
@@ -57,6 +64,7 @@
57
64
  (consumer.id ? 'change_key' : 'key')
58
65
  )
59
66
  "
67
+ :rules="$Validation.getRule('exists')"
60
68
  ></v-text-field>
61
69
 
62
70
  <v-text-field
@@ -75,9 +83,22 @@
75
83
  : 'secret')
76
84
  )
77
85
  "
86
+ :rules="$Validation.getRule('exists')"
78
87
  >
79
88
  </v-text-field>
80
89
 
90
+ <v-select
91
+ v-model="consumer.metadata.security_level"
92
+ :items="securityLevels"
93
+ item-text="name"
94
+ item-value="value"
95
+ :label="$t(
96
+ 'windward.integrations.components.external_integration.security_level'
97
+ )"
98
+ outlined
99
+ :rules="$Validation.getRule('exists')"
100
+ ></v-select>
101
+
81
102
  <v-data-table
82
103
  :headers="customParameterHeaders"
83
104
  :items="consumer.metadata.custom"
@@ -133,15 +154,6 @@
133
154
  </div>
134
155
  </template>
135
156
  </v-data-table>
136
- <br />
137
- <v-select
138
- v-model="consumer.metadata.security_level"
139
- :items="securityLevels"
140
- item-text="name"
141
- item-value="value"
142
- label="Security Level"
143
- outlined
144
- ></v-select>
145
157
  </v-col>
146
158
  </v-row>
147
159
  </v-form>
@@ -157,6 +169,7 @@ import Organization from '~/models/Organization'
157
169
  import Course from '~/models/Course'
158
170
  import TextEditor from '~/components/Text/TextEditor.vue'
159
171
  import FormVue from '~/components/Core/Form'
172
+ import Crypto from '~/helpers/Crypto'
160
173
 
161
174
  export default {
162
175
  name: 'ManageLti1p1ConsumerDriver',
@@ -214,6 +227,7 @@ export default {
214
227
  { name: 'Anonymous', value: 'anonymous' },
215
228
  // { name: 'Custom', value: 'custom' }, // TODO: When this is selected provide direct access to check off LTI fields
216
229
  ],
230
+ updateKey: Crypto.id(),
217
231
  }
218
232
  },
219
233
  computed: {
@@ -268,7 +282,6 @@ export default {
268
282
  new Organization({ id: this.organization.id }),
269
283
  new Course({ id: this.course.id })
270
284
  )
271
-
272
285
  try {
273
286
  consumer = await consumer.save()
274
287
  this.consumer = consumer
@@ -279,6 +292,7 @@ export default {
279
292
 
280
293
  this.$dialog.success(this.$t('shared.forms.saved'))
281
294
  this.$emit('update:consumer', consumerEvent)
295
+ this.resetConsumer()
282
296
  } catch (e) {
283
297
  this.$dialog.error(
284
298
  this.$t('windward.integrations.shared.error.save_failed')
@@ -290,6 +304,24 @@ export default {
290
304
  await this.save()
291
305
  }
292
306
  },
307
+ async onSaveAndNew() {
308
+ this.$refs.form.validate()
309
+ if (this.formValid) {
310
+ await this.save()
311
+ }
312
+ },
313
+ resetConsumer() {
314
+ const emptyConsumer = {
315
+ version: '1.1',
316
+ metadata: {
317
+ custom: [],
318
+ security_level: '',
319
+ security: [],
320
+ },
321
+ }
322
+ this.consumer = new LtiConsumer(emptyConsumer)
323
+ this.updateKey = Crypto.id()
324
+ },
293
325
  },
294
326
  }
295
327
  </script>
@@ -5,6 +5,7 @@
5
5
  action-save
6
6
  action-save-new
7
7
  @click:save="onSaved"
8
+ @click:save-new="onSaved"
8
9
  >
9
10
  <template #title>{{
10
11
  $t(
@@ -218,8 +219,14 @@ export default {
218
219
  ],
219
220
  })
220
221
  },
221
- deleteConsumer(consumer) {
222
- consumer.delete()
222
+ async deleteConsumer(consumer) {
223
+ try {
224
+ await consumer.delete()
225
+ this.loadConsumers()
226
+ } catch (error) {
227
+ this.$dialog.error(this.$t('shared.response.error'))
228
+ console.error('Error deleting consumer', error)
229
+ }
223
230
  },
224
231
  },
225
232
  }
@@ -7,6 +7,7 @@
7
7
  <v-form
8
8
  :id="formId"
9
9
  ref="form"
10
+ :key="updateKey"
10
11
  v-model="formValid"
11
12
  @submit="onFormSubmit"
12
13
  >
@@ -15,7 +16,6 @@
15
16
  <ProviderTargetPicker
16
17
  v-model="provider"
17
18
  ></ProviderTargetPicker>
18
-
19
19
  <v-text-field
20
20
  id="target-url"
21
21
  v-model="provider.target"
@@ -267,6 +267,7 @@ import FormVue from '~/components/Core/Form.vue'
267
267
  import Role from '~/models/Role'
268
268
  import Organization from '~/models/Organization'
269
269
  import Course from '~/models/Course'
270
+ import Crypto from '~/helpers/Crypto'
270
271
 
271
272
  export default {
272
273
  name: 'ManageLti1p1ProviderDriver',
@@ -301,6 +302,7 @@ export default {
301
302
  name: null,
302
303
  id: null,
303
304
  },
305
+ updateKey: Crypto.id(),
304
306
  }
305
307
  },
306
308
  async fetch() {
@@ -399,6 +401,7 @@ export default {
399
401
  version: '1.1',
400
402
  })
401
403
  }
404
+ this.updateKey = Crypto.id()
402
405
  },
403
406
  async onSave() {
404
407
  this.$refs.form.validate()
@@ -5,6 +5,7 @@
5
5
  action-save
6
6
  action-save-new
7
7
  @click:save="onSaved"
8
+ @click:save-new="onSaved"
8
9
  >
9
10
  <template #title>{{
10
11
  $t(
@@ -4,7 +4,12 @@
4
4
  <v-progress-circular size="128" indeterminate />
5
5
  </div>
6
6
  <div v-if="render">
7
- <v-form v-model="formValid" @submit.prevent>
7
+ <v-form
8
+ ref="form"
9
+ :key="updateKey"
10
+ v-model="formValid"
11
+ @submit.prevent
12
+ >
8
13
  <v-row justify="center" align="center" class="mt-5">
9
14
  <v-col cols="12">
10
15
  <v-text-field
@@ -19,12 +24,14 @@
19
24
  'windward.integrations.components.external_integration.target_url'
20
25
  )
21
26
  "
27
+ :rules="$Validation.getRule('url')"
22
28
  ></v-text-field>
23
29
  <v-text-field
24
30
  v-model="consumer.name"
25
31
  :placeholder="$t('shared.forms.name')"
26
32
  :label="$t('shared.forms.name')"
27
33
  :hint="$t('shared.forms.name')"
34
+ :rules="$Validation.getRule('exists')"
28
35
  ></v-text-field>
29
36
 
30
37
  <label for="description">{{
@@ -54,6 +61,7 @@
54
61
  'windward.integrations.components.external_integration.driver.lti1p3.tool_oidc_auth_endpoint'
55
62
  )
56
63
  "
64
+ :rules="$Validation.getRule('url')"
57
65
  ></v-text-field>
58
66
  <v-text-field
59
67
  v-model="consumer.metadata.tool_public_keyset_url"
@@ -67,8 +75,23 @@
67
75
  'windward.integrations.components.external_integration.driver.lti1p3.tool_public_keyset_url'
68
76
  )
69
77
  "
78
+ :rules="$Validation.getRule('url')"
70
79
  ></v-text-field>
71
80
 
81
+ <v-select
82
+ v-model="consumer.metadata.security_level"
83
+ :items="securityLevels"
84
+ item-text="name"
85
+ item-value="value"
86
+ :label="
87
+ $t(
88
+ 'windward.integrations.components.external_integration.security_level'
89
+ )
90
+ "
91
+ outlined
92
+ :rules="$Validation.getRule('exists')"
93
+ ></v-select>
94
+
72
95
  <v-data-table
73
96
  :headers="customParameterHeaders"
74
97
  :items="consumer.metadata.custom"
@@ -124,15 +147,6 @@
124
147
  </div>
125
148
  </template>
126
149
  </v-data-table>
127
- <br />
128
- <v-select
129
- v-model="consumer.metadata.security_level"
130
- :items="securityLevels"
131
- item-text="name"
132
- item-value="value"
133
- label="Security Level"
134
- outlined
135
- ></v-select>
136
150
  </v-col>
137
151
  </v-row>
138
152
  </v-form>
@@ -148,6 +162,7 @@ import Organization from '~/models/Organization'
148
162
  import Course from '~/models/Course'
149
163
  import TextEditor from '~/components/Text/TextEditor.vue'
150
164
  import FormVue from '~/components/Core/Form'
165
+ import Crypto from '~/helpers/Crypto'
151
166
 
152
167
  export default {
153
168
  name: 'ManageLti1p3ConsumerDriver',
@@ -205,6 +220,7 @@ export default {
205
220
  { name: 'Anonymous', value: 'anonymous' },
206
221
  // { name: 'Custom', value: 'custom' }, // TODO: When this is selected provide direct access to check off LTI fields
207
222
  ],
223
+ updateKey: Crypto.id(),
208
224
  }
209
225
  },
210
226
  computed: {
@@ -270,6 +286,7 @@ export default {
270
286
 
271
287
  this.$dialog.success(this.$t('shared.forms.saved'))
272
288
  this.$emit('update:consumer', consumerEvent)
289
+ this.resetConsumer()
273
290
  } catch (e) {
274
291
  this.$dialog.error(
275
292
  this.$t('windward.integrations.shared.error.save_failed')
@@ -281,6 +298,24 @@ export default {
281
298
  await this.save()
282
299
  }
283
300
  },
301
+ async onSaveAndNew() {
302
+ this.$refs.form.validate()
303
+ if (this.formValid) {
304
+ await this.save()
305
+ }
306
+ },
307
+ resetConsumer() {
308
+ const emptyConsumer = {
309
+ version: '1.3',
310
+ metadata: {
311
+ custom: [],
312
+ security_level: '',
313
+ security: [],
314
+ },
315
+ }
316
+ this.consumer = new LtiConsumer(emptyConsumer)
317
+ this.updateKey = Crypto.id()
318
+ },
284
319
  },
285
320
  }
286
321
  </script>
@@ -5,6 +5,7 @@
5
5
  action-save
6
6
  action-save-new
7
7
  @click:save="onSaved"
8
+ @click:save-new="onSaved"
8
9
  >
9
10
  <template #title>{{
10
11
  $t(
@@ -245,8 +246,14 @@ export default {
245
246
  ],
246
247
  })
247
248
  },
248
- deleteConsumer(consumer) {
249
- consumer.delete()
249
+ async deleteConsumer(consumer) {
250
+ try {
251
+ await consumer.delete()
252
+ await this.loadConsumers()
253
+ } catch (e) {
254
+ this.$dialog.error(this.$t('shared.response.error'))
255
+ console.error('Error deleting consumer', e)
256
+ }
250
257
  },
251
258
  },
252
259
  }
@@ -7,6 +7,7 @@
7
7
  <v-form
8
8
  :id="formId"
9
9
  ref="form"
10
+ :key="updateKey"
10
11
  v-model="formValid"
11
12
  @submit="onFormSubmit"
12
13
  >
@@ -367,6 +368,7 @@ import FormVue from '~/components/Core/Form.vue'
367
368
  import Role from '~/models/Role'
368
369
  import Organization from '~/models/Organization'
369
370
  import Course from '~/models/Course'
371
+ import Crypto from '~/helpers/Crypto'
370
372
 
371
373
  export default {
372
374
  name: 'ManageLti1p3ProviderDriver',
@@ -395,6 +397,7 @@ export default {
395
397
  name: null,
396
398
  id: null,
397
399
  },
400
+ updateKey: Crypto.id(),
398
401
  }
399
402
  },
400
403
  async fetch() {
@@ -516,6 +519,7 @@ export default {
516
519
  version: '1.3',
517
520
  })
518
521
  }
522
+ this.updateKey = Crypto.id()
519
523
  },
520
524
  async onSave() {
521
525
  this.$refs.form.validate()
@@ -5,6 +5,7 @@
5
5
  action-save
6
6
  action-save-new
7
7
  @click:save="onSaved"
8
+ @click:save-new="onSaved"
8
9
  >
9
10
  <template #title>{{
10
11
  $t(
@@ -13,7 +13,7 @@ export default {
13
13
  tool_client_id: 'Tool Client ID',
14
14
  platform_deployment_id: 'Deployment ID',
15
15
  enable_button_feedback:
16
- 'Link can only be enabled once plateform client identifier and and keyset urls are set !',
16
+ 'Link can only be enabled once platform client identifier and and keyset urls are set !',
17
17
  parameter_name: 'Custom Parameter Name',
18
18
  value: 'Value',
19
19
  new: 'New LTI Link',
@@ -13,6 +13,7 @@ export default {
13
13
  target: 'Target',
14
14
  target_url: 'Target Url',
15
15
  launch_url: 'Launch Url',
16
+ security_level: 'Security Level',
16
17
 
17
18
  send_grades: 'Send grades to host LMS',
18
19
  grade_sync: 'Grade Sync',
@@ -13,6 +13,7 @@ export default {
13
13
  target: 'Objetivo',
14
14
  target_url: 'URL de destino',
15
15
  launch_url: 'URL de inicio',
16
+ security_level: 'Nivel de Seguridad',
16
17
 
17
18
  send_grades: 'Enviar calificaciones al LMS anfitrión',
18
19
  grade_sync: 'Sincronización de calificaciones',
@@ -13,6 +13,7 @@ export default {
13
13
  target: 'Mål',
14
14
  target_url: 'Måladress',
15
15
  launch_url: 'Launch Url',
16
+ security_level: 'Säkerhetsnivå',
16
17
 
17
18
  send_grades: 'Skicka betyg till värd LMS',
18
19
  grade_sync: 'Grade Sync',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/integrations",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Windward UI Plugin Integrations for 3rd Party Systems",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
@@ -1,23 +1,30 @@
1
1
  <template>
2
- <div>
3
- <h1>
4
- {{
5
- $t(
6
- 'windward.integrations.pages.course.external_integration.title'
7
- )
8
- }}
9
- </h1>
2
+ <v-row>
3
+ <v-col cols="12">
4
+ <Breadcrumbs :items="breadcrumbPath"></Breadcrumbs>
5
+ </v-col>
6
+ <v-col cols="12">
7
+ <h1>
8
+ {{
9
+ $t(
10
+ 'windward.integrations.pages.course.external_integration.title'
11
+ )
12
+ }}
13
+ </h1>
10
14
 
11
- <ManageCourseIntegrationSettings></ManageCourseIntegrationSettings>
12
- </div>
15
+ <ManageCourseIntegrationSettings></ManageCourseIntegrationSettings>
16
+ </v-col>
17
+ </v-row>
13
18
  </template>
14
19
 
15
20
  <script>
21
+ import { mapGetters } from 'vuex'
16
22
  import ManageCourseIntegrationSettings from '../../../components/Settings/ExternalIntegration/ManageCourseIntegrationSettings.vue'
23
+ import Breadcrumbs from '~/components/Core/Breadcrumbs.vue'
17
24
 
18
25
  export default {
19
26
  name: 'PluginIntegrationsExternalIntegrationIndexPage',
20
- components: { ManageCourseIntegrationSettings },
27
+ components: { ManageCourseIntegrationSettings, Breadcrumbs },
21
28
  layout: 'authenticated',
22
29
  meta: {
23
30
  privilege: {
@@ -27,6 +34,32 @@ export default {
27
34
  },
28
35
  },
29
36
  async fetch() {},
30
- computed: {},
37
+ computed: {
38
+ ...mapGetters({
39
+ course: 'course/get',
40
+ enrollment: 'enrollment/get',
41
+ }),
42
+ breadcrumbPath() {
43
+ return [
44
+ {
45
+ href:
46
+ '/course/' +
47
+ this.course.id +
48
+ '/section/' +
49
+ this.enrollment.course_section_id,
50
+ id: '',
51
+ text: this.course.name,
52
+ },
53
+ {
54
+ href:
55
+ '/course/' + this.course.id + '/integrations/external',
56
+ id: '',
57
+ text: this.$t(
58
+ 'windward.integrations.pages.course.external_integration.title'
59
+ ),
60
+ },
61
+ ]
62
+ },
63
+ },
31
64
  }
32
65
  </script>
package/plugin.js CHANGED
@@ -2,7 +2,6 @@ import locales from './i18n'
2
2
 
3
3
  import AdminVendorsPage from './pages/admin/vendors.vue'
4
4
  import AdminImportCoursePage from './pages/admin/importCourse.vue'
5
- import ImportContentPage from './pages/course/importContent.vue'
6
5
  import ExternalIntegrationIndexPage from './pages/course/externalIntegration/index.vue'
7
6
  import LoginLtiErrorPage from './pages/login/lti/error.vue'
8
7
  import IntegrationHelper from './helpers/IntegrationHelper'
@@ -47,14 +46,6 @@ export default {
47
46
  name: 'PluginIntegrationsAdminImportCoursePage',
48
47
  template: AdminImportCoursePage,
49
48
  },
50
- {
51
- page: 'admin-integrations',
52
- path: '/course/:course/integrations/import-content',
53
- i18n: 'windward.integrations.components.navigation.integrations.import_content',
54
- name: 'PluginIntegrationsImportContentPage',
55
- template: ImportContentPage,
56
- },
57
-
58
49
  {
59
50
  page: 'admin-integrations',
60
51
  path: '/course/:course/integrations/external',
@@ -96,16 +87,6 @@ export default {
96
87
  },
97
88
  },
98
89
  },
99
- {
100
- i18n: 'windward.integrations.components.navigation.integrations.import_content',
101
- path: '/course/{course.id}/integrations/import-content',
102
- context: ['course'],
103
- permissions: {
104
- 'plugin.windward.integrations.course': {
105
- writable: true,
106
- },
107
- },
108
- },
109
90
  {
110
91
  i18n: 'windward.integrations.pages.course.external_integration.title',
111
92
  path: '/course/{course.id}/integrations/external',
@@ -117,28 +98,6 @@ export default {
117
98
  },
118
99
  },
119
100
  },
120
- /*
121
- {
122
- i18n: 'windward.integrations.components.navigation.integrations.manage_lti',
123
- path: '/admin/integrations/lti',
124
- context: ['home'],
125
- permissions: {
126
- 'plugin.windward.integrations.organization.integration': {
127
- writable: true,
128
- },
129
- },
130
- },
131
- {
132
- i18n: 'windward.integrations.components.navigation.integrations.manage_lti_links',
133
- path: '/course/{course.id}/integrations/lti',
134
- context: ['course'],
135
- permissions: {
136
- 'plugin.windward.integrations.organization.integration': {
137
- writable: true,
138
- },
139
- },
140
- },
141
- */
142
101
  ],
143
102
  },
144
103
  {
@@ -165,16 +124,6 @@ export default {
165
124
  },
166
125
  },
167
126
  },
168
- {
169
- i18n: 'windward.integrations.components.navigation.integrations.import_content',
170
- path: '/course/{course.id}/integrations/import-content',
171
- context: ['course'],
172
- permissions: {
173
- 'plugin.windward.integrations.course': {
174
- writable: true,
175
- },
176
- },
177
- },
178
127
  {
179
128
  i18n: 'windward.integrations.pages.course.external_integration.title',
180
129
  path: '/course/{course.id}/integrations/external',