-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
1071 lines (1009 loc) · 51.9 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
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<meta name="theme-color" content="#ffffff">
<title>universal patch manager</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/tablesort.css">
<link rel="stylesheet" href="css/toast.min.css">
<link rel="stylesheet" href="css/upm.css">
<link rel="stylesheet" href="css/fontawesome.css">
<link rel="stylesheet" href="css/font-logos.css">
<link rel="stylesheet" href="css/fontawesome-iconpicker.min.css">
<style>
</style>
</head>
<body>
<div class="container-fluid container-update">
<div class="page-header">
<h3><a href="" class="text-decoration-none text-reset"><i class="fas fa-cubes"></i> UPM </a><small>universal patch manager</small></h3>
</div>
<button id="button-global-settings" type="button" class="btn btn-outline-secondary btn-sm my-3 mx-4" data-toggle="modal" style="position: absolute; right: 0; top: 0;">Global Settings</button>
<div class="row mb-2">
<!-- Modal Mass Import-->
<div class="modal fade" id="modal-mass-import" tabindex="-1" role="dialog" aria-labelledby="modal-mass-import-title" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-mass-Import-title">Mass Import</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<small id="Import-Syntax" class="form-text text-muted text-monospace" style="white-space:pre">Syntax:<br/># as the first character denotes a Folder<br/>Space as First character denotes a Host or Folder inside the previously declared folder<br/>+ as the First character denotes Host. Thereby space and + is Host inside previously delcared folder<br/>Example:<br/>#Folder1<br/> #Subfolder1<br/>+Host1(in root folder)<br/> +Host2(in Folder1) </small>
<textarea class="form-control text-monospace" id='mass-import-data' rows="20"></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-mass-import-import" type="button" class="btn btn-primary">Import</button>
</div>
</div>
</div>
</div>
<!-- Modal Global settings-->
<div class="modal fade" id="modal-global-settings" tabindex="-1" role="dialog" aria-labelledby="modal-global-settings-title" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-global-settings-title">Global Settings</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" style="width: 155px;">Default Private Key</span>
</div>
<textarea id="global-ssh-private-key" class="form-control" aria-label="private key"></textarea>
</div>
<p></p>
<div class="form-row">
<div class="col">
<div class="form-group">
<label for="global-distribution-command">Default distribution command</label>
<input type="text" class="form-control" id="global-distribution-command">
</div>
</div>
<div class="col">
<div class="form-group">
<label for="global-distribution-version-command">Default distribution version command</label>
<input type="text" class="form-control" id="global-distribution-version-command">
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-group">
<label for="global-ssh-port">Default SSH port</label>
<input type="number" class="form-control" id="global-ssh-port">
</div>
</div>
<div class="col">
<div class="form-group">
<label for="global-ssh-username">Default SSH username</label>
<input type="text" class="form-control" id="global-ssh-username">
</div>
</div>
</div>
<p></p>
<h3>Distribution configuration</h3>
<div class="heightTable200">
<table id="distribution-config" class="table table-sm">
<thead>
<tr>
<th scope="col">Distribution match</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<button class="btn btn-outline-secondary" type="button" id="button-add-distribution-config">Add new</button>
<p></p>
<h3>End of Life configuration</h3>
<div class="heightTable200">
<table id="eol-config" class="table table-sm">
<thead>
<tr>
<th scope="col">Distribution match</th>
<th scope="col">End of Life</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<button class="btn btn-outline-secondary" type="button" id="button-add-eol-config">Add new</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-global-config" type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Modal Add/Edit Distribution Command-->
<div class="modal fade" id="modal-distribution-config" tabindex="-1" role="dialog" aria-labelledby="modal-distribution-configTitle" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-distribution-configTitle">Add/Edit distribution config</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>All commands have to return zero if successfull!</p>
<div class="form-group">
<label for="distri-configname">Distribution</label>
<input type="text" class="form-control" id="distri-configname" placeholder="Debian 9" aria-describedby="distri-configHelp">
<small id="distri-configHelp" class="form-text text-muted">Add version to match distributioin + version. Use wildcards like Debian 9*</small>
</div>
<div class="form-group">
<label for="distri-distriname">Distribution command</label>
<input type="text" class="form-control" id="distri-distriname" placeholder="">
</div>
<div class="form-group">
<label for="distri-version">Distribution Version command</label>
<input type="text" class="form-control" id="distri-version" placeholder="">
</div>
<div class="form-group">
<label for="distri-uptime">Uptime command</label>
<input type="text" class="form-control" id="distri-uptime" placeholder="">
</div>
<div class="form-group">
<label for="distri-restart">Reboot required command</label>
<input type="text" class="form-control" id="distri-restart" placeholder="" aria-describedby="distri-restartHelp">
<small id="distri-restartHelp" class="form-text text-muted">0 = No; 1 = Yes; 2 = -; anything else = ?</small>
</div>
<div class="form-group">
<label for="distri-update-list">Update list packages command</label>
<input type="text" class="form-control" id="distri-update-list" placeholder="">
</div>
<div class="form-group">
<label for="distri-package-info">Package info command</label>
<input type="text" class="form-control" id="distri-package-info" placeholder="">
<small class="form-text text-muted">use variable ${PackageName}</small>
</div>
<div class="form-group">
<label for="distri-package-changelog">Package changelog command</label>
<input type="text" class="form-control" id="distri-package-changelog" placeholder="">
<small class="form-text text-muted">use variable ${PackageName}</small>
</div>
<div class="form-group">
<label for="distri-update-system">Update system command</label>
<input type="text" class="form-control" id="distri-update-system" placeholder="">
</div>
<div class="form-group">
<label for="distri-update-package">Update package command</label>
<input type="text" class="form-control" id="distri-update-package" placeholder="">
<small class="form-text text-muted">use variable ${PackageName}</small>
</div>
<div class="form-group">
<label for="distri-shedule-reboot-add">Shedule reboot command</label>
<input type="text" class="form-control" id="distri-shedule-reboot-add" placeholder="">
<small class="form-text text-muted">use variable ${YYYY} ${MM} ${DD} ${hh} ${mm} for date / time</small>
</div>
<div class="form-group">
<label for="distri-shedule-reboot-get">Shedule reboot query command</label>
<input type="text" class="form-control" id="distri-shedule-reboot-get" placeholder="">
<small class="form-text text-muted">if shedule reboot exist, command must return unix timestamp when reboot is sheduled</small>
</div>
<div class="form-group">
<label for="distri-shedule-reboot-del">Shedule reboot delete command</label>
<input type="text" class="form-control" id="distri-shedule-reboot-del" placeholder="">
<small class="form-text text-muted">delete the shedule reboot of the previous command</small>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-distribution-config" type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Modal Add/Edit EOL Command-->
<div class="modal fade" id="modal-eol-config" tabindex="-1" role="dialog" aria-labelledby="modal-eol-configTitle" aria-hidden="true">
<div class="modal-dialog modal-sm modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-eol-configTitle">Add/Edit EOL config</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="distri-configname">Distribution</label>
<input type="text" class="form-control" id="eol-distri-configname" placeholder="Debian 9" aria-describedby="distri-configHelp">
<small id="distri-configHelp" class="form-text text-muted">Add version to match distributioin + version. Use wildcards like Debian 9*</small>
</div>
<label for="distri-eol">End of life (EOL) of distribution</label>
<input type="date" class="form-control" id="distri-eol" placeholder="">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-eol-config" type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Modal important updates -->
<div class="modal fade" id="modal-important-updates" tabindex="-1" role="dialog" aria-labelledby="modal-important-updates-title" aria-hidden="true">
<div class="modal-dialog modal modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-important-updates-title">Important updates</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<table id="important-updates" class="table table-sm">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Comment</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<button class="btn btn-outline-secondary" type="button" id="button-add-iu">Add new</button>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal shedule reboot -->
<div class="modal fade" id="modal-shedule-reboot" tabindex="-1" role="dialog" aria-labelledby="modal-shedule-reboot-title" aria-hidden="true">
<div class="modal-dialog modal modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-shedule-reboot-title">Shedule reboot</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<label for="datetime-shedule-reboot">Set date and time for reboot</label>
<input id="datetime-shedule-reboot" type="datetime-local" name="shedule-reboot">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-shedule-reboot" type="button" class="btn btn-primary">Shedule</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<div class="input-group input-group-sm mb-1">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Search</span>
</div>
<input id="input-searchfolder" type="search" class="form-control " placeholder="folder" aria-label="folder" aria-describedby="button-searchserver">
</div>
<div id="folderlist" class="just-padding">
</div>
<label for="input-add-server">Add new Host</label>
<div class="input-group mb-3">
<input id="input-add-server" type="text" class="form-control" placeholder="Hostname" aria-label="Hostname" aria-describedby="button-add-server">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="button-add-server">Add</button>
</div>
</div>
<label for="input-add-folder">Add new Folder</label>
<div class="input-group mb-3">
<input id="input-add-folder" type="text" class="form-control" placeholder="Name" aria-label="Name" aria-describedby="button-add-folder">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button" id="button-add-folder">Add</button>
</div>
</div>
<button class="btn btn-outline-secondary" type="button" id="button-mass-import">Add multiple hosts/folders</button>
</div>
<div class="col">
<div id="server-info" class="card" style="display: none;">
<div class="card-header">
<div class="row">
<div class="col">
<h4 class="mb-0"><span id="server-info-name"></span></h4>
</div>
<div class="col">
<div class="d-flex justify-content-end">
<button id="button-edit-server" type="button" class="btn btn-outline-primary btn-sm mx-1">Edit</button>
<div class="btn-group mx-1">
<button id="button-server-reboot-add" type="button" class="btn btn-outline-secondary btn-sm" disabled>Shedule reboot</button>
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
<button id="button-server-reboot-del" class="dropdown-item" type="button" disabled>Delete sheduled reboot</button>
</div>
</div>
<button id="button-server-imp-updates" type="button" class="btn btn-outline-secondary btn-sm mx-1">Important updates</button>
<button id="button-inventory-server" type="button" class="btn btn-outline-secondary btn-sm mx-1">Inventory</button>
<button id="button-update-server" type="button" class="btn btn-outline-secondary btn-sm mx-1">Update Host</button>
<button id="button-delete-server" type="button" class="btn btn-outline-danger btn-sm mx-1">Delete</button>
<a id="link-server" class="ml-2 pt-1" href="#"><i class="fas fa-link"></i></a>
</div>
</div>
</div>
</div>
<div class="card-body">
<p class="card-text">
<div class="row">
<div class="col">
<table id="server-info-table" class="table table-sm">
<col width="200">
<tbody>
<tr>
<th>Hostname</th>
<td id="server-info-hostname"></td>
</tr>
<tr>
<th>Distribution</th>
<td id="server-info-distribution"></td>
</tr>
<tr>
<th>last inventoried</th>
<td id="server-last-inventoried"></td>
</tr>
<tr>
<th>last updated</th>
<td id="server-last-updated"></td>
</tr>
</tbody>
</table>
</div>
<div class="col">
<table id="server-info-table2" class="table table-sm">
<col width="200">
<tbody>
<tr>
<th>Uptime</th>
<td id="server-info-uptime"></td>
</tr>
<tr>
<th>Reboot required</th>
<td id="server-info-restartrequired"></td>
</tr>
<tr>
<th>Sheduled reboot</th>
<td id="server-info-sheduled-restart"></td>
</tr>
<tr>
<th>Updates</th>
<td id="server-info-updates"></td>
</tr>
</tbody>
</table>
</div>
</div>
</p>
<div id="server-updates-container">
<h4 class="card-title">Updates
</h4>
<div class="heightTable300">
<table id="server-updates" class="table table-sm table-hover">
<thead class="thead-light">
<tr>
<th scope="col">#</th>
<th scope="col">Package</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<p></p>
<div class="row">
<div class="col">
<h4 class="card-title">Host output</h4>
</div>
<div class="col">
<div class="input-group input-group-sm mb-1 float-right">
<div class="input-group-prepend">
<label class="input-group-text" for="select-server-update-output">select history update output</label>
</div>
<select id="select-server-update-output" class="custom-select">
</select>
</div>
</div>
</div>
<textarea id="server-output" rows="10" class="form-control" style="white-space: pre; overflow: auto;" readonly></textarea>
<p></p>
</div>
</div>
<!-- Modal FullText -->
<div class="modal fade" id="modal-full-text" tabindex="-1" role="dialog" aria-labelledby="modal-full-textTitle" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-full-textTitle"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<textarea id="modal-full-text-Text" class="form-control" aria-label="changelog-text" style="height: 600px;"></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal Full Loading -->
<div class="modal fade" id="modal-full-loading" tabindex="-1" role="dialog" aria-labelledby="modal-fullloading-title" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-fullloading-title">Initialization</h5>
</div>
<div class="modal-body mx-auto">
<div class="spinner-border text-info" style="width: 3rem; height: 3rem;" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
</div>
</div>
<!-- Modal important package comment -->
<div class="modal fade" id="modal-impartant-update-comment" tabindex="-1" role="dialog" aria-labelledby="modal-impartant-update-comment-title" aria-hidden="true">
<div class="modal-dialog modal-sm modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-impartant-update-comment-title">Important update</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="col">
<label for="modal-impartant-package-name">Package</label>
<input type="text" class="form-control" id="modal-impartant-package-name" placeholder="">
</div>
<div class="col">
<label for="modal-impartant-update-comment-text">Comment</label>
<textarea id="modal-impartant-update-comment-text" rows="5" class="form-control" aria-label="comment-text"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-important-update-comment" type="button" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
<!-- Modal Server configuration -->
<div class="modal fade" id="modal-server-config" tabindex="-1" role="dialog" aria-labelledby="modal-server-configTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-server-configTitle">Host configuration</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="col">
<label for="server-config-name">Name</label>
<input type="text" class="form-control" id="server-config-name" placeholder="">
</div>
<div class="col">
<label for="server-config-hostname">Hostname</label>
<input type="text" class="form-control" id="server-config-hostname" placeholder="">
</div>
</div>
<p></p>
<div class="form-row">
<div class="col">
<label for="server-config-distri">Distribution overwrite</label>
<input type="text" class="form-control" id="server-config-distri" placeholder="">
</div>
</div>
<small class="form-text text-muted">Set the distribution manualy. This will always overwrite the detected distribution by command.</small>
<p></p>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" style="width: 155px;">Host Private Key</span>
</div>
<textarea id="server-config-privatekey" class="form-control" aria-label="private key"></textarea>
</div>
<small class="form-text text-muted">If not set the default value from global setting will be used.</small>
<p></p>
<div class="form-row">
<div class="col">
<div class="form-group">
<label for="server-config-sshport">Host SSH port</label>
<input type="number" class="form-control" id="server-config-sshport">
<small class="form-text text-muted">If not set the default value from global setting will be used.</small>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="server-config-sshusername">Host SSH username</label>
<input type="text" class="form-control" id="server-config-sshusername">
<small class="form-text text-muted">If not set the default value from global setting will be used.</small>
</div>
</div>
</div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<label class="input-group-text" for="select-move-server">Move host to</label>
</div>
<select id="select-move-server" class="custom-select">
</select>
<div class="input-group-append">
<button id="button-move-server" class="btn btn-outline-secondary" type="button">Move</button>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-server-config" type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<div id="folder-info" class="card" style="display: none;">
<div class="card-header">
<div class="row">
<div class="col">
<h4 class="mb-0"><span class="pr-2"><i id="folder-info-icon" class=""></i></span><span id="folder-info-name"></span></h4>
</div>
<div class="col">
<div class="d-flex justify-content-end">
<button id="button-edit-folder" type="button" class="btn btn-outline-primary btn-sm mx-1">Edit</button>
<button id="button-delete-folder" type="button" class="btn btn-outline-danger btn-sm mx-1">Delete</button>
<a id="link-folder" class="ml-2 pt-1" href="#"><i class="fas fa-link"></i></a>
</div>
</div>
</div>
</div>
<div class="card-body">
<div class="custom-control custom-switch float-sm-right mb-2">
<input type="checkbox" class="custom-control-input" id="switch-include-subfolders" checked>
<label class="custom-control-label" for="switch-include-subfolders">Include subfolders</label>
</div>
<table id="folder-info-table" class="table table-sm mb-0">
<thead class="">
<tr>
<th>Hosts</th>
<th>with updates</th>
<th>with bad EOL</th>
<th data-toggle="tooltip" title="with reboot required">with RR</th>
<th data-toggle="tooltip" title="with sheduled reboot">with SR</th>
</tr>
<tbody>
<tr>
<td id="folder-info-server-count"></td>
<td id="folder-info-server-w-updates"></td>
<td id="folder-info-server-bad-eol"></td>
<td id="folder-info-restartrequired"></td>
<td id="folder-info-sheduled-reboot"></td>
</tr>
</tbody>
</table>
<div class="row justify-content-between mb-2">
<div class="col-8 ml-auto pr-0 mr-3">
<div class="d-flex justify-content-end">
<button id="button-serverlist-select-all" type="button" class="btn btn-outline-secondary btn-sm">Select all</button>
<button id="button-serverlist-unselect-all" type="button" class="btn btn-outline-secondary btn-sm mx-2">Unselect all</button>
<div class="btn-group">
<button id="button-all-server-reboot-add" type="button" class="btn btn-outline-secondary btn-sm">Shedule reboot</button>
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
<button id="button-all-server-reboot-del" class="dropdown-item" type="button">Delete sheduled reboot</button>
</div>
</div>
<button id="button-inventory-all-server" type="button" class="btn btn-outline-secondary btn-sm mx-2">Inventory All</button>
<button id="button-update-all-server" type="button" class="btn btn-outline-secondary btn-sm">Update All</button>
</div>
</div>
</div>
<div id="div-command-progress" class="progress mb-2">
<div id="command-progress" class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
<div id="command-progressError" class="progress-bar bg-danger" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="row">
<div class="col-2">
<div class="input-group input-group-sm mb-1">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Filter</span>
</div>
<input id="input-searchserver-list" type="search" class="form-control form-control-sm" placeholder="host" aria-label="host">
</div>
</div>
<div class="col-6 ml-auto pr-0 mr-3">
<div class="d-flex justify-content-end">
<div class="custom-control custom-switch mx-2">
<input type="checkbox" class="custom-control-input" id="switch-show-update-packages">
<label class="custom-control-label" for="switch-show-update-packages">Show update packages list</label>
</div>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="switch-show-full-output">
<label class="custom-control-label" for="switch-show-full-output">Show full output</label>
</div>
</div>
</div>
</div>
<table id="folder-server-list" class="table table-sm table-hover table-bordered">
<thead class="thead-light">
<tr>
<th scope="col">#</th>
<th scope="col">Sel</th>
<th scope="col">Host</th>
<th scope="col" class="updates">Upd</th>
<th scope="col" class="update_list">Updates</th>
<th scope="col" class="sys" data-toggle="tooltip" title="distribution">SYS</th>
<th scope="col" class="eol" data-toggle="tooltip" title="end of life">EOL</th>
<th scope="col" class="rr" data-toggle="tooltip" title="reboot required">RR</th>
<th scope="col" class="sr" data-toggle="tooltip" title="sheduled reboot">SR</th>
<th scope="col">Inventory</th>
<th scope="col">Update</th>
<th scope="col" class="output">Output</th>
<th scope="col" class="output-full">Output</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<!-- Modal folder configuration -->
<div class="modal fade" id="modal-folder-config" tabindex="-1" role="dialog" aria-labelledby="modal-folder-configTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal-folder-configTitle">Folder configuration</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="col">
<label for="folder-config-name">Name</label>
<input type="text" class="form-control" id="folder-config-name" placeholder="">
</div>
</div>
<p></p>
<div class="form-group">
<label>Icon</label>
<div class="input-group iconpicker-container">
<div class="input-group-prepend">
<span class="input-group-text"><i id="folder-IconPickerPreview" class="fas fa-archive"></i></span>
</div>
<input id="folder-IconPicker" data-placement="bottomLeft" class="form-control icp iconpicker-element iconpicker-input" value="fas fa-archive" type="text">
</div>
</div>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" style="width: 155px;">Host Private Key</span>
</div>
<textarea id="folder-config-privatekey" class="form-control" aria-label="private key"></textarea>
</div>
<small class="form-text text-muted">If not set the default value from global setting will be used.</small>
<p></p>
<div class="form-row">
<div class="col">
<div class="form-group">
<label for="folder-config-sshport">Host SSH port</label>
<input type="number" class="form-control" id="folder-config-sshport">
<small class="form-text text-muted">If not set the default value from global setting will be used.</small>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="folder-config-sshusername">Host SSH username</label>
<input type="text" class="form-control" id="folder-config-sshusername">
<small class="form-text text-muted">If not set the default value from global setting will be used.</small>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="select-move-folder">Move folder to</label>
</div>
<select id="select-move-folder" class="custom-select" id="select-move-folder">
</select>
<div class="input-group-append">
<button id="button-moveFolder" class="btn btn-outline-secondary" type="button">Move</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="button-save-folder-config" type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- container -->
<div class="page-footer container text-center">
<span class="font-weight-light text-monospace text-muted">UPM version 0.1.2</span>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/toast.min.js"></script>
<script src='js/tablesort.min.js'></script>
<script src='js/tablesort.number.min.js'></script>
<script src='js/tablesort.date.min.js'></script>
<script src="js/fontawesome-all.js"></script>
<script src="js/fontawesome-iconpicker.min.js"></script>
<script src='js/cache.js'></script>
<script src='js/upm.folder.js'></script>
<script src='js/upm.server.js'></script>
<script src='js/upm.backend.js'></script>
<script src='js/upm.frontend.js'></script>
<script type="text/javascript">
var upm;
var sT, eT;
function start() { sT = new Date(); }
function end(s) { eT = new Date(); var tD = eT - sT; console.log(s + ' ' + tD + " ms"); }
$( document ).ready(function() {
start();
$('#folder-IconPicker').iconpicker();
$('.iconpicker-popover.popover').removeClass('fade'); // https://github.com/itsjavi/fontawesome-iconpicker/issues/34#issuecomment-443839776
new Tablesort(document.getElementById('folder-server-list'), {descending: true});
upm = new UPMFrontend(UPMInitFinishedCallback);
upm.loadData();
});
var UPMInitFinishedCallback = function() {
const myURL = new URL(window.location.href);
if( myURL.searchParams.get('folder_id') != null) {
upm.folderListSelectFolder( parseInt(myURL.searchParams.get('folder_id')) );
}
if( myURL.searchParams.get('server_id') != null) {
if( !upm.showSingleServer( parseInt(myURL.searchParams.get('server_id')) ) ) {
upm.folderListSelectFolder( 0 );
}
}
if( upm.currentView == undefined ) {
upm.folderListSelectFolder( 0 );
}
$('[data-toggle="tooltip"]').tooltip();
end("UPM init finished in");
}
$('.icp').on('iconpickerSelected', function (e) {
$('#folder-IconPickerPreview').removeClass();
$('#folder-IconPickerPreview').addClass(e.iconpickerInstance.options.iconBaseClass + ' ' + e.iconpickerInstance.options.fullClassFormatter(e.iconpickerValue));
});
$( "#button-add-server" ).click(function( e ) {
var server_name = $("#input-add-server").val();
upm.addServer( server_name );
});
$( "#button-add-folder" ).click(function( e ) {
var folder_name = $("#input-add-folder").val();
upm.addFolder( folder_name );
});
$( "#button-mass-import" ).click(function( e ) {
$('#modal-mass-import').modal('show');
});
$( "#button-mass-import-import" ).click(function( e ) {
var ImportData = $("#mass-import-data").val();
upm.massImport( ImportData );
$('#modal-mass-import').modal('hide');
});
$( "#button-delete-server" ).click(function( e ) {
var server_id = $( '#server-info-name' ).attr("data-serverid");
upm.deleteServer( server_id );
});
$( "#button-delete-folder" ).click(function( e ) {
var folder_id = Number($( '#folder-info-name' ).attr("data-folderid"));
upm.deleteFolder( folder_id );
});
$( "#button-move-server" ).click(function( e ) {
var server_id = Number($( '#server-info-name' ).attr("data-serverid"));
var folder_id = Number($( '#select-move-server option:selected').attr("data-folderid"));
upm.moveServer( server_id, folder_id );
});
$( "#button-moveFolder" ).click(function( e ) {
var folder_id = Number($( '#folder-info-name' ).attr("data-folderid"));
var parent_id = Number($( '#select-move-folder option:selected').attr("data-folderid"));
upm.moveFolder(folder_id, parent_id);
});
$( "#button-inventory-server" ).click(function( e ) {
var server_id = $( '#server-info-name' ).attr("data-serverid");
upm.inventoryServer( server_id );
});
$( "#select-server-update-output" ).change(function( e ) {
var server_update_output_id = Number($( '#select-server-update-output' ).val());
if( server_update_output_id >= 0 )
upm.getUpdateOutput( server_update_output_id );
});
$( "#button-save-global-config" ).click(function( e ) {
upm.saveGlobalConfig();
});
$( "#button-add-distribution-config" ).click(function( e ) {
upm.showAddDistributionConfig();
});
$( "#button-add-eol-config" ).click(function( e ) {
upm.showEOLConfig();
});
$( "#button-server-imp-updates" ).click(function( e ) {
upm.showImpUpdates();
});
$( "#button-server-reboot-add" ).click(function( e ) {
upm.showSheduleReboot();
});
$( "#button-save-shedule-reboot" ).click(function( e ) {
upm.setSheduleReboot();
});
$( "#button-server-reboot-del" ).click(function( e ) {
upm.deleteSheduleReboot();
});
$( "#button-edit-server" ).click(function( e ) {
var server_id = $( '#server-info-name' ).attr("data-serverid");
upm.showServerEdit(server_id);
});
$('#button-save-server-config' ).click(function( e ) {
upm.saveServerConfig();
});
$( "#button-edit-folder" ).click(function( e ) {
upm.editFolderConfig();
});
$('#button-save-folder-config' ).click(function( e ) {
upm.saveFolderConfig();
});
$( "#button-global-settings" ).click(function( e ) {
upm.showGlobalConfig();
});
$( "#button-save-distribution-config").click(function( e ) {
upm.saveDistributionConfig();
});
$( "#button-save-eol-config").click(function( e ) {
upm.saveEOLConfig();
});
$('#distribution-config').on("click", ".btn-delete-distribution", function( e ) {
var config_id = $( this ).attr("data-configid");
upm.deleteDistributionConfig(config_id);
});
$('#distribution-config').on("click", ".btn-edit-distribution", function( e ) {
var config_id = $( this ).attr("data-configid");
upm.showDistributionConfig(config_id);
});
$('#eol-config').on("click", ".btn-delete-eol", function( e ) {
var eol_id = $( this ).attr("data-eolid");
upm.deleteEOLConfig( eol_id );
});
$('#eol-config').on("click", ".btn-edit-eol", function( e ) {
var eol_id = $( this ).attr("data-eolid");
upm.showEOLConfigEdit(eol_id);
});
$('#important-updates').on("click", ".btn-iu-edit", function( e ) {
var iu_id = $( this ).attr("data-iu_id");
var server_id = $( this ).attr("data-server_id");
upm.editImportantUpdate(server_id, iu_id);
});
$('#important-updates').on("click", ".btn-iu-delete", function( e ) {
var iu_id = $( this ).attr("data-iu_id");
var server_id = $( this ).attr("data-server_id");
upm.deleteImportantUpdate(server_id, iu_id);
});
$('#button-add-iu' ).click(function( e ) {
var server_id = $( this ).attr("data-server_id");
upm.showAddImportantUpdate(server_id);
});
$('#server-updates').on("click", ".btn-changelog-package", function( e ) {
var update_id = $( this ).attr("data-update_id");
upm.showPackageChangelog(update_id, $( this ).attr('id'));
});
$('#server-updates').on("click", ".btn-info-package", function( e ) {
var update_id = $( this ).attr("data-update_id");
upm.showPackageInfo(update_id, $(this).attr('id'));
});
$('#server-updates').on("click", ".btn-update-package", function( e ) {
var update_id = $( this ).attr("data-update_id");
var server_id = $( this ).attr("data-server_id");
upm.updatePackage(server_id, update_id, $(this).attr('id'));
});
$('#server-updates').on("click", ".btn-update-mark-iu", function( e ) {
var server_id = $( this ).attr("data-server_id");
var update_id = $( this ).attr("data-update_id");
upm.updateMarkImportant(server_id, update_id);
});
$( "#button-save-important-update-comment").click(function( e ) {
upm.saveImportantUpdate();
});
$('#server-updates').on("click", ".btn-update-unmark-iu", function( e ) {
var iu_id = $( this ).attr("data-iu_id");
var server_id = $( this ).attr("data-server_id");
upm.deleteImportantUpdate(server_id, iu_id);
});
$( "#button-update-server").click(function( e ) {
upm.updateServer();
});
$('#switch-include-subfolders').click(function( e ) {
var folder_id = Number($('#folder-info-name').attr("data-folderid"));
upm.showSingleFolder( folder_id );
});
$('#switch-show-update-packages').click(function( e ) {
upm.setServerListColumns();
});
$('#switch-show-full-output').click(function( e ) {
upm.setServerListColumns();
if( $('#switch-show-full-output').is(':checked') ) {
$('#switch-show-update-packages').prop('disabled', true);
upm.scrollSeverListOutput();