-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
464 lines (450 loc) · 28.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>RSWebSync</title>
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description"
content="SQL Server Reporting Service Web Sync for Bulk Download and Upload between local PC folder & files and SSRS" />
<link rel="icon" href="./favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q3E01YDW7H"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-Q3E01YDW7H');
</script>
</head>
<body style="background-color: gainsboro;">
<script src="./main.js"></script>
<nav class="navbar sticky-top navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
<a class="navbar-brand text-primary" href="#"><i class="fas fa-copy text-danger"></i> <i
class="fas fa-sync text-success"></i> <i class="fas fa-server text-info"></i>
<strong>RSWebSync</strong></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<ul class="nav nav-pills mr-auto" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="download" data-toggle="pill" href="#pills-index" role="tab"
aria-selected="true" aria-controls="pills-index"
data-bind="click: function() { window.vm.setMode('download'); }"><i class="fas fa-download"></i>
Download</a>
</li>
<li class="nav-item">
<a class="nav-link" id="upload" data-toggle="pill" href="#pills-index" role="tab"
aria-controls="pills-index" aria-selected="false"
data-bind="click: function() { window.vm.setMode('upload'); }"><i class="fas fa-upload"></i>
Upload</a>
</li>
<li class="nav-item">
<a class="nav-link" id="about" data-toggle="pill" href="#pills-about" role="tab"
aria-controls="pills-index" aria-selected="false"
data-bind="click: function() { window.vm.setMode('about'); }"><i class="fas fa-info-circle"></i>
About</a>
</li>
</ul>
<span class="navbar-text text-primary" data-toggle="modal" data-target="#configModal" role="button"
data-bind="visible: mode() != 'about'">
<i class="fas fa-user"></i> <span
data-bind="text: user().DisplayName || user().Username, attr: { title: user().Username }"></span>
</span>
<span class="navbar-text text-primary" data-bind="visible: mode() == 'about'">
<a href="https://github.com/NeetoSoft/RSWebSync">Fork me on <i class="fab fa-github"></i> GitHub</a>
</span>
</div>
</nav>
<div class="container-fluid body-content">
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane show active" id="pills-index" role="tabpanel" aria-labelledby="pills-home-tab">
<div class="row pt-3">
<div class="col-md-12 input-group mb-3">
<input type="text" class="form-control" data-bind="textInput: url"
placeholder="Drop or type SSRS Web Portal URL or its subfolder here" />
<div class="input-group-append">
<button class="btn btn-primary" data-bind="click: loadRemotes"><i class="fas fa-sync"></i>
Load</button>
<button class="btn btn-warning" data-bind="click: clear"><i class="fas fa-times"></i>
Clear</button>
</div>
</div>
</div>
<div class="row pb-3" data-bind="visible: mode() == 'upload'">
<div class="col-md-12">
<div id="dropzone" class="dropzone" title="nguik nguik">
<div class="dz-message" data-dz-message>
To upload => drop a folder here OR click here and drop / select a folder from the dialog
</div>
</div>
</div>
</div>
<form>
<div class="form-group row">
<label for="syncRoot" class="col-md-1 col-form-label text-primary">Sync Root</label>
<div class="col-md-11">
<input class="form-control" id="syncRoot" readonly
data-bind="textInput: !syncRoot() ? '' : syncRoot().getPath().replace('//', '/')" />
</div>
</div>
</form>
<div class="row pb-3">
<div class="col-md-6">
<div class="card">
<div class="h6 card-header bg-primary text-light withBtnXs">
<div class="d-flex justify-content-between">
<span> <i class="fas fa-sign-out-alt"></i> Source
</span>
<span> </span>
<div class="form-inline">
<button class="btn btn-xs btn-light mr-2" data-bind="click: selectErrorOnly"><i
class="fas fa-check-square"></i>
Select Error Only</button>
<input type="text" class="mr-2"
data-bind="textInput: zipFileName, visible: mode() != 'upload'"
placeholder="Drop or type the zip file name here" />
<button class="btn btn-xs btn-light"
data-bind="click: run, visible: mode() != 'upload'"><i
class=" fas fa-download"></i>
Download</button>
<div class="form-check-inline" data-bind="visible: mode() == 'upload'">
<input class="form-check-input" type="checkbox" id="sendSyncRoot"
data-bind="checked: sendSyncRoot" />
<label class="form-check-label" for="sendSyncRoot">
Send Sync Root
</label>
</div>
</div>
</div>
</div>
<div class="card-body">
<table id="srcTree"
class="table table-striped table-bordered table-hover table-sm w-100">
<colgroup>
<col width="30px">
</col>
<col width="*">
</col>
<col width="50px">
</col>
<col width="30px">
</col>
</colgroup>
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Size</th>
<th>Status</th>
</tr>
</thead>
<!-- Optionally define a row that serves as template, when new nodes are created: -->
<tbody>
<tr>
<td></td>
<td class="dz-filename"></td>
<td class="dz-size"></td>
<td class="dz-status"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-6" data-bind="visible: mode() == 'upload'">
<div class="card">
<div class="h6 card-header bg-primary text-light withBtnXs">
<div class="d-flex justify-content-between">
<span><i class="fas fa-sign-in-alt"></i> Destination</span>
<span> </span>
<button class="btn btn-xs btn-light" data-bind="click: run"><i
class="fas fa-upload"></i>
Upload</button>
</div>
</div>
<div class="card-body">
<table id="destTree"
class="table table-striped table-bordered table-hover table-sm w-100">
<colgroup>
<col width="30px">
</col>
<col width="*">
</col>
</colgroup>
<thead>
<tr>
<th></th>
<th>Name</th>
</tr>
</thead>
<!-- Optionally define a row that serves as template, when new nodes are created: -->
<tbody>
<tr>
<td></td>
<td class="dz-filename"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="previews" class="row d-none dropzone-previews"></div>
</div>
<div class="tab-pane" id="pills-about" role="tabpanel" aria-labelledby="about">
<div class="row pt-3">
<div class="col-md-12">
<div class="card">
<div class="h6 card-header bg-primary text-light">
<span> <i class="fas fa-info-circle"></i> About RSWebSync
</span>
</div>
<div class="card-body">
<h1 class="code-line" data-line-start=0 data-line-end=1><a
id="RSWebSync_0"></a>RSWebSync <img
src="https://travis-ci.com/neetosoft/RSWebSync.svg?branch=main"
alt="Travis CI Status" /></h1>
<h2 class="code-line" data-line-start=1 data-line-end=2><a
id="Reporting_Service_Web_Sync_for_Bulk_Download_and_Upload_1"></a>Reporting
Service Web
Sync for Bulk Download and Upload</h2>
<p class="has-line-data" data-line-start="2" data-line-end="3">
<strong>RSWebSync</strong> is a
web tool to enable bulk download and upload of <strong>Microsoft SQL Server
Reporting
Service (SSRS)</strong> items. This is a particularly annoying pet peeve of mine
for
SSRS when working on a project with a lot of reports to be updated. This tool
depends on the
SSRS REST API, which means that it will be compatible with SSRS 2016 and above only.
</p>
<h2 class="code-line" data-line-start=3 data-line-end=4><a id="Features_3"></a>Features
</h2>
<ul>
<li class="has-line-data" data-line-start="4" data-line-end="5">Bulk download from
SSRS to
local folder</li>
<li class="has-line-data" data-line-start="5" data-line-end="7">Bulk upload from
local to
SSRS folder</li>
</ul>
<hr>
<h2 class="code-line" data-line-start=8 data-line-end=9><a id="Download_8"></a>Download
</h2>
<p class="has-line-data" data-line-start="9" data-line-end="10">The main workflow to be
done
when downloading:</p>
<ul>
<li class="has-line-data" data-line-start="10" data-line-end="11">Enter the
<strong>[URL]</strong> in the provided textbox and click
<strong>[Load]</strong>.
</li>
<li class="has-line-data" data-line-start="11" data-line-end="12">The top right
corner
<strong>[User]</strong> will be updated with the current user.
</li>
<li class="has-line-data" data-line-start="12" data-line-end="13">The
<strong>[Source]</strong> tree will be populated with the list of folders and
items
under the <strong>[URL]</strong>.
</li>
<li class="has-line-data" data-line-start="13" data-line-end="14">Select the items
to be
downloaded on the <strong>[Source]</strong> tree.</li>
<li class="has-line-data" data-line-start="14" data-line-end="15">The <strong>[Sync
Root]</strong> textbox will be updated and marked in red on the
<strong>[Source]</strong> tree.
</li>
<li class="has-line-data" data-line-start="15" data-line-end="16">Enter the
<strong>[Zip
File Name]</strong> in the provided textbox and click
<strong>[Download]</strong>.
</li>
<li class="has-line-data" data-line-start="16" data-line-end="17">Click
<strong>[Select
Error Only]</strong> if there is any error and click
<strong>[Download]</strong> to
redo for the errors.
</li>
<li class="has-line-data" data-line-start="17" data-line-end="19">Click
<strong>[Clear]</strong> to go back to the initial state.
</li>
</ul>
<hr>
<h2 class="code-line" data-line-start=20 data-line-end=21><a id="Upload_20"></a>Upload
</h2>
<p class="has-line-data" data-line-start="21" data-line-end="22">The main workflow to be
done
when uploading:</p>
<ul>
<li class="has-line-data" data-line-start="22" data-line-end="23">Enter the
<strong>[URL]</strong> in the provided textbox and click
<strong>[Load]</strong>.
</li>
<li class="has-line-data" data-line-start="23" data-line-end="24">The top right
corner
<strong>[User]</strong> will be updated with the current user.
</li>
<li class="has-line-data" data-line-start="24" data-line-end="25">The
<strong>[Destination]</strong> tree will be populated with the list of folders
under the
<strong>[URL]</strong>.
</li>
<li class="has-line-data" data-line-start="25" data-line-end="26">Drop or select the
folder
to be uploaded on the <strong>[Dropzone]</strong> box.</li>
<li class="has-line-data" data-line-start="26" data-line-end="27">The
<strong>[Source]</strong> tree will be populated with the list of folders and
items
under the <strong>[Dropzone]</strong> folder.
</li>
<li class="has-line-data" data-line-start="27" data-line-end="28">Select the items
to be
uploaded on the <strong>[Source]</strong> tree.</li>
<li class="has-line-data" data-line-start="28" data-line-end="29">The <strong>[Sync
Root]</strong> textbox will be updated and marked in red on the
<strong>[Source]</strong> tree.
</li>
<li class="has-line-data" data-line-start="29" data-line-end="30">Toggle
<strong>[Send Sync
Root]</strong> to include or exclude the <strong>[Sync Root]</strong> folder
from
the upload.
</li>
<li class="has-line-data" data-line-start="30" data-line-end="31">Select the folder
to be
uploaded to on the <strong>[Destination]</strong> tree and click
<strong>[Upload]</strong>.
</li>
<li class="has-line-data" data-line-start="31" data-line-end="32">Click
<strong>[Select
Error Only]</strong> if there is any error and click
<strong>[Upload]</strong> to
redo for the errors.
</li>
<li class="has-line-data" data-line-start="32" data-line-end="34">Click
<strong>[Clear]</strong> to go back to the initial state.
</li>
</ul>
<hr>
<p class="has-line-data" data-line-start="35" data-line-end="37">
<strong>NOTE</strong><br>
The <strong>[Dropzone]</strong> folder selection will only work correctly the first
time.
</p>
<p class="has-line-data" data-line-start="38" data-line-end="39">Make sure to either
click
<strong>[Clear]</strong> or the <strong>[Upload]</strong> link, or just refresh the
page
before using the <strong>[Dropzone]</strong> again.
</p>
<hr>
<h2 class="code-line" data-line-start=41 data-line-end=42><a
id="Authentication_41"></a>Authentication</h2>
<p class="has-line-data" data-line-start="42" data-line-end="43">Ahh yes, we’ve been
expecting
this. You’ll have to be authenticated before you can use this. There are a few ways
we can
do this, and the choice is yours:</p>
<ol>
<li class="has-line-data" data-line-start="43" data-line-end="44">Update the SSRS
settings
in SSMS / Reporting Services / Properties / Advanced / User-defined:</li>
</ol>
<ul>
<li class="has-line-data" data-line-start="44" data-line-end="45">Set
AccessControlAllowCredential to True.</li>
<li class="has-line-data" data-line-start="45" data-line-end="46">Set
AccessControlAllowOrigin to this page/site origin.</li>
<li class="has-line-data" data-line-start="46" data-line-end="47">You might need to
restart
your reporting service afterward.</li>
</ul>
<ol start="2">
<li class="has-line-data" data-line-start="47" data-line-end="48">Download and host
it
locally on the same server as SSRS.</li>
<li class="has-line-data" data-line-start="48" data-line-end="49">Download and host
it on
another server in the local network and do option 1 for the host server.</li>
<li class="has-line-data" data-line-start="49" data-line-end="50">For the security
conscious, clone the repo and run npm install, audit, then build and do option 2
or 3.
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<hr />
<footer>
<p>
© 2021 - RSWebSync by
<a href="mailto:NeetoSoft@gmail.com">NeetoSoft@gmail.com</a>
</p>
</footer>
</div>
<!-- Modal -->
<div class="modal" id="configModal" tabindex="-1" role="dialog" aria-labelledby="configTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header bg-primary">
<h5 class="modal-title text-light" id="configTitle">SSRS REST API Configuration</h5>
<button type="button" class="close text-light" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group row">
<label for="accessToken" class="col-sm-3 col-form-label">Access Token</label>
<div class="col-sm-9">
<input class="form-control" id="accessToken" placeholder="Access Token"
data-bind="textInput: config().accessToken">
</div>
</div>
<div class="form-group row">
<label for="apiKey" class="col-sm-3 col-form-label">API Key</label>
<div class="col-sm-9">
<input class="form-control" id="apiKey" placeholder="API Key"
data-bind="textInput: config().apiKey">
</div>
</div>
<div class="form-group row">
<label for="userName" class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input class="form-control" id="username" placeholder="Username"
data-bind="textInput: config().username">
</div>
</div>
<div class="form-group row">
<label for="password" class="col-sm-3 col-form-label">Password</label>
<div class="col-sm-9">
<input class="form-control" type="password" id="password" placeholder="Password"
data-bind="textInput: config().password">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script type="text/html" id="statusInProgress">
<span><i class="fas fa-spinner fa-spin"></i></span>
</script>
<script type="text/html" id="statusSuccess">
<span class="text-success"><i class="fas fa-check"></i></span>
</script>
<script type="text/html" id="statusError">
<span class="text-danger"><i class="fas fa-times"></i></span>
</script>
</body>
</html>