forked from cloud-barista/cb-mapui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2071 lines (1797 loc) · 97.2 KB
/
Copy pathindex.html
File metadata and controls
2071 lines (1797 loc) · 97.2 KB
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
<!--
Copyright 2019 The Cloud-Barista Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
----
Copyright for OpenLayers (https://openlayers.org/)
BSD 2-Clause License
Copyright 2005-present, OpenLayers Contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CB-MapUI: Map Dashboard for Cloud-Barista</title>
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<!-- Note: Polyfill removed as modern browsers (Chrome 24+, Firefox 23+, Safari 6.1+, Edge 12+)
natively support requestAnimationFrame, Element.prototype.classList, and URL -->
<!-- Uncomment below if legacy browser support is required -->
<!--
<script src="https://polyfill.io/v3/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
-->
<!-- Bootstrap CSS and JS (with Popper.js for popovers and tooltips) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"
integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+"
crossorigin="anonymous"></script>
<!-- json-formatter-js -->
<script src="https://cdn.jsdelivr.net/npm/json-formatter-js@2.3.4/dist/json-formatter.umd.min.js"></script>
<!-- datatables -->
<link rel="stylesheet" href="https://cdn.datatables.net/2.0.8/css/dataTables.dataTables.css" />
<script src="https://cdn.datatables.net/2.0.8/js/dataTables.js"></script>
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>
.map {
width: 100%;
height: 100vh;
min-width: 400px;
min-height: 300px;
box-sizing: border-box;
cursor: crosshair;
}
/* Legend item styles */
.legend-item {
cursor: pointer;
user-select: none;
}
.legend-item:hover {
background: rgba(0, 123, 255, 0.2) !important;
transform: scale(1.05);
}
.legend-item.active {
opacity: 1 !important;
background: rgba(0, 123, 255, 0.1);
}
.legend-item.inactive {
opacity: 0.4;
background: transparent;
}
/* Mouse tooltip */
.mouse-tooltip {
position: absolute;
background: rgba(255, 255, 255, 0.95);
color: #333;
padding: 2px 5px;
border-radius: 3px;
font-size: 15px;
font-weight: 500;
pointer-events: none;
z-index: 10000;
display: none;
transform: translate(-50%, 100%);
margin-top: 2px;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.mouse-tooltip::before {
content: '';
position: absolute;
top: -3px;
left: 50%;
transform: translateX(-50%);
border-left: 3px solid transparent;
border-right: 3px solid transparent;
border-bottom: 3px solid rgba(255, 255, 255, 0.95);
}
/* Spin animation for refresh indicator */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
body {
/* transform: scale(0.8);
transform-origin: 0 0;
width: 125%; */
margin: 0;
padding: 0;
overflow: hidden;
}
.container-fluid {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}
.row {
margin: 0;
height: 100vh;
overflow: hidden;
}
.scrollable-column {
height: 100vh;
overflow-y: auto;
width: 385px;
min-width: 385px;
max-width: 385px;
flex: 0 0 385px;
box-sizing: border-box;
padding: 0;
}
/* Fixed left panel layout */
.col-md-3 {
flex: 0 0 385px !important;
max-width: 385px !important;
min-width: 385px !important;
padding: 0 !important;
margin: 0 !important;
}
.col-md-9 {
flex: 1 !important;
max-width: calc(100vw - 385px) !important;
width: calc(100vw - 385px) !important;
padding: 0 !important;
margin: 0 !important;
height: 100vh;
overflow: hidden;
}
/* Left panel hidden state */
body.left-panel-hidden .col-md-3 {
display: none !important;
}
body.left-panel-hidden .col-md-9 {
max-width: 100vw !important;
width: 100vw !important;
}
/* Left panel hide/show toggle button */
#leftPanelToggle {
position: fixed;
top: 50%;
left: 385px;
transform: translateY(-50%);
z-index: 1050; /* above map controls (1000), below swal2 popups (1060) */
width: 16px;
height: 56px;
padding: 0;
border: 1px solid rgba(0, 0, 0, 0.15);
border-left: none;
border-radius: 0 8px 8px 0;
background: rgba(255, 255, 255, 0.95);
color: #6c757d;
font-size: 10px;
cursor: pointer;
box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
}
#leftPanelToggle:hover {
background: #e9ecef;
color: #212529;
}
body.left-panel-hidden #leftPanelToggle {
left: 0;
}
/* Hide the toggle while a SweetAlert2 popup is open (swal2-shown is added to
body/html) so it never renders over the dialog, regardless of z-index. */
body.swal2-shown #leftPanelToggle {
display: none;
}
/* Remove Bootstrap default margins and paddings */
.container-fluid {
padding-left: 0 !important;
padding-right: 0 !important;
}
.row {
margin-left: 0 !important;
margin-right: 0 !important;
}
.col-md-3,
.col-md-9 {
padding-left: 0 !important;
padding-right: 0 !important;
}
/* Ensure no overflow on body and html */
html {
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
}
body {
height: 100%;
}
table {
border-collapse: separate;
border-spacing: 0 2px;
}
table td {
width: 160px;
}
.form-group {
min-width: 200px;
}
.input-group-text {
min-width: 120px;
max-width: 120px;
width: 120px;
height: 38.5px;
text-align: left;
justify-content: flex-start;
display: flex;
align-items: center;
padding-left: 12px;
}
.form-control {
height: 38.5px;
}
.card {
font-size: 1.1rem;
}
/* dropdown button style */
.dropdown-menu {
width: 98%;
font-size: 1.0rem;
}
.dropdown-menu a {
border-bottom: 1px solid #b4b4b4;
padding: 12px 15px;
}
.dropdown-menu a:hover {
background-color: #98ed90;
}
/* JSONFormatter value string wrapping */
#jsonoutput .json-formatter-string {
word-wrap: break-word !important;
overflow-wrap: break-word !important;
white-space: pre-wrap !important;
word-break: break-all !important;
max-width: 100% !important;
}
#jsonoutput .json-formatter-row .json-formatter-string {
word-wrap: break-word !important;
overflow-wrap: break-word !important;
white-space: pre-wrap !important;
word-break: break-all !important;
}
/* Remove quotes from string values in JSONFormatter */
#jsonoutput .json-formatter-string:before,
#jsonoutput .json-formatter-string:after {
content: "" !important;
}
#jsonoutput .json-formatter-string {
quotes: none !important;
}
/* View Selection Buttons Styling */
.view-selection-container {
display: flex;
width: 100%;
margin-bottom: 8px;
border-radius: 0.375rem;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.view-selection-container .btn {
flex: 1;
font-weight: 500;
font-size: 0.875rem;
padding: 0.25rem 0.25rem;
transition: all 0.2s ease;
outline: none !important;
box-shadow: none !important;
}
.view-selection-container .btn:focus {
outline: none !important;
box-shadow: none !important;
}
.view-selection-container .btn:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 1px solid rgba(255, 255, 255, 0.3);
}
.view-selection-container .btn:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.view-selection-container .btn:hover {
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Ensure nav tabs have consistent spacing */
.nav-tabs {
margin-bottom: 0;
}
.nav-tabs .nav-item {
flex: 1;
}
.nav-tabs .nav-link {
font-size: 0.875rem;
font-weight: 500;
padding: 0.5rem 0.75rem;
text-align: center;
width: 100%;
}
/* Context menu styles for SweetAlert */
.swal2-infra-context {
font-family: inherit !important;
}
.swal2-infra-context .btn-context {
width: 100% !important;
padding: 10px 8px !important;
font-size: 1.1rem !important;
font-weight: 500 !important;
border-radius: 6px !important;
margin: 0 !important;
transition: all 0.2s ease !important;
}
.swal2-infra-context .btn-context:hover {
transform: translateY(-1px) !important;
box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}
.swal2-infra-context .btn-context:focus {
outline: none !important;
box-shadow: none !important;
}
.swal2-infra-context .btn-success {
background-color: #28a745 !important;
border-color: #28a745 !important;
}
.swal2-infra-context .btn-info {
background-color: #17a2b8 !important;
border-color: #17a2b8 !important;
}
.swal2-infra-context .btn-warning {
background-color: #ffc107 !important;
border-color: #ffc107 !important;
color: #212529 !important;
}
.swal2-infra-context .btn-primary {
background-color: #007bff !important;
border-color: #007bff !important;
}
.swal2-infra-context .btn-danger {
background-color: #dc3545 !important;
border-color: #dc3545 !important;
}
.swal2-infra-context .btn-secondary {
background-color: #6c757d !important;
border-color: #6c757d !important;
}
/* Ensure consistent icon spacing and prevent layout shift */
.fas, .far, .fal, .fab {
display: inline-block;
width: 1em;
text-align: center;
}
/* Prevent layout shift during icon loading */
#mapConnectionStatus i {
min-width: 12px;
display: inline-block;
}
</style>
</head>
<body>
<div class="container-fluid">
<!-- <h3 class="my-1">CB-Tumblebug Map Dashboard</h3> -->
<!-- Left panel hide/show toggle -->
<button type="button" id="leftPanelToggle" onclick="toggleLeftPanel()" title="Hide/show left panel"
aria-label="Hide/show left panel">❮</button>
<div class="row">
<!-- Left Column for Tabs -->
<div class="col-md-3 scrollable-column">
<!-- View Selection Buttons -->
<div class="view-selection-container" role="group" aria-label="View Selection">
<button type="button" id="mapToggle" class="btn btn-link text-muted" onclick="showMap()">
🗺️ Map
</button>
<button type="button" id="graphToggle" class="btn btn-link text-muted" onclick="showGraph()">
🕸️ Topol
</button>
<button type="button" id="networkToggle" class="btn btn-link text-muted" onclick="showNetwork()">
🌐 Net
</button>
<button type="button" id="dashboardToggle" class="btn btn-link text-muted" onclick="showDashboard()">
📊 Board
</button>
<button type="button" id="apiToggle" class="btn btn-link text-muted" onclick="showSwagger()">
🛠️ API
</button>
</div>
<!-- Tab Navigation -->
<ul class="nav nav-tabs nav-fill" id="mainTabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="provision-tab" data-toggle="tab" href="#provision" role="tab"
aria-controls="provision" aria-selected="true">🚀 Provision</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="control-tab" data-toggle="tab" href="#control" role="tab" aria-controls="control"
aria-selected="false">🕹️ Control</a>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content" id="mainTabContent">
<!-- Provisioning Tab -->
<div class="tab-pane fade show active" id="provision" role="tabpanel" aria-labelledby="provision-tab">
<div class="card mb-2">
<div class="card-header">🚀 MC-Infra Recommendation</div>
<div class="card-body d-flex flex-column">
<form id="infra-configuration-form">
<!-- Recommendation Policy Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🎯 Policy</span>
</div>
<select id="recommendPolicy" name="recommendPolicy" class="form-control">
<option value="location" selected="selected">Location-based</option>
<option value="price">Cost-based</option>
<option value="performance">Performance-based</option>
<option value="random">Random-based</option>
</select>
</div>
</div>
<!-- Provider Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">☁️ Provider</span>
</div>
<div class="dropdown" style="flex: 1;">
<button class="form-control dropdown-toggle text-left"
type="button" id="provider-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span id="provider-selection-text">ALL</span>
</button>
<div class="dropdown-menu w-100" aria-labelledby="provider-dropdown" style="max-height: 400px; overflow-y: auto;">
<div class="dropdown-item-text">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="provider-all" value="" checked>
<label class="form-check-label" for="provider-all">ALL</label>
</div>
</div>
<div class="dropdown-divider"></div>
<div id="provider-checkboxes">
<!-- Provider checkboxes will be dynamically populated -->
</div>
</div>
</div>
</div>
</div>
<!-- CPU Range Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🖥️ vCPU</span>
</div>
<input type="number" class="form-control m-0" id='minVCPU' value="1" min="1" max="999447"
step="1">
<span class="mx-1">~</span>
<input type="number" class="form-control m-0" id='maxVCPU' value="" min="1" max="999448" step="1">
</div>
</div>
<!-- Memory Range Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🖥️ Mem(Gi)</span>
</div>
<input type="number" class="form-control m-0" id='minRAM' value="0.5" min="0.5" max="99912288"
step="0.5">
<span class="mx-1">~</span>
<input type="number" class="form-control m-0" id='maxRAM' value="" min="0.5" max="99912289"
step="0.5">
</div>
</div>
<!-- Accelerator Configuration Field -->
<div class="form-group">
<!-- Accelerator Model Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🤖 GPU</span>
</div>
<select class="form-control" id="acceleratorModel" name="acceleratorModel">
<option value="" selected="selected">select</option>
<optgroup label="General Options">
<option value="any">Any GPU - All Models</option>
<option value="NVIDIA">NVIDIA - Any Model</option>
<option value="AMD">AMD - Any Model</option>
</optgroup>
<optgroup label="NVIDIA Data Center (Hopper)">
<option value="H100">H100 - HPC & AI Training</option>
<option value="H200">H200 - Enhanced Hopper</option>
</optgroup>
<optgroup label="NVIDIA Data Center (Ampere)">
<option value="A100">A100 - Enterprise AI</option>
<option value="A800">A800 - China Compliant</option>
<option value="A30">A30 - Mainstream AI</option>
<option value="A10">A10 - Multi-Workload</option>
</optgroup>
<optgroup label="NVIDIA RTX & Professional">
<option value="A10G">A10G - Cloud Graphics</option>
<option value="L40S">L40S - Omniverse & AI</option>
<option value="L40">L40 - Visual Computing</option>
<option value="L4">L4 - AI Video Inference</option>
<option value="L20">L20 - Entry AI Inference</option>
</optgroup>
<optgroup label="NVIDIA Tesla (Legacy)">
<option value="V100">V100 - Volta Architecture</option>
<option value="T4">T4 - Turing Inference</option>
<option value="P100">P100 - Pascal HPC</option>
<option value="P4">P4 - Pascal Inference</option>
</optgroup>
<optgroup label="AMD Instinct (CDNA)">
<option value="MI300X">MI300X - Latest CDNA3</option>
<option value="MI250X">MI250X - CDNA2 Flagship</option>
<option value="MI210">MI210 - CDNA2 Mainstream</option>
<option value="MI100">MI100 - First CDNA</option>
<option value="MI50">MI50 - Vega 20 Based</option>
<option value="MI25">MI25 - Fiji Based</option>
</optgroup>
<optgroup label="AMD Radeon Pro (Virtualization)">
<option value="V620">V620 - Data Center GPU</option>
<option value="V520">V520 - Entry Virtual GPU</option>
<option value="V710">V710 - High-End Virtual</option>
</optgroup>
<optgroup label="Intel & Alternative">
<option value="INTEL">Intel - Xe & Arc</option>
<option value="XILINX">Xilinx - FPGA Accelerator</option>
</optgroup>
</select>
</div>
</div>
<!-- Accelerator Count Range Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🧮 Count</span>
</div>
<input type="number" class="form-control" id='minAcceleratorCount' min="1" max="999998"
step="1">
<span class="mx-1">~</span>
<input type="number" class="form-control" id='maxAcceleratorCount' min="1" max="999999"
step="1">
</div>
</div>
<!-- Accelerator Memory Range Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🧮 VRAM(GB)</span>
</div>
<input type="number" class="form-control" id='minAMEM' min="1" max="999998" step="1">
<span class="mx-1">~</span>
<input type="number" class="form-control" id='maxAMEM' min="1" max="999999" step="1">
</div>
</div>
</div>
<!-- Spec Name Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🏷️ SpecID</span>
</div>
<input type="text" class="form-control" id="specName" name="specName" value=""
placeholder="Ex: 2xlarge">
</div>
</div>
<!-- Spec Architecture Type Field -->
<!-- "osArchitecture": [
"arm64",
"arm64_mac",
"na",
"s390x",
"x86_32",
"x86_64",
"x86_64_mac"
], -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🏗️ SpecArch</span>
</div>
<select id="architecture" name="architecture" class="form-control">
<option value="">Any</option>
<option value="x86_64" selected="selected">x86_64</option>
<option value="x86_64_mac">x86_64_mac</option>
<option value="x86_32">x86_32</option>
<option value="arm64">arm64</option>
<option value="arm64_mac">arm64_mac</option>
<option value="s390x">s390x</option>
<option value="na">Undefined</option>
</select>
</div>
</div>
<!-- OS Image Type Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">💽 Image</span>
</div>
<select id="osImage" name="osImage" class="form-control">
<option value="">Any</option>
<option value="Ubuntu 20.04">Ubuntu 20.04</option>
<option value="Ubuntu 22.04" selected="selected">Ubuntu 22.04</option>
<option value="Ubuntu 24.04">Ubuntu 24.04</option>
<option value="Debian 10">Debian 10</option>
<option value="Debian 11">Debian 11</option>
<option value="Debian 12">Debian 12</option>
<option value="Windows 2022">Windows 2022</option>
</select>
</div>
</div>
<!-- Disk Size Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">💾 Disk(GB)</span>
</div>
<input type="text" class="form-control" id="diskSize" name="diskSize" placeholder="Ex: 250">
</div>
</div>
<!-- Workload Type Toggle -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">⚙️ Workload</span>
</div>
<div class="btn-group btn-group-toggle w-100" data-toggle="buttons" style="flex: 1;">
<label class="btn btn-outline-success active" style="flex: 1;">
<input type="radio" name="workloadType" id="nodeMode" value="node" checked onchange="toggleWorkloadType()">
<i class="fas fa-server"></i> Node
</label>
<label class="btn btn-outline-success" style="flex: 1;">
<input type="radio" name="workloadType" id="k8sMode" value="k8s" onchange="toggleWorkloadType()">
<i class="fas fa-dharmachakra"></i> K8s
</label>
</div>
</div>
</div>
<!-- Schedule Resource Registration Field -->
<div class="form-group">
<button type="button" id="scheduleJobsBtn" onClick="showScheduleJobManagement();"
class="btn btn-outline-primary w-100">📥 Register Resources</button>
</div>
<!-- Template Management Field -->
<div class="form-group">
<button type="button" id="templateMgmtBtn" onClick="showTemplateManagement();"
class="btn btn-outline-primary w-100">📝 Template Management</button>
</div>
<!-- Autopilot Provision -->
<div class="form-group">
<div style="border-top:1px solid #555;margin:6px 0 10px;"></div>
<button type="button" id="autopilotBtn" onclick="showAutopilotDialog();"
class="btn btn-warning w-100 font-weight-bold" style="animation:autopilotPulse 2.5s ease-in-out infinite">
🤖 Autopilot Provision
</button>
</div>
<style>
@keyframes autopilotPulse {
0%,100%{box-shadow:0 0 0 0 rgba(255,193,7,0);}
50%{box-shadow:0 0 0 5px rgba(255,193,7,.22);}
}
@media(prefers-reduced-motion:reduce){#autopilotBtn{animation:none}}
</style>
</form>
</div>
</div>
<!-- MC-Infra Configuration Review Card -->
<div class="card mb-2" id="infra-review-card" style="display: none;">
<div class="card-header">📋 MC-Infra Configuration</div>
<div class="card-body">
<div id="nodegroup-list" class="list-group">
<!-- Dynamic NodeGroup items will be added here -->
</div>
<div class="text-center mt-2" id="no-nodegroups" style="color: #6c757d; font-style: italic;">
No NodeGroups configured yet. Click on the map to add locations.
</div>
</div>
</div>
</div>
<!-- Control Tab -->
<div class="tab-pane fade" id="control" role="tabpanel" aria-labelledby="control-tab">
<div class="card mb-2">
<div class="card-header">🕹️ MC-Infra Control</div>
<div class="card-body d-flex flex-column">
<form id="infra-control-form">
<!-- X-Request-Id list -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">📝 Req Log</span>
</div>
<select id="xRequestIdSelect" name="xRequestId" class="form-control" aria-label="X-Request-Id"
aria-describedby="xRequestIdLabel" onchange="handleRequestIdSelection();">
<option value="">Select ID</option>
<!-- Options will be filled dynamically -->
</select>
</div>
</div>
<!-- Infra ID Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🏗️ Infra ID</span>
</div>
<select id="infraid" name="infraid" class="form-control" aria-label="Infra ID"
aria-describedby="infraidLabel">
<!-- Options will be filled dynamically -->
</select>
</div>
</div>
<!-- Node ID Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🖥️ Node ID</span>
</div>
<select id="nodeid" name="nodeid" class="form-control" aria-label="Node ID"
aria-describedby="nodeidLabel">
<!-- Options will be filled dynamically -->
</select>
</div>
</div>
<!-- Node Public IP Field -->
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🌐 Pub IP</span>
</div>
<select id="pubip" name="pubip" class="form-control" aria-label="Pub IP"
aria-describedby="pubipLabel">
<!-- Options will be filled dynamically -->
</select>
</div>
</div>
<!-- Control Actions Button (success) -->
<div class="form-group">
<button type="button" id="controlActionsBtn" onClick="showActionsMenu();"
class="btn btn-success w-100">🕹️ Control Infra</button>
</div>
<!-- Status Field (success) -->
<div class="form-group">
<button type="button" id="statusBtn" onClick="statusInfra();" class="btn btn-success w-100">📊 Get
Status</button>
</div>
<!-- Infra Access Field (success) -->
<div class="form-group dropdown">
<button class="btn btn-success dropdown-toggle w-100" type="button" id="accessDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
🔑 Get Access
</button>
<div class="dropdown-menu" aria-labelledby="accessDropdown">
<a class="dropdown-item" href="javascript:void(0)" onClick="getAccessInfo();">Get Access Info</a>
<a class="dropdown-item save-file" href="javascript:void(0)">Save SSH Key</a>
</div>
</div>
<!-- Remote Command Field (Warning) -->
<div class="form-group">
<button type="button" id="remoteCmd" onClick="executeRemoteCmd();" class="btn btn-warning w-100">
💻 Remote Command</button>
</div>
<!-- File Transfer Field (Warning) -->
<div class="form-group">
<button type="button" id="filetransfer" onClick="transferFileToInfra();"
class="btn btn-warning w-100">💾 Remote File Transfer</button>
</div>
<!-- Snapshot Management Field (Info) -->
<div class="form-group">
<button type="button" id="snapshotManagement" onClick="showSnapshotManagementModal();"
class="btn btn-warning w-100">📸 Snapshot Management</button>
</div>
<!-- Scale Out NodeGroup Field -->
<div class="form-group">
<button type="button" id="scaleOutBtn" onClick="scaleOutNodeGroupWithSelection();"
class="btn btn-info w-100">⬆️ ScaleOut NodeGroup</button>
</div>
<!-- Update Firewall Rules Field (Success) -->
<div class="form-group">
<button type="button" id="updateFirewall" onClick="updateFirewallRules();"
class="btn btn btn-info w-100">🔥 Update Firewall</button>
</div>
<!-- NLB Control Field (Info) -->
<div class="form-group">
<button type="button" id="nlbControlBtn" onClick="manageNLB();"
class="btn btn-info w-100">⚖️ Control L4 NLB</button>
</div>
<!-- Delete Infra Field (secondary) -->
<div class="form-group">
<button type="button" id="deleteInfraBtn" onClick="executeAction('delete');"
class="btn btn-secondary w-100">🛑 Delete Infra</button>
</div>
</form>
</div>
</div>
<div class="card mb-2">
<div class="card-header">📦 Resource Control</div>
<div class="card-body d-flex flex-column">
<form id="resource-view-form" class="form-row">
<!-- Release Resources Field -->
<div class="form-group col-12">
<button type="button" id="delResources" onClick="releaseResources();"
class="btn btn-secondary w-100">🛑 Release Resources</button>
</div>
<!-- Resource Control Field -->
<div class="form-group col dropdown">
<button class="btn btn-info dropdown-toggle w-100" type="button" id="resourceControlDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
🔧 Resource Control
</button>
<div class="dropdown-menu" aria-labelledby="resourceControlDropdown">
<a class="dropdown-item" href="javascript:void(0)" onClick="releaseResources();">🗑️ Release
Resources</a>
<a class="dropdown-item" href="javascript:void(0)" onClick="resourceOverview();">👁️ Overview
Resources</a>
<a class="dropdown-item" href="javascript:void(0)" onClick="registerCspResource();">📝 Register
Existing
Resources</a>
</div>
</div>
<!-- vNet ID Field -->
<div class="form-group col-12">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">🌐 VNet</span>
</div>
<select id="vNet" name="vNet" class="form-control" aria-label="vNet ID"
aria-describedby="vNetLabel">
<!-- Options will be filled dynamically -->
</select>
</div>
</div>
<!-- securityGroup Field -->
<div class="form-group col-12">