decodo-register · VibeGit
decodo-register decodo-register — авторег Decodo (free DC proxies)
Decodo (ex-Smartproxy) даёт 1 GB datacenter-прокси трафика в месяц бесплатно на аккаунт: без карты, только подтверждение почты. Реггер делает аккаунты пачками и складывает в банк рабочие username:password к dc.decodo.com:10000.
decodo-register / panel / static / index.html 1085 строк · изменён 14 нояб., 06:52
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
<! DOCTYPE html >
< html lang = " ru" >
< head>
< meta charset = " utf-8" >
< meta name = " viewport" content = " width=device-width, initial-scale=1" >
< title> панель реггера</ title>
< style>
:root {
--bg-base : #090d16 ;
ui-monospace SFMono-Regular Menlo Monaco Consolas monospace
-apple-system BlinkMacSystemFont Roboto Arial sans-serif
ease
border-box
antialiased
none
solid
sticky
flex center space-between
wrap
flex center wrap
flex center
solid
solid
flex center wrap
flex center
solid
wrap
flex center
solid
none border-color
center
inherit
solid pointer
inline-flex center
all none
not-allowed
flex center
flex center
flex column
grid auto-fit
solid
uppercase
flex center
hidden ellipsis nowrap
hidden
width ease
solid hidden
width ease
flex
solid wrap
solid none
relative
solid
auto
solid
flex center wrap
collapse
pointer none
left solid middle
uppercase
none
inline-flex center
solid nowrap
pointer
hidden
ellipsis nowrap
dashed
grid
solid
auto pre-wrap break-all
italic center
fixed
solid
opacity
none
подключение…
реггер v…
сервис: —
·
аккаунтов: —
( ok — /
fail — /
? — )
·
мост …
·
последний прогон: —
акков
потоков
▶ Регистрировать
⚡ Параллельно
idle
0/0
■ Стоп
Аккаунты
Модели
Лимиты
Капча
Пул моста
Мост
Подключение
Логи
Аккаунты
загрузка…
скрыть исчерпанные
⟳ Перепроверить все
Обновить
# Email Статус
API-ключ (клик = копировать) Free
Создан Заметка
загрузка…
Модели
Обновить
ID Имя Статус Заметка Проверена
загрузка…
Капча Cloudflare Turnstile (запасной путь)
Обновить
Пул моста —
Обновить
Ключ Статус Детали
Мост: запросы и логи апстрим → статус, скорость, ошибки
⏸ авто-обновление: вкл
обновлено: —
Обновить
Время Модель Ключ
Статус Скорость
Токенов $
загрузка…
Лог моста (data/bridge.log)
загрузка…
Мост как провайдер
OpenAI-совместимый шлюз на пул ключей
Обновить
Base URL
—
API Key
любая непустая строка — мост её не проверяет, ключ пула подставляет сам
Model ID
загрузка…
Поток (stream)
поддерживается ( "stream": true проксируется)
CLI / IDE (ZCode, Cline, любой OpenAI-совместимый)
—
Проверка curl'ом
—
Python (openai)
—
Мост сам крутит пул: 401/403 → ключ в dead, 429 → кулдаун, сбой → следующий ключ;
когда живых меньше min_pool — сам запускает реггер и пополняет пул.
Запуск моста: — (живёт отдельно от реггера)
Лимиты и расход
расход считаем сами из леджера моста — в реальном времени
⟳ Сверить с сервером
Обновить
# Аккаунт Статус
Запросов Токенов
$ (наш учёт) % лимита
Модели Сброс
данных пока нет — расход появится после запросов через мост
Расход по моделям (что прошло через мост)
Модель Запросов
Токенов $ (наш учёт)
$/1M in $/1M out
Токенов на 1 лимит
нет запросов через мост
Логи
data/panel.log, авто-обновление 5с
Обновить
загрузка…
--bg-surface
:
#0f1726
;
--bg-elevated
:
#152033
;
--bg-subtle
:
#1c2a42
;
--border
:
#223452
;
--border-hover
:
#324b75
;
--text-primary
:
#f1f5f9
;
--text-secondary
:
#94a3b8
;
--text-muted
:
#64748b
;
--accent
:
#3b82f6
;
--accent-glow
:
rgba ( 59 , 130 , 246 , 0.25 )
;
--accent-hover
:
#60a5fa
;
--ok
:
#10b981
;
--ok-bg
:
rgba ( 16 , 185 , 129 , 0.12 )
;
--ok-border
:
rgba ( 16 , 185 , 129 , 0.35 )
;
--warn
:
#f59e0b
;
--warn-bg
:
rgba ( 245 , 158 , 11 , 0.12 )
;
--warn-border
:
rgba ( 245 , 158 , 11 , 0.35 )
;
--bad
:
#ef4444
;
--bad-bg
:
rgba ( 239 , 68 , 68 , 0.12 )
;
--bad-border
:
rgba ( 239 , 68 , 68 , 0.35 )
;
--dim-bg
:
rgba ( 148 , 163 , 184 , 0.1 )
;
--dim-border
:
rgba ( 148 , 163 , 184 , 0.25 )
;
--mono
:
,
,
,
,
,
"Liberation Mono"
,
"Courier New"
,
;
--sans
:
,
,
"Segoe UI"
,
,
"Helvetica Neue"
,
,
;
--radius-sm
:
6
px
;
--radius-md
:
10
px
;
--radius-lg
:
14
px
;
--transition
:
0.18
s
;
}
*
{
box-sizing
:
;
margin
:
0
;
padding
:
0
;
}
body
{
background-color
:
var
(
--bg-base
)
;
color
:
var
(
--text-primary
)
;
font-family
:
var
(
--sans
)
;
font-size
:
13
px
;
line-height
:
1.5
;
-webkit-font-smoothing
:
;
min-width
:
900
px
;
}
.mono
{
font-family
:
var
(
--mono
)
;
font-size
:
12
px
;
}
.hide
{
display
:
!important
;
}
header
{
background
:
var
(
--bg-surface
)
;
border-bottom
:
1
px
var
(
--border
)
;
position
:
;
top
:
0
;
z-index
:
100
;
display
:
;
align-items
:
;
justify-content
:
;
padding
:
10
px
22
px
;
gap
:
16
px
;
flex-wrap
:
;
box-shadow
:
0
4
px
20
px
rgba ( 0 , 0 , 0 , 0.3 )
;
}
.header-brand
{
display
:
;
align-items
:
;
gap
:
12
px
;
flex-wrap
:
;
}
.status-indicator
{
display
:
;
align-items
:
;
gap
:
8
px
;
background
:
var
(
--bg-elevated
)
;
border
:
1
px
var
(
--border
)
;
padding
:
4
px
10
px
;
border-radius
:
999
px
;
font-size
:
12
px
;
font-weight
:
500
;
}
.pulse-dot
{
width
:
8
px
;
height
:
8
px
;
border-radius
:
50
%
;
background
:
var
(
--ok
)
;
box-shadow
:
0
0
8
px
var
(
--ok
)
;
transition
:
var
(
--transition
)
;
}
.pulse-dot .offline
{
background
:
var
(
--bad
)
;
box-shadow
:
0
0
8
px
var
(
--bad
)
;
}
.pulse-dot .warn
{
background
:
var
(
--warn
)
;
box-shadow
:
0
0
8
px
var
(
--warn
)
;
}
.brand-title
{
font-size
:
16
px
;
font-weight
:
700
;
letter-spacing
:
-0.01
em
;
}
.ver-badge
{
font-size
:
11
px
;
font-weight
:
600
;
color
:
var
(
--accent-hover
)
;
background
:
var
(
--accent-glow
)
;
padding
:
2
px
7
px
;
border-radius
:
6
px
;
border
:
1
px
rgba ( 59 , 130 , 246 , 0.3 )
;
font-family
:
var
(
--mono
)
;
}
.meta-info
{
font-size
:
12
px
;
color
:
var
(
--text-muted
)
;
display
:
;
align-items
:
;
gap
:
6
px
;
flex-wrap
:
;
}
.meta-info strong
{
color
:
var
(
--text-secondary
)
;
font-family
:
var
(
--mono
)
;
font-weight
:
500
;
}
.run-panel
{
display
:
;
align-items
:
;
gap
:
10
px
;
background
:
var
(
--bg-elevated
)
;
border
:
1
px
var
(
--border
)
;
border-radius
:
var
(
--radius-md
)
;
padding
:
6
px
12
px
;
flex-wrap
:
;
}
.run-input-group
{
display
:
;
align-items
:
;
gap
:
6
px
;
}
.run-input-group label
{
font-size
:
12
px
;
color
:
var
(
--text-secondary
)
;
font-weight
:
500
;
}
input[ type = number ]
{
background
:
var
(
--bg-base
)
;
color
:
var
(
--text-primary
)
;
border
:
1
px
var
(
--border
)
;
border-radius
:
var
(
--radius-sm
)
;
padding
:
5
px
8
px
;
font-size
:
12
px
;
font-family
:
var
(
--mono
)
;
outline
:
;
transition
:
var
(
--transition
)
;
width
:
64
px
;
text-align
:
;
}
input[ type = number ] :focus
{
border-color
:
var
(
--accent
)
;
box-shadow
:
0
0
0
2
px
var
(
--accent-glow
)
;
}
button
{
font-family
:
;
font-size
:
12
px
;
font-weight
:
600
;
padding
:
6
px
12
px
;
border-radius
:
var
(
--radius-sm
)
;
border
:
1
px
transparent
;
cursor
:
;
display
:
;
align-items
:
;
gap
:
6
px
;
transition
:
var
(
--transition
)
;
user-select
:
;
}
button:active
{
transform
:
translateY
(
1
px
)
;
}
button:disabled
{
opacity
:
0.5
;
cursor
:
;
}
.btn-primary
{
background
:
var
(
--accent
)
;
color
:
#fff
;
border-color
:
#2563eb
;
box-shadow
:
0
2
px
8
px
var
(
--accent-glow
)
;
}
.btn-primary :hover :not ( :disabled )
{
background
:
var
(
--accent-hover
)
;
}
.btn-parallel
{
background
:
#7c3aed
;
color
:
#fff
;
border-color
:
#6d28d9
;
box-shadow
:
0
2
px
8
px
rgba ( 124 , 58 , 237 , .3 )
;
}
.btn-parallel :hover :not ( :disabled )
{
background
:
#8b5cf6
;
}
.btn-danger
{
background
:
transparent
;
border-color
:
var
(
--bad
)
;
color
:
var
(
--bad
)
;
}
.btn-danger :hover :not ( :disabled )
{
background
:
var
(
--bad-bg
)
;
}
.btn-ghost
{
background
:
var
(
--bg-elevated
)
;
border-color
:
var
(
--border
)
;
color
:
var
(
--text-secondary
)
;
}
.btn-ghost :hover :not ( :disabled )
{
background
:
var
(
--bg-subtle
)
;
color
:
var
(
--text-primary
)
;
border-color
:
var
(
--border-hover
)
;
}
.job-progress-wrapper
{
display
:
;
align-items
:
;
gap
:
8
px
;
}
.job-step-line
{
display
:
;
align-items
:
;
gap
:
10
px
;
flex-basis
:
100
%
;
margin-top
:
6
px
;
}
.job-workers
{
flex-basis
:
100
%
;
margin-top
:
8
px
;
display
:
;
flex-direction
:
;
gap
:
4
px
;
}
.dash
{
display
:
;
grid-template-columns
:
repeat
(
,
minmax
(
150
px
,
1
fr
)
)
;
gap
:
10
px
;
margin-bottom
:
16
px
;
}
.dash-cell
{
background
:
var
(
--bg-elevated
)
;
border
:
1
px
var
(
--border
)
;
border-radius
:
10
px
;
padding
:
12
px
14
px
;
}
.dash-cell .lbl
{
font-size
:
11
px
;
color
:
var
(
--text-muted
)
;
text-transform
:
;
letter-spacing
:
.04
em
;
}
.dash-cell .val
{
font-size
:
20
px
;
font-weight
:
600
;
font-family
:
var
(
--mono
)
;
margin-top
:
4
px
;
}
.dash-cell .sub
{
font-size
:
11
px
;
color
:
var
(
--text-muted
)
;
margin-top
:
2
px
;
}
.dash-cell .ok .val
{
color
:
#4ade80
;
}
.dash-cell .warn .val
{
color
:
#fbbf24
;
}
.dash-cell .hot .val
{
color
:
#f87171
;
}
.worker-row
{
display
:
;
align-items
:
;
gap
:
8
px
;
font-size
:
11
px
;
}
.worker-row .w-name
{
font-family
:
var
(
--mono
)
;
color
:
var
(
--accent-hover
)
;
min-width
:
32
px
;
}
.worker-row .w-label
{
color
:
var
(
--text-secondary
)
;
flex
:
1
;
overflow
:
;
text-overflow
:
;
white-space
:
;
}
.step-bar-wrap
{
flex
:
0
0
120
px
;
height
:
4
px
;
border-radius
:
2
px
;
background
:
var
(
--bg-elevated
)
;
overflow
:
;
}
.step-bar-fill
{
height
:
100
%
;
width
:
0
%
;
border-radius
:
2
px
;
background
:
linear-gradient
(
90
deg
,
#22c55e
,
#4ade80
)
;
transition
:
.4
s
;
}
.job-status-tag
{
font-family
:
var
(
--mono
)
;
font-size
:
11
px
;
font-weight
:
500
;
color
:
var
(
--text-secondary
)
;
min-width
:
75
px
;
}
.progress-bar-wrap
{
width
:
120
px
;
height
:
8
px
;
background
:
var
(
--bg-base
)
;
border
:
1
px
var
(
--border
)
;
border-radius
:
999
px
;
overflow
:
;
}
.progress-bar-fill
{
height
:
100
%
;
width
:
0
%
;
background
:
linear-gradient
(
90
deg
,
var
(
--accent
)
,
#60a5fa
)
;
border-radius
:
999
px
;
transition
:
0.3
s
;
}
nav.tabs-nav
{
display
:
;
gap
:
4
px
;
padding
:
12
px
22
px
0
;
background
:
var
(
--bg-base
)
;
border-bottom
:
1
px
var
(
--border
)
;
flex-wrap
:
;
}
nav.tabs-nav button
{
background
:
transparent
;
color
:
var
(
--text-secondary
)
;
border
:
1
px
transparent
;
border-bottom
:
;
border-radius
:
8
px
8
px
0
0
;
padding
:
9
px
18
px
;
font-size
:
13
px
;
font-weight
:
500
;
position
:
;
top
:
1
px
;
}
nav.tabs-nav button:hover
{
color
:
var
(
--text-primary
)
;
background
:
rgba ( 255 , 255 , 255 , 0.02 )
;
}
nav.tabs-nav button.active
{
background
:
var
(
--bg-surface
)
;
color
:
var
(
--text-primary
)
;
border-color
:
var
(
--border
)
;
border-bottom-color
:
var
(
--bg-surface
)
;
font-weight
:
600
;
}
nav.tabs-nav button .tab-count
{
font-size
:
11
px
;
background
:
var
(
--bg-elevated
)
;
border
:
1
px
var
(
--border
)
;
color
:
var
(
--text-muted
)
;
padding
:
1
px
6
px
;
border-radius
:
999
px
;
font-family
:
var
(
--mono
)
;
margin-left
:
6
px
;
}
main
{
padding
:
20
px
22
px
50
px
;
max-width
:
1440
px
;
margin
:
0
;
}
.card
{
background
:
var
(
--bg-surface
)
;
border
:
1
px
var
(
--border
)
;
border-radius
:
var
(
--radius-lg
)
;
padding
:
18
px
20
px
;
margin-bottom
:
18
px
;
}
.card h2
{
font-size
:
14
px
;
font-weight
:
600
;
margin-bottom
:
12
px
;
display
:
;
align-items
:
;
gap
:
10
px
;
flex-wrap
:
;
}
.card h2 .sub
{
font-size
:
12
px
;
font-weight
:
400
;
color
:
var
(
--text-muted
)
;
}
table
{
width
:
100
%
;
border-collapse
:
;
}
th.sortable
{
cursor
:
;
user-select
:
;
}
th.sortable :hover
{
color
:
var
(
--accent-hover
)
;
}
th, td
{
text-align
:
;
padding
:
8
px
10
px
;
border-bottom
:
1
px
var
(
--border
)
;
vertical-align
:
;
}
th
{
font-size
:
11
px
;
text-transform
:
;
letter-spacing
:
0.05
em
;
color
:
var
(
--text-muted
)
;
font-weight
:
600
;
}
tbody tr:hover
{
background
:
rgba ( 255 , 255 , 255 , 0.02 )
;
}
tbody tr:last-child td
{
border-bottom
:
;
}
.badge
{
display
:
;
align-items
:
;
gap
:
5
px
;
font-size
:
11
px
;
font-weight
:
600
;
padding
:
2
px
9
px
;
border-radius
:
999
px
;
border
:
1
px
;
white-space
:
;
}
.badge .ok
{
color
:
var
(
--ok
)
;
background
:
var
(
--ok-bg
)
;
border-color
:
var
(
--ok-border
)
;
}
.badge .failed
{
color
:
var
(
--bad
)
;
background
:
var
(
--bad-bg
)
;
border-color
:
var
(
--bad-border
)
;
}
.badge .unknown
{
color
:
var
(
--text-secondary
)
;
background
:
var
(
--dim-bg
)
;
border-color
:
var
(
--dim-border
)
;
}
.badge .warn
{
color
:
var
(
--warn
)
;
background
:
var
(
--warn-bg
)
;
border-color
:
var
(
--warn-border
)
;
}
.key-cell
{
font-family
:
var
(
--mono
)
;
font-size
:
11
px
;
cursor
:
;
color
:
var
(
--accent-hover
)
;
max-width
:
320
px
;
overflow
:
;
text-overflow
:
;
white-space
:
;
border-bottom
:
1
px
var
(
--border-hover
)
;
padding-bottom
:
1
px
;
}
.key-cell :hover
{
color
:
#93c5fd
;
border-bottom-color
:
#93c5fd
;
}
.key-cell .copied
{
color
:
var
(
--ok
)
;
border-bottom-color
:
var
(
--ok
)
;
}
.kv
{
display
:
;
grid-template-columns
:
220
px
1
fr
;
gap
:
6
px
14
px
;
font-size
:
13
px
;
}
.kv dt
{
color
:
var
(
--text-muted
)
;
}
.kv dd
{
color
:
var
(
--text-primary
)
;
font-family
:
var
(
--mono
)
;
font-size
:
12
px
;
}
.log-box
{
background
:
var
(
--bg-base
)
;
border
:
1
px
var
(
--border
)
;
border-radius
:
var
(
--radius-md
)
;
padding
:
12
px
14
px
;
font-family
:
var
(
--mono
)
;
font-size
:
11.5
px
;
line-height
:
1.6
;
max-height
:
480
px
;
overflow-y
:
;
white-space
:
;
word-break
:
;
color
:
var
(
--text-secondary
)
;
}
.empty
{
color
:
var
(
--text-muted
)
;
font-style
:
;
padding
:
18
px
;
text-align
:
;
}
.toast
{
position
:
;
bottom
:
22
px
;
right
:
22
px
;
z-index
:
200
;
background
:
var
(
--bg-elevated
)
;
border
:
1
px
var
(
--border-bright
,
#3d5d91
)
;
border-radius
:
var
(
--radius-md
)
;
padding
:
10
px
16
px
;
font-size
:
12
px
;
box-shadow
:
0
8
px
30
px
rgba ( 0 , 0 , 0 , 0.5 )
;
opacity
:
0
;
transition
:
0.2
s
;
pointer-events
:
;
max-width
:
420
px
;
}
.toast .show
{
opacity
:
1
;
}
.toast .err
{
border-color
:
var
(
--bad
)
;
color
:
var
(
--bad
)
;
}
</ style>
</ head>
< body>
< header>
< div class = " header-brand" >
< div class = " status-indicator" title = " Статус панели" >
< span class = " pulse-dot" id = " svc-dot" >
</ span>
< span id = " svc-status" >
</ span>
</ div>
< div class = " brand-title" >
< span id = " svc-name" >
</ span>
< span class = " ver-badge" id = " ver" >
</ span>
</ div>
< div class = " meta-info" >
< span>
< strong id = " svc-service" >
</ strong>
</ span>
< span>
</ span>
< span>
< strong id = " hdr-total" >
</ strong>
< span style = " color : var ( --ok ) " >
< strong id = " hdr-ok" >
</ strong>
</ span>
< span style = " color : var ( --bad ) " >
< strong id = " hdr-failed" >
</ strong>
</ span>
< span style = " color : var ( --text-muted ) " >
< strong id = " hdr-unknown" >
</ strong>
</ span>
</ span>
< span>
</ span>
< span>
< span id = " bridge-port-label" >
</ span>
< span class = " badge unknown" id = " bridge-badge" >
</ span>
</ span>
< span>
</ span>
< span>
< strong id = " hdr-lastrun" >
</ strong>
</ span>
</ div>
</ div>
< div class = " run-panel" >
< div class = " run-input-group" >
< label for = " count" >
</ label>
< input type = " number" id = " count" value = " 1" min = " 1" max = " 500" >
</ div>
< div class = " run-input-group" >
< label for = " workers" >
</ label>
< input type = " number" id = " workers" value = " 1" min = " 1" max = " 12" title = " сколько аккаунтов регать одновременно (каждый на своём прокси)" >
</ div>
< button class = " btn-primary" id = " btn-run" onclick = " startRegister ( ) " >
</ button>
< button class = " btn-parallel" id = " btn-run-par" onclick = " startRegister ( true ) " >
</ button>
< div class = " job-progress-wrapper" >
< span class = " job-status-tag" id = " job-tag" >
</ span>
< div class = " progress-bar-wrap" >
< div class = " progress-bar-fill" id = " job-fill" >
</ div>
</ div>
< span class = " mono" id = " job-nums" style = " font-size : 11 px ; color : var ( --text-muted ) " >
</ span>
</ div>
< button class = " btn-danger hide" id = " btn-stop" onclick = " stopJob ( ) " >
</ button>
< div class = " job-step-line hide" id = " job-step-line" >
< span class = " mono" id = " job-step-text" style = " font-size : 11 px ; color : var ( --text-secondary ) " >
</ span>
< div class = " step-bar-wrap" >
< div class = " step-bar-fill" id = " job-step-fill" >
</ div>
</ div>
</ div>
< div class = " job-workers hide" id = " job-workers" >
</ div>
</ div>
</ header>
< nav class = " tabs-nav" >
< button class = " active" data-tab = " accounts" onclick = " showTab ( 'accounts' ) " >
< span class = " tab-count" id = " tab-count-accounts" >
</ span>
</ button>
< button data-tab = " models" onclick = " showTab ( 'models' ) " >
< span class = " tab-count" id = " tab-count-models" >
</ span>
</ button>
< button data-tab = " limits" onclick = " showTab ( 'limits' ) " >
</ button>
< button data-tab = " captcha" onclick = " showTab ( 'captcha' ) " >
</ button>
< button data-tab = " pool" onclick = " showTab ( 'pool' ) " >
</ button>
< button data-tab = " bridge" onclick = " showTab ( 'bridge' ) " >
</ button>
< button data-tab = " connect" onclick = " showTab ( 'connect' ) " >
</ button>
< button data-tab = " logs" onclick = " showTab ( 'logs' ) " >
</ button>
</ nav>
< main>
< section id = " tab-accounts" class = " card" >
< h2>
< span class = " sub" id = " accounts-sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< label style = " font-size : 12 px ; color : var ( --text-secondary ) ; display : flex; align-items : center; gap : 5 px ; cursor : pointer" >
< input type = " checkbox" id = " hide-exhausted" onchange = " renderAccounts ( ) " checked >
</ label>
< button class = " btn-ghost" id = " btn-check" onclick = " checkAccounts ( ) " >
</ button>
< button class = " btn-ghost" onclick = " loadAccounts ( ) " >
</ button>
</ h2>
< table>
< thead>
< tr>
< th>
</ th>
< th class = " sortable" onclick = " setSort ( 'accounts' , 'email' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'accounts' , 'status' ) " >
</ th>
< th>
</ th>
< th class = " sortable" onclick = " setSort ( 'accounts' , 'free' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'accounts' , 'created' ) " >
</ th>
< th>
</ th>
</ tr>
</ thead>
< tbody id = " accounts-tbody" >
< tr>
< td colspan = " 7" class = " empty" >
</ td>
</ tr>
</ tbody>
</ table>
</ section>
< section id = " tab-models" class = " card hide" >
< h2>
< span class = " sub" id = " models-sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< button class = " btn-ghost" onclick = " loadModels ( ) " >
</ button>
</ h2>
< table>
< thead>
< tr>
< th class = " sortable" onclick = " setSort ( 'models' , 'id' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'models' , 'name' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'models' , 'status' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'models' , 'note' ) " >
</ th>
< th>
</ th>
</ tr>
</ thead>
< tbody id = " models-tbody" >
< tr>
< td colspan = " 5" class = " empty" >
</ td>
</ tr>
</ tbody>
</ table>
</ section>
< section id = " tab-captcha" class = " card hide" >
< h2>
< span class = " sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< button class = " btn-ghost" onclick = " loadCaptcha ( ) " >
</ button>
</ h2>
< dl class = " kv" id = " captcha-kv" >
</ dl>
< p style = " margin-top : 12 px ; color : var ( --text-muted ) ; font-size : 12 px " id = " captcha-note" >
</ p>
</ section>
< section id = " tab-pool" class = " card hide" >
< h2>
< span class = " sub" id = " pool-bridge-sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< button class = " btn-ghost" onclick = " loadPool ( ) " >
</ button>
</ h2>
< div id = " pool-summary" style = " margin-bottom : 12 px " >
</ div>
< table id = " pool-table" class = " hide" >
< thead>
< tr>
< th>
</ th>
< th>
</ th>
< th>
</ th>
</ tr>
</ thead>
< tbody id = " pool-tbody" >
</ tbody>
</ table>
</ section>
< section id = " tab-bridge" class = " card hide" >
< h2>
< span class = " sub" id = " bridge-sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< span id = " bridge-status-badge" >
</ span>
< button class = " btn-ghost" id = " btn-bridge-auto" onclick = " toggleBridgeAuto ( ) " >
</ button>
< span class = " mono" id = " bridge-updated" style = " font-size : 11 px ; color : var ( --text-muted ) " >
</ span>
< button class = " btn-ghost" onclick = " loadBridge ( ) " >
</ button>
</ h2>
< div id = " bridge-stats" style = " margin-bottom : 12 px " >
</ div>
< table>
< thead>
< tr>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'ts' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'model' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'key' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'status' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'latency' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'tokens' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'bridge' , 'usd' ) " >
</ th>
</ tr>
</ thead>
< tbody id = " bridge-tbody" >
< tr>
< td colspan = " 7" class = " empty" >
</ td>
</ tr>
</ tbody>
</ table>
< h3 style = " margin : 16 px 0 8 px ; font-size : 13 px " >
</ h3>
< div class = " log-box" id = " bridge-log" >
</ div>
</ section>
< section id = " tab-connect" class = " card hide" >
< h2>
< span class = " sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< span id = " connect-bridge-status" >
</ span>
< button class = " btn-ghost" onclick = " loadConnect ( ) " >
</ button>
</ h2>
< dl class = " kv" >
< dt>
</ dt>
< dd>
< span class = " key-cell" style = " cursor : pointer" title = " клик = копировать"
id = " connect-baseurl" >
</ span>
</ dd>
< dt>
</ dt>
< dd>
</ dd>
< dt>
</ dt>
< dd id = " connect-models" >
</ dd>
< dt>
</ dt>
< dd>
< code>
</ code>
</ dd>
</ dl>
< h3 style = " margin : 16 px 0 6 px ; font-size : 13 px " >
</ h3>
< pre id = " snip-cli" style = " background : var ( --bg-elevated ) ; border : 1 px solid var ( --border ) ; border-radius : 8 px ; padding : 10 px 12 px ; font-family : var ( --mono ) ; font-size : 12 px ; white-space : pre-wrap; word-break : break-all; margin : 8 px 0 ; cursor : pointer" title = " клик = копировать" onclick = " copyKey ( this , this . textContent ) " >
</ pre>
< h3 style = " margin : 16 px 0 6 px ; font-size : 13 px " >
</ h3>
< pre id = " snip-curl" style = " background : var ( --bg-elevated ) ; border : 1 px solid var ( --border ) ; border-radius : 8 px ; padding : 10 px 12 px ; font-family : var ( --mono ) ; font-size : 12 px ; white-space : pre-wrap; word-break : break-all; margin : 8 px 0 ; cursor : pointer" title = " клик = копировать" onclick = " copyKey ( this , this . textContent ) " >
</ pre>
< h3 style = " margin : 16 px 0 6 px ; font-size : 13 px " >
</ h3>
< pre id = " snip-py" style = " background : var ( --bg-elevated ) ; border : 1 px solid var ( --border ) ; border-radius : 8 px ; padding : 10 px 12 px ; font-family : var ( --mono ) ; font-size : 12 px ; white-space : pre-wrap; word-break : break-all; margin : 8 px 0 ; cursor : pointer" title = " клик = копировать" onclick = " copyKey ( this , this . textContent ) " >
</ pre>
< p style = " margin-top : 12 px ; color : var ( --text-muted ) ; font-size : 12 px " >
< span class = " mono" id = " connect-bridge-start" >
</ span>
</ p>
</ section>
< section id = " tab-limits" class = " card hide" >
< h2>
< span class = " sub" id = " limits-sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< span id = " limits-status-badge" >
</ span>
< button class = " btn-ghost" id = " btn-limits-check" onclick = " checkLimits ( ) " title = " проверить квоты на сервере (логин по всем аккаунтам, медленно)" >
</ button>
< button class = " btn-ghost" onclick = " loadLimits ( ) " >
</ button>
</ h2>
< div id = " limits-live" style = " margin-bottom : 12 px ; font-size : 12 px ; color : var ( --text-muted ) ; display : flex; align-items : center; gap : 10 px ; flex-wrap : wrap" >
</ div>
< div id = " limits-dashboard" class = " dash" >
</ div>
< div id = " limits-summary" style = " margin-bottom : 14 px " >
</ div>
< table>
< thead>
< tr>
< th>
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'email' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'status' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'req_used' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'tokens' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'usd' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'pct' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'models' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limits' , 'reset' ) " >
</ th>
</ tr>
</ thead>
< tbody id = " limits-tbody" >
< tr>
< td colspan = " 9" class = " empty" >
</ td>
</ tr>
</ tbody>
</ table>
< h3 style = " margin : 18 px 0 8 px ; font-size : 13 px " >
</ h3>
< table>
< thead>
< tr>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'model' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'requests' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'tokens' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'usd' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'price_in' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'price_out' ) " >
</ th>
< th class = " sortable" onclick = " setSort ( 'limitModels' , 'per_allowance' ) " >
</ th>
</ tr>
</ thead>
< tbody id = " limits-models-tbody" >
< tr>
< td colspan = " 7" class = " empty" >
</ td>
</ tr>
</ tbody>
</ table>
< p style = " margin-top : 12 px ; color : var ( --text-muted ) ; font-size : 12 px " id = " limits-note" >
</ p>
</ section>
< section id = " tab-logs" class = " card hide" >
< h2>
< span class = " sub" >
</ span>
< span style = " flex : 1 " >
</ span>
< button class = " btn-ghost" onclick = " loadLogs ( ) " >
</ button>
</ h2>
< div class = " log-box" id = " logs-box" >
</ div>
</ section>
</ main>
< div class = " toast" id = " toast" >
</ div>
< script>
const $ = id => document . getElementById ( id) ;
let currentTab = 'accounts' ;
let logTimer = null ;
let bridgeAuto = true ;
let BRIDGE_PORT = 0 ;
let BRIDGE_START = '—' ;
function toast ( msg, isErr ) {
const t = $ ( 'toast' ) ;
t. textContent = msg;
t. className = 'toast show' + ( isErr ? ' err' : '' ) ;
setTimeout ( ( ) => t. className = 'toast' , 2600 ) ;
}
async function api ( path, opts ) {
const r = await fetch ( path, opts) ;
const data = await r. json ( ) . catch ( ( ) => ( { } ) ) ;
if ( ! r. ok ) throw new Error ( data. error || ( 'HTTP ' + r. status ) ) ;
return data;
}
function fmtTs ( ts ) {
if ( ! ts) return '—' ;
const d = new Date ( typeof ts === 'number' ? ts * 1000 : ts) ;
return isNaN ( d) ? String ( ts) : d. toLocaleString ( 'ru-RU' ) ;
}
function statusBadge ( st ) {
const map = { ok : [ '✓ ok' , 'ok' ] , failed : [ '✗ failed' , 'failed' ] ,
unknown : [ '? unknown' , 'unknown' ] ,
available : [ '✓ доступна (free)' , 'ok' ] , verified : [ '✅ verified' , 'ok' ] ,
paid : [ '💰 только платно' , 'warn' ] ,
downgraded : [ '⚠️ downgraded' , 'warn' ] , dead : [ '❌ dead' , 'failed' ] ,
exhausted : [ '🔋 исчерпан' , 'failed' ] ,
alive : [ '✓ alive' , 'ok' ] , cooldown : [ '⏳ cooldown' , 'warn' ] } ;
const [ label, cls] = map[ st] || [ st || '?' , 'unknown' ] ;
return ` <span class="badge ${ cls} "> ${ label} </span> ` ;
}
function esc ( s ) {
return String ( s ?? '' ) . replace ( / [ &<>"'] / g ,
c => ( { '&' : '&' , '<' : '<' , '>' : '>' , '"' : '"' , "'" : ''' } [ c] ) ) ;
}
const DATA = { accounts : [ ] , models : [ ] , limits : [ ] , limitModels : [ ] , bridge : [ ] } ;
const SORT = { } ;
function setSort ( table, key ) {
const cur = SORT [ table] ;
SORT [ table] = { k : key, dir : ( cur && cur. k === key) ? - cur. dir : - 1 } ;
renderTable ( table) ;
}
function sortRows ( rows, table, getters ) {
const s = SORT [ table] ;
if ( ! s || ! getters[ s. k ] ) return rows;
const get = getters[ s. k ] ;
return [ ... rows] . sort ( ( a, b ) => {
let x = get ( a) , y = get ( b) ;
if ( x === null || x === undefined ) x = '' ;
if ( y === null || y === undefined ) y = '' ;
if ( typeof x === 'number' && typeof y === 'number' ) return ( x - y) * s. dir ;
return String ( x) . localeCompare ( String ( y) , 'ru' ) * s. dir ;
} ) ;
}
function th ( table, key, label, title ) {
const s = SORT [ table] ;
const mark = ( s && s. k === key) ? ( s. dir < 0 ? ' ▾' : ' ▴' ) : '' ;
return ` <th class="sortable" onclick="setSort(' ${ table} ',' ${ key} ')" title=" ${ esc ( title || 'сортировать' ) } "> ${ label} ${ mark} </th> ` ;
}
function renderTable ( table ) {
if ( table === 'accounts' ) renderAccounts ( ) ;
else if ( table === 'models' ) renderModels ( ) ;
else if ( table === 'limits' ) renderLimits ( ) ;
else if ( table === 'limitModels' ) renderLimitModels ( ) ;
else if ( table === 'bridge' ) renderBridge ( ) ;
}
async function refreshSummary ( ) {
try {
const s = await api ( '/api/summary' ) ;
$ ( 'svc-dot' ) . className = 'pulse-dot' ;
$ ( 'svc-status' ) . textContent = 'панель жива' ;
$ ( 'ver' ) . textContent = 'v' + ( s. version || '?' ) ;
$ ( 'hdr-total' ) . textContent = s. counts ?. total ?? '0' ;
$ ( 'hdr-ok' ) . textContent = s. counts ?. ok ?? '0' ;
$ ( 'hdr-failed' ) . textContent = s. counts ?. failed ?? '0' ;
$ ( 'hdr-unknown' ) . textContent = s. counts ?. unknown ?? '0' ;
if ( s. service ) {
$ ( 'svc-name' ) . textContent = s. service ;
$ ( 'svc-service' ) . textContent = s. service ;
document . title = s. service + ' — панель' ;
}
const b = s. bridge || { } ;
if ( b. port ) BRIDGE_PORT = b. port ;
if ( b. start ) BRIDGE_START = b. start ;
$ ( 'bridge-port-label' ) . textContent = b. port ? ':' + b. port : '' ;
$ ( 'pool-bridge-sub' ) . textContent = b. port ? ` 127.0.0.1: ${ b. port } ` : 'мост не задан' ;
$ ( 'bridge-badge' ) . className = 'badge ' + ( b. alive ? 'ok' : 'failed' ) ;
$ ( 'bridge-badge' ) . textContent = b. alive ? 'жив' : 'нет' ;
const lr = s. last_run || { } ;
$ ( 'hdr-lastrun' ) . textContent = lr. started_at
? ` ${ fmtTs ( lr. started_at ) } — ${ lr. status } ( ${ lr. ok } / ${ lr. total } ) ` : '—' ;
} catch ( e) {
$ ( 'svc-dot' ) . className = 'pulse-dot offline' ;
$ ( 'svc-status' ) . textContent = 'нет связи' ;
}
}
async function refreshJob ( ) {
try {
const j = await api ( '/api/job' ) ;
const running = j. status === 'running' ;
$ ( 'job-tag' ) . textContent = j. status || 'idle' ;
$ ( 'job-nums' ) . textContent = ` ${ j. done || 0 } / ${ j. total || 0 } ` ;
$ ( 'job-fill' ) . style . width = j. total ? Math . round ( 100 * ( j. done || 0 ) / j. total ) + '%' : '0%' ;
$ ( 'btn-stop' ) . classList . toggle ( 'hide' , ! running) ;
$ ( 'btn-run' ) . disabled = running;
$ ( 'btn-run-par' ) . disabled = running;
if ( j. last_error && ! running) $ ( 'job-tag' ) . textContent = j. status + ' ⚠' ;
const c = j. current ;
const line = $ ( 'job-step-line' ) ;
const workersBox = $ ( 'job-workers' ) ;
const currents = ( j. currents || [ ] ) . filter ( Boolean ) ;
if ( running && currents. length > 1 ) {
line. classList . add ( 'hide' ) ;
workersBox. classList . remove ( 'hide' ) ;
workersBox. innerHTML = currents. map ( ( w, i ) => {
if ( ! w || w. done ) return ` <div class="worker-row"><span class="w-name">w ${ i+ 1 } </span><span class="w-label">—</span></div> ` ;
const pct = w. step ? Math . round ( 100 * w. step / ( w. steps_total || 6 ) ) : 0 ;
return ` <div class="worker-row"><span class="w-name">w ${ i+ 1 } </span>
<span class="w-label">акк ${ w. index || '?' } · ${ w. step || 0 } / ${ w. steps_total || 6 } : ${ esc ( w. label || '' ) } </span>
<div class="step-bar-wrap"><div class="step-bar-fill" style="width: ${ pct} %"></div></div></div> ` ;
} ) . join ( '' ) ;
} else if ( running && c && c. step > 0 ) {
workersBox. classList . add ( 'hide' ) ;
line. classList . remove ( 'hide' ) ;
$ ( 'job-step-text' ) . textContent =
` акк ${ c. index } / ${ j. total } · шаг ${ c. step } / ${ c. steps_total } : ${ c. label } ` ;
$ ( 'job-step-fill' ) . style . width = Math . round ( 100 * c. step / ( c. steps_total || 6 ) ) + '%' ;
} else {
line. classList . add ( 'hide' ) ;
workersBox. classList . add ( 'hide' ) ;
}
} catch ( e) { }
}
async function startRegister ( parallel ) {
const count = parseInt ( $ ( 'count' ) . value || '1' , 10 ) ;
const workers = parallel ? parseInt ( $ ( 'workers' ) . value || '1' , 10 ) : 1 ;
try {
const r = await api ( '/api/register' , {
method : 'POST' , headers : { 'Content-Type' : 'application/json' } ,
body : JSON . stringify ( { count, workers} )
} ) ;
toast ( 'Прогон запущен: ' + r. job_id ) ;
refreshJob ( ) ;
} catch ( e) { toast ( e. message , true ) ; }
}
async function stopJob ( ) {
try {
await api ( '/api/job/stop' , { method : 'POST' , headers : { 'Content-Type' : 'application/json' } , body : '{}' } ) ;
toast ( 'Стоп запрошен — ждём конца шага' ) ;
refreshJob ( ) ;
} catch ( e) { toast ( e. message , true ) ; }
}
function copyKey ( el, key ) {
navigator . clipboard . writeText ( key) . then ( ( ) => {
const old = el. textContent ;
el. textContent = '✓ скопировано' ;
el. classList . add ( 'copied' ) ;
setTimeout ( ( ) => { el. textContent = old; el. classList . remove ( 'copied' ) ; } , 1200 ) ;
} ) . catch ( ( ) => toast ( 'clipboard недоступен' , true ) ) ;
}
async function loadAccounts ( ) {
try {
const rows = await api ( '/api/accounts' ) ;
DATA . accounts = rows;
$ ( 'tab-count-accounts' ) . textContent = rows. length || '' ;
renderAccounts ( ) ;
} catch ( e) { toast ( e. message , true ) ; }
}
function renderAccounts ( ) {
const hideEx = $ ( 'hide-exhausted' ) && $ ( 'hide-exhausted' ) . checked ;
let all = DATA . accounts ;
if ( hideEx) all = all. filter ( a => ! a. exhausted ) ;
const rows = sortRows ( all, 'accounts' , {
email : a => a. email , status : a => a. status , free : a => ( a. free_tier_enabled ? 1 : 0 ) ,
requests : a => ( a. requests || 0 ) , used : a => ( a. requests || 0 ) ,
created : a => ( a. created_at || '' ) ,
exhausted : a => ( a. exhausted ? 1 : 0 ) ,
} ) ;
const exN = DATA . accounts . filter ( a => a. exhausted ) . length ;
$ ( 'accounts-sub' ) . textContent = DATA . accounts . length
? ( hideEx && exN ? ` показано: ${ rows. length } из ${ DATA . accounts . length } (скрыто исчерпанных: ${ exN} ) `
: ` всего: ${ DATA . accounts . length } ` )
: 'нет аккаунтов' ;
const tb = $ ( 'accounts-tbody' ) ;
if ( ! rows. length ) {
tb. innerHTML = '<tr><td colspan="7" class="empty">Аккаунтов пока нет — запусти регистрацию</td></tr>' ;
return ;
}
tb. innerHTML = rows. map ( ( a, i ) => {
const key = a. api_key || '' ;
const short = key ? esc ( key. slice ( 0 , 18 ) ) + '…' + esc ( key. slice ( - 6 ) ) : '—' ;
const used = a. requests || 0 ;
const rem = a. remaining_usd ;
const note = a. exhausted
? ` 🔋 исчерпан ${ a. reset_at ? ', сброс ' + String ( a. reset_at ) . slice ( 0 , 10 ) : '' } `
: ( used ? used + ' запр.' + ( rem != null ? ` , остаток $ ${ Number ( rem) . toFixed ( 4 ) } ` : '' ) : esc ( a. note || '' ) ) ;
return ` <tr ${ a. exhausted ? ' style="opacity:.55"' : '' } >
<td class="mono"> ${ i + 1 } </td>
<td class="mono"> ${ esc ( a. email ) } </td>
<td> ${ statusBadge ( a. exhausted ? 'exhausted' : a. status ) } </td>
<td> ${ key ? ` <span class="key-cell" title=" ${ esc ( key) } ;
} ) . join ( '' ) ;
}
async function checkAccounts ( ) {
$ ( 'btn-check' ) . disabled = true ;
try {
const r = await api ( '/api/accounts/check' , { method : 'POST' , headers : { 'Content-Type' : 'application/json' } , body : '{}' } ) ;
toast ( r. background ? ` Фоновая перепроверка ${ r. total } ключей… ` : ` Перепроверено: ${ r. checked } ` ) ;
setTimeout ( loadAccounts, r. background ? 8000 : 500 ) ;
} catch ( e) { toast ( e. message , true ) ; }
finally { $ ( 'btn-check' ) . disabled = false ; }
}
async function loadModels ( ) {
try {
const d = await api ( '/api/models' ) ;
DATA . models = d. models || [ ] ;
$ ( 'tab-count-models' ) . textContent = DATA . models . length || '' ;
$ ( 'models-sub' ) . textContent = 'источник: ' + ( d. source || '?' ) ;
renderModels ( ) ;
} catch ( e) { toast ( e. message , true ) ; }
}
function renderModels ( ) {
const rows = sortRows ( DATA . models , 'models' , {
id : m => m. id ,
name : m => ( m. name || '' ) ,
status : m => ( m. status === 'available' ? 0 : 1 ) ,
note : m => ( m. note || '' ) ,
} ) ;
const tb = $ ( 'models-tbody' ) ;
if ( ! rows. length ) { tb. innerHTML = '<tr><td colspan="5" class="empty">Список пуст</td></tr>' ; return ; }
tb. innerHTML = rows. map ( m => ` <tr>
<td class="mono"> ${ esc ( m. id ) } </td>
<td> ${ esc ( m. name || '' ) } </td>
<td> ${ statusBadge ( m. status ) } </td>
<td style="font-size:11px;color:var(--text-muted)"> ${ esc ( m. note || '' ) } </td>
<td class="mono" style="font-size:11px"> ${ m. last_checked ? esc ( m. last_checked ) : '—' ) . join ( '' ) ;
}
async function loadCaptcha ( ) {
try {
const c = await api ( '/api/captcha' ) ;
$ ( 'captcha-kv' ) . innerHTML = `
<dt>Провайдер</dt><dd>${esc(c.provider)}</dd>
<dt>Camoufox (бесплатный путь)</dt><dd>${c.configured ? '<span class="badge ok">✓ найден</span>' : '<span class="badge failed">✗ нет</span>'} ${esc(c.camoufox_python || '')}</dd>
<dt>CapSolver (fallback)</dt><dd>${c.capsolver_configured ? '<span class="badge ok">✓ ключ задан</span>' : '<span class="badge unknown">— не задан</span>'}</dd>
<dt>Баланс</dt><dd>${c.balance ?? 'н/д'}</dd> ` ;
$ ( 'captcha-note' ) . textContent = c. note || '' ;
} catch ( e) { toast ( e. message , true ) ; }
}
async function loadPool ( ) {
try {
const p = await api ( '/api/pool' ) ;
const b = p. bridge || { } ;
let html = ` <span class="badge ${ b. alive ? 'ok' : 'failed' } ">мост : ${ b. port } — ${ b. alive ? 'жив' : 'недоступен' } </span> ` ;
if ( p. counts ) {
html += ` <span class="badge ok">alive ${ p. counts . alive } </span>
<span class="badge warn">cooldown ${ p. counts . cooldown } </span>
<span class="badge failed">dead ${ p. counts . dead } </span>
<span class="badge unknown">всего ${ p. counts . total } </span> ` ;
if ( p. refill != null ) html += ` <span class="badge unknown">refill: ${ esc ( JSON . stringify ( p. refill ) ) } </span> ` ;
} else {
html += ` <span style="color:var(--text-muted)"> ${ esc ( p. note || '' ) } </span> ` ;
}
$ ( 'pool-summary' ) . innerHTML = html;
const keys = Object . entries ( p. keys || { } ) ;
$ ( 'pool-table' ) . classList . toggle ( 'hide' , ! keys. length ) ;
$ ( 'pool-tbody' ) . innerHTML = keys. map ( ( [ k, v] ) => {
const short = k. length > 30 ? esc ( k. slice ( 0 , 18 ) ) + '…' + esc ( k. slice ( - 6 ) ) : esc ( k) ;
const details = Object . entries ( v) . filter ( ( [ f] ) => f !== 'status' )
. map ( ( [ f, val] ) => ` ${ f} = ${ typeof val === 'object' ? JSON . stringify ( val) : val} ` ) . join ( ' ' ) ;
return ` <tr><td class="mono" style="font-size:11px"> ${ short} </td>
<td> ${ statusBadge ( ( v. status || '' ) . toLowerCase ( ) ) } </td>
<td class="mono" style="font-size:11px;color:var(--text-muted)"> ${ esc ( details) } </td></tr> ` ;
} ) . join ( '' ) ;
} catch ( e) { toast ( e. message , true ) ; }
}
async function loadConnect ( ) {
let port = BRIDGE_PORT ;
try {
const s = await api ( '/api/summary' ) ;
const b = s. bridge || { } ;
if ( b. port ) port = b. port ;
$ ( 'connect-bridge-status' ) . innerHTML =
` <span class="badge ${b.alive ? 'ok' : 'failed'}">мост :${port} — ${b.alive ? 'жив' : 'не запущен'}</span> ` ;
} catch ( e) { }
const base = ` http://127.0.0.1: ${ port} /v1 ` ;
$ ( 'connect-baseurl' ) . textContent = base;
$ ( 'connect-baseurl' ) . setAttribute ( 'onclick' , ` copyKey(this, ' ${ base} ') ` ) ;
$ ( 'connect-bridge-start' ) . textContent = BRIDGE_START ;
let model = '<model>:free' ;
try {
const m = await api ( '/api/models' ) ;
const free = ( m. models || [ ] ) . filter ( x => ( x. id || '' ) . endsWith ( ':free' ) ) . map ( x => x. id ) ;
$ ( 'connect-models' ) . textContent = free. length ? free. join ( ', ' ) : '—' ;
if ( free. length ) model = free[ 0 ] ;
} catch ( e) { $ ( 'connect-models' ) . textContent = '—' ; }
const cli = ` BaseUrl: ${ base} \nApiKey: <любая непустая строка>\nModelID: ${ model} ` ;
const curl = ` curl ${ base} /chat/completions \\\n -H "Content-Type: application/json" \\\n -d '{"model":" ${ model} ","messages":[{"role":"user","content":"hi"}],"max_tokens":20}' ` ;
const py = ` from openai import OpenAI\nclient = OpenAI(base_url=" ${ base} ", api_key="<любая непустая строка>")\nr = client.chat.completions.create(model=" ${ model} ",\n messages=[{"role": "user", "content": "hi"}])\nprint(r.choices[0].message.content) ` ;
$ ( 'snip-cli' ) . textContent = cli;
$ ( 'snip-curl' ) . textContent = curl;
$ ( 'snip-py' ) . textContent = py;
}
function fmtClock ( ts ) {
if ( ! ts) return '—' ;
const d = new Date ( typeof ts === 'number' ? ts * 1000 : ts) ;
return isNaN ( d) ? String ( ts) : d. toLocaleTimeString ( 'ru-RU' ) ;
}
function fmtAgo ( ts ) {
if ( ! ts) return '' ;
const sec = Math . max ( 0 , Math . round ( Date . now ( ) / 1000 - ( typeof ts === 'number' ? ts : Date . parse ( ts) / 1000 ) ) ) ;
if ( sec < 60 ) return ` ${ sec} с назад ` ;
if ( sec < 3600 ) return ` ${ Math . round ( sec / 60 ) } м назад ` ;
return ` ${ Math . round ( sec / 3600 ) } ч назад ` ;
}
async function loadLimitsStatus ( ) {
let s;
try { s = await api ( '/api/limits/status' ) ; } catch ( e) { return ; }
const running = ! ! s. running ;
$ ( 'limits-status-badge' ) . innerHTML = running
? ` <span class="badge warn">⟳ сбор квот ${ s. done || 0 } / ${ s. total || 0 } </span> `
: ` <span class="badge ok">квоты актуальны</span> ` ;
const bits = [ ] ;
bits. push ( ` <span>обновлено: <strong class="mono"> ${ fmtClock ( s. finished_at ) } </strong></span> ` ) ;
if ( s. interval_sec ) bits. push ( ` <span>фон-сбор: каждые ${ Math . round ( s. interval_sec / 60 ) } мин</span> ` ) ;
if ( running) {
const pct = s. total ? Math . round ( 100 * ( s. done || 0 ) / s. total ) : 0 ;
bits. push ( ` <span class="badge warn">идёт сбор ${ s. done || 0 } / ${ s. total || 0 } ( ${ pct} %)</span> ` ) ;
} else if ( s. skipped ) {
bits. push ( ` <span class="badge unknown">пропуск: ${ esc ( s. skipped ) } </span> ` ) ;
} else if ( s. next_run_at ) {
bits. push ( ` <span>следующий: <strong class="mono"> ${ fmtClock ( s. next_run_at ) } </strong></span> ` ) ;
}
if ( s. error ) bits. push ( ` <span class="badge failed">ошибка: ${ esc ( s. error ) } </span> ` ) ;
$ ( 'limits-live' ) . innerHTML = bits. join ( '' ) ;
}
async function loadLimits ( ) {
try {
const d = await api ( '/api/limits' ) ;
const t = d. totals || { } ;
const usd = ( t. usd || 0 ) ;
const est = t. usd_per_account_est ;
const fmtN = n => ( n === null || n === undefined ) ? '—' : Number ( n) . toLocaleString ( 'ru-RU' ) ;
const burntTok = t. total_tokens || 0 ;
const leftTok = t. tokens_remaining_est ;
const leftUsd = t. usd_remaining_est ;
const spentPct = ( est && t. accounts )
? Math . min ( 100 , Math . round ( 100 * usd / ( est * t. accounts ) ) ) : null ;
$ ( 'limits-dashboard' ) . innerHTML = `
<div class="dash-cell"><div class="lbl">Сожжено токенов</div>
<div class="val">${fmtN(burntTok)}</div>
<div class="sub">${fmtN(t.requests)} запросов</div></div>
<div class="dash-cell ok"><div class="lbl">Ещё можно сжечь</div>
<div class="val">${fmtN(leftTok)}</div>
<div class="sub">токенов (оценка)</div></div>
<div class="dash-cell warn"><div class="lbl">Сожжено $</div>
<div class="val">$${usd.toFixed(4)}</div>
<div class="sub">по прайсу (list-price)</div></div>
<div class="dash-cell ${leftUsd !== null && leftUsd !== undefined && leftUsd < 1 ? 'hot' : 'ok'}">
<div class="lbl">Осталось $</div>
<div class="val">${leftUsd === null || leftUsd === undefined ? '—' : '$' + leftUsd.toFixed(4)}</div>
<div class="sub">${est ? `лимит ~$${est}/акк` : 'лимит не измерен'}</div></div>
<div class="dash-cell"><div class="lbl">Аккаунты</div>
<div class="val">${t.alive || 0}<span style="font-size:13px;color:var(--text-muted)">/${t.accounts || 0}</span></div>
<div class="sub">${t.exhausted || 0} исчерпано · ${t.free_accounts || 0} с free</div></div>
<div class="dash-cell"><div class="lbl">Сверка с сервером</div>
<div class="val" style="font-size:15px">${d.checked_at ? fmtClock(d.checked_at) : 'не делалась'}</div>
<div class="sub">${d.checked_at ? fmtAgo(d.checked_at) : 'кнопкой «Сверить с сервером»'} · расход и так живой</div></div>
${spentPct !== null ? `<div class="dash-cell ${spentPct > 80 ? 'hot' : 'ok'}">
<div class="lbl">Израсходовано лимита</div>
<div class="val">${spentPct}%</div>
<div class="sub">${t.avg_usd_per_1k_tokens ? `~$${t.avg_usd_per_1k_tokens}/1K токенов` : ''}</div></div>` : ''} ` ;
$ ( 'limits-summary' ) . innerHTML =
` <span class="badge ok">аккаунтов ${t.accounts || 0}</span>
<span class="badge ok">с free-tier ${t.free_accounts || 0}</span>
<span class="badge ${t.exhausted ? 'failed' : 'ok'}">исчерпано ${t.exhausted || 0}</span>
<span class="badge unknown">запросов ${t.requests || 0}</span>
<span class="badge unknown">токенов ${fmtN(burntTok)}</span>
<span class="badge warn">$${usd.toFixed(4)}</span>
<span style="color:var(--text-muted);font-size:11px">${t.local_ledger ? 'учёт локальный (леджер моста)' : 'квоты с сервера'} · сверка: ${d.checked_at ? fmtTs(d.checked_at) : 'не делалась'}</span> ` ;
DATA . limits = d. accounts || [ ] ;
DATA . limitsMeta = { ma : d. models_available || { } , b : d. billing || { } } ;
renderLimits ( ) ;
loadLimitsStatus ( ) ;
loadModelCosts ( ) ;
} catch ( e) { toast ( e. message , true ) ; }
}
function renderLimits ( ) {
const rows = sortRows ( DATA . limits , 'limits' , {
email : r => r. email ,
status : r => ( r. exhausted ? 1 : 0 ) ,
used : r => ( r. exhausted ? 1 : 0 ) ,
req_used : r => ( r. req_used ?? - 1 ) ,
tokens : r => ( r. total_tokens || 0 ) ,
usd : r => ( r. usd || 0 ) ,
pct : r => ( r. used_pct ?? - 1 ) ,
models : r => ( r. models || [ ] ) . length ,
reset : r => ( r. reset_at || '' ) ,
} ) ;
$ ( 'limits-tbody' ) . innerHTML = rows. length ? rows. map ( ( r, i ) => {
const models = ( r. models || [ ] ) . length ;
const status = r. error ? ` <span class="badge failed" title=" ${ esc ( r. error ) } ">ошибка</span> `
: ( r. exhausted ? '<span class="badge failed">исчерпан</span>'
: '<span class="badge ok">свободен</span>' ) ;
const toks = r. total_tokens ? r. total_tokens . toLocaleString ( 'ru-RU' ) : '0' ;
const req = ( r. req_used === null || r. req_used === undefined ) ? '—' : r. req_used ;
const usdCell = r. usd ? '$' + r. usd . toFixed ( 5 ) : '—' ;
const pct = ( r. used_pct === null || r. used_pct === undefined ) ? '—' : r. used_pct + '%' ;
const reset = r. reset_at ? String ( r. reset_at ) . slice ( 0 , 10 ) : '—' ;
return ` <tr>
<td class="mono"> ${ i + 1 } </td>
<td class="mono" style="font-size:11px"> ${ esc ( r. email ) } </td>
<td> ${ status} </td>
<td class="mono"> ${ req} </td>
<td class="mono"> ${ toks} </td>
<td class="mono"> ${ usdCell} </td>
<td class="mono"> ${ pct} </td>
<td class="mono" title=" ${ esc ( ( r. models || [ ] ) . join ;
} ) . join ( '' ) : '<tr><td colspan="9" class="empty">данных пока нет — расход появится после запросов через мост</td></tr>' ;
const meta = DATA . limitsMeta || { ma : { } , b : { } } ;
const ma = meta. ma , b = meta. b ;
$ ( 'limits-note' ) . innerHTML = 'Доступные модели: ' +
( Object . keys ( ma) . length
? Object . entries ( ma) . map ( ( [ m, n] ) => ` <span class="badge ok"> ${ esc ( m) } × ${ n} </span> ` ) . join ( ' ' )
: '—' ) +
` <br><b>Тарификация:</b> лимит считается в <b> ${ esc ( b. unit || '$' ) } </b> по прайсу, ` +
` не в токенах и не в запросах. Период — ${ esc ( b. period || '' ) } . ` +
` При исчерпании: ${ esc ( b. on_exhausted || '' ) } .<br> ` +
` <span style="color:var(--text-muted)"> ${ esc ( b. note || '' ) } </span> ` ;
}
async function loadModelCosts ( ) {
try {
const d = await api ( '/api/limits/models' ) ;
DATA . limitModels = d. models || [ ] ;
renderLimitModels ( ) ;
} catch ( e) { }
}
function renderLimitModels ( ) {
const rows = sortRows ( DATA . limitModels , 'limitModels' , {
model : m => m. model , requests : m => ( m. requests || 0 ) ,
tokens : m => ( m. total_tokens || 0 ) , usd : m => ( m. usd || 0 ) ,
price_in : m => ( m. usd_per_1m_in ?? 0 ) , price_out : m => ( m. usd_per_1m_out ?? 0 ) ,
per_allowance : m => ( m. tokens_per_allowance || 0 ) ,
} ) ;
$ ( 'limits-models-tbody' ) . innerHTML = rows. length ? rows. map ( m => ` <tr>
<td class="mono" style="font-size:11px"> ${ esc ( m. model ) } </td>
<td class="mono"> ${ m. requests } </td>
<td class="mono"> ${ ( m. total_tokens || 0 ) . toLocaleString ( 'ru-RU' ) } </td>
<td class="mono">$ ${ ( m. usd || 0 ) . toFixed ( 5 ) } </td>
<td class="mono"> ${ m. usd_per_1m_in != null m ) . join ( '' ) : '<tr><td colspan="7" class="empty">нет запросов через мост</td></tr>' ;
}
async function checkLimits ( ) { try {
const r = await api ( '/api/limits/check' , { method : 'POST' } ) ;
if ( r. started ) {
toast ( 'сбор квот запущен — обновится через ~30с' ) ;
setTimeout ( loadLimits, 20000 ) ;
setTimeout ( loadLimits, 45000 ) ;
}
} catch ( e) { toast ( e. message , true ) ; }
}
function bridgeTimerStart ( ) {
clearInterval ( logTimer) ;
logTimer = bridgeAuto ? setInterval ( loadBridge, 5000 ) : null ;
const btn = $ ( 'btn-bridge-auto' ) ;
if ( btn) {
btn. textContent = bridgeAuto ? '⏸ авто-обновление: вкл' : '▶ авто-обновление: выкл' ;
btn. style . color = bridgeAuto ? '' : 'var(--warn)' ;
}
const sub = $ ( 'bridge-sub' ) ;
if ( sub) sub. textContent = bridgeAuto
? 'апстрим → статус, скорость, ошибки (авто 5с)'
: 'апстрим → статус, скорость, ошибки (авто выключено)' ;
}
function toggleBridgeAuto ( ) {
bridgeAuto = ! bridgeAuto;
if ( currentTab === 'bridge' ) bridgeTimerStart ( ) ;
else {
const btn = $ ( 'btn-bridge-auto' ) ;
if ( btn) {
btn. textContent = bridgeAuto ? '⏸ авто-обновление: вкл' : '▶ авто-обновление: выкл' ;
btn. style . color = bridgeAuto ? '' : 'var(--warn)' ;
}
}
toast ( bridgeAuto ? 'авто-обновление моста включено' : 'авто-обновление моста выключено' ) ;
}
async function loadBridge ( ) {
try {
const d = await api ( '/api/bridge/requests?tail=60' ) ;
const s = d. stats || { } ;
const b = d. bridge || { } ;
$ ( 'bridge-status-badge' ) . innerHTML = b. alive
? '<span class="badge ok">мост жив</span>' : '<span class="badge failed">мост не отвечает</span>' ;
$ ( 'bridge-stats' ) . innerHTML =
` <span class="badge ok">показано ${s.shown || 0}</span>
<span class="badge ${s.errors ? 'failed' : 'ok'}">ошибок ${s.errors || 0}</span>
<span class="badge unknown">avg ${s.avg_ms != null ? s.avg_ms + ' мс' : '—'}</span>
<span class="badge ${s.p95_ms > 20000 ? 'warn' : 'unknown'}">p95 ${s.p95_ms != null ? s.p95_ms + ' мс' : '—'}</span>
<span class="badge warn">макс ${s.slowest_ms != null ? s.slowest_ms + ' мс' : '—'}</span> ` ;
const rows = d. requests || [ ] ;
DATA . bridge = rows;
DATA . bridgeStats = s;
renderBridge ( ) ;
} catch ( e) { }
try {
const l = await api ( '/api/bridge/logs?tail=120' ) ;
const box = $ ( 'bridge-log' ) ;
const atBottom = box. scrollHeight - box. scrollTop - box. clientHeight < 40 ;
box. textContent = ( l. lines || [ ] ) . join ( '\n' ) || '(пусто)' ;
if ( atBottom) box. scrollTop = box. scrollHeight ;
} catch ( e) { }
const up = $ ( 'bridge-updated' ) ;
if ( up) up. textContent = 'обновлено: ' + new Date ( ) . toLocaleTimeString ( 'ru-RU' ) ;
}
function renderBridge ( ) {
const rows = sortRows ( DATA . bridge , 'bridge' , {
ts : r => ( r. ts || '' ) , model : r => ( r. model || '' ) ,
key : r => ( r. key || '' ) , status : r => ( r. status ?? 0 ) ,
latency : r => ( r. latency_ms || 0 ) , tokens : r => ( r. tokens || 0 ) ,
usd : r => ( r. usd || 0 ) ,
} ) ;
$ ( 'bridge-tbody' ) . innerHTML = rows. length ? rows. map ( r => {
const okSt = typeof r. status === 'number' && r. status >= 200 && r. status < 300 ;
const stCls = okSt ? 'ok' : ( r. status === 429 ? 'warn' : 'failed' ) ;
const slow = r. latency_ms > 20000 ? 'style="color:#fbbf24"' : '' ;
return ` <tr>
<td class="mono" style="font-size:11px"> ${ esc ( ( r. ts || '' ) . slice ( 11 , 19 ) ) } </td>
<td class="mono" style="font-size:11px"> ${ esc ( r. model || '?' ) } </td>
<td class="mono" style="font-size:11px"> ${ esc ( r. key || '' ) } …</td>
<td><span class="badge ${ stCls} "> ${ r. status ?? ;
} ) . join ( '' ) : '<tr><td colspan="7" class="empty">запросов через мост ещё не было</td></tr>' ;
}
async function loadLogs ( ) {
try {
const d = await api ( '/api/logs?tail=200' ) ;
const box = $ ( 'logs-box' ) ;
const atBottom = box. scrollHeight - box. scrollTop - box. clientHeight < 40 ;
box. textContent = ( d. lines || [ ] ) . join ( '\n' ) || '(пусто)' ;
if ( atBottom) box. scrollTop = box. scrollHeight ;
} catch ( e) { }
}
function showTab ( name ) {
currentTab = name;
document . querySelectorAll ( 'nav.tabs-nav button' ) . forEach ( b =>
b. classList . toggle ( 'active' , b. dataset . tab === name) ) ;
[ 'accounts' , 'models' , 'limits' , 'captcha' , 'pool' , 'bridge' , 'connect' , 'logs' ] . forEach ( t =>
$ ( 'tab-' + t) . classList . toggle ( 'hide' , t !== name) ) ;
clearInterval ( logTimer) ;
logTimer = null ;
if ( name === 'accounts' ) loadAccounts ( ) ;
if ( name === 'models' ) loadModels ( ) ;
if ( name === 'limits' ) { loadLimits ( ) ; logTimer = setInterval ( loadLimits, 5000 ) ; }
if ( name === 'captcha' ) loadCaptcha ( ) ;
if ( name === 'pool' ) loadPool ( ) ;
if ( name === 'bridge' ) { loadBridge ( ) ; bridgeTimerStart ( ) ; }
if ( name === 'connect' ) loadConnect ( ) ;
if ( name === 'logs' ) { loadLogs ( ) ; logTimer = setInterval ( loadLogs, 5000 ) ; }
}
refreshSummary ( ) ; refreshJob ( ) ; loadAccounts ( ) ;
setInterval ( ( ) => { refreshSummary ( ) ; refreshJob ( ) ; } , 5000 ) ;
setInterval ( ( ) => { if ( currentTab === 'accounts' ) loadAccounts ( ) ; } , 30000 ) ;
</ script>
</ body>
</ html>
" onclick='copyKey(this,
${ JSON . stringify ( key) }
)'>
${ short}
</span>
`
:
'—'
}
</td>
<td>
${ a. free_tier_enabled ? '<span style="color:var(--ok)">✓</span>' : '<span style="color:var(--bad)">✗</span>' }
</td>
<td class="mono" style="font-size:11px">
${ esc ( a. created_at || '—' ) }
</td>
<td style="font-size:11px;color:var(--text-muted)">
${ note}
</td>
</tr>
`
}
</td>
</tr>
`
(
', '
)
)
}
">
${ models ? models + ' шт' : '—' }
</td>
<td class="mono" style="font-size:11px">
${ reset}
</td>
</tr>
`
?
'$'
+
.
usd_per_1m_in
:
'—'
}
</td>
<td class="mono">
${ m. usd_per_1m_out != null ? '$' + m. usd_per_1m_out : '—' }
</td>
<td class="mono">
${ m. tokens_per_allowance ? m. tokens_per_allowance . toLocaleString ( 'ru-RU' ) : '—' }
</td>
</tr>
`
'—'
}
</span></td>
<td class="mono"
${ slow}
>
${ r. latency_ms != null ? r. latency_ms + ' мс' : '—' }
</td>
<td class="mono">
${ r. tokens || 0 }
</td>
<td class="mono">
${ r. usd ? '$' + Number ( r. usd ) . toFixed ( 5 ) : '—' }
</td>
</tr>
`