Bugzilla – Attachment 150030 Details for
Bug 32474
Implement infinite scroll in vue-select
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Data creation script
bug_32474_data.js (text/javascript), 1.51 KB, created by
Matt Blenkinsop
on 2023-04-21 10:50:27 UTC
(
hide
)
Description:
Data creation script
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-04-21 10:50:27 UTC
Size:
1.51 KB
patch
obsolete
>// BASIC AUTH MUST BE ENABLED >const url = 'http://localhost:8081/api/v1/' > >const generateTitle = (length) => { > let result = ''; > const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; > const charactersLength = characters.length; > let counter = 0; > while (counter < length) { > result += characters.charAt(Math.floor(Math.random() * charactersLength)); > counter += 1; > } > return result; >} > >const createLicenses = async (del, numberOfLicenses) => { > const requestType = del ? 'DELETE' : 'POST' > > for( let i = 1; i <= numberOfLicenses; i++){ > const name = generateTitle(8) > const data = del ? {} : { > name, > type: 'Local', > status: 'Active' > } > const requestParams = del ? `erm/licenses/${i}` : 'erm/licenses' > try { > const request = await fetch(url + requestParams, { > method: requestType, > body: JSON.stringify(data), > headers: { > 'Content-Type': 'application/json', > 'Authorization': 'Basic ' + btoa('koha:koha') > } > }) > if(requestType === 'POST') { > const response = await request.json() > console.log(response) > } > if(requestType === 'DELETE') { > console.log(`License ${i} deleted`) > } > } catch (error) { > console.log('Error: ' + error.message) > } > } >} > >createLicenses(null, 100)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 32474
:
144614
|
144719
|
144720
|
145143
|
145144
|
145154
| 150030 |
150031
|
150282
|
150283
|
150284
|
150287
|
150305
|
150308
|
150309
|
153110
|
153111
|
153112
|
153113
|
154094
|
156410
|
156470
|
156471
|
156472
|
156473
|
156474
|
156475
|
156476
|
156477
|
156478
|
156479
|
156481
|
156482
|
156483
|
156504
|
156505
|
159327
|
159328
|
159329
|
159330
|
159340
|
159343
|
159386
|
159389
|
159395
|
159397
|
159398
|
159399
|
159400
|
159401
|
159402
|
159403
|
159404
|
159405
|
159406
|
159407
|
161724