Repository navigation
Expand file tree
/
Copy pathadvanced.html
More file actions
159 lines (143 loc) · 5.98 KB
/
Copy pathadvanced.html
File metadata and controls
159 lines (143 loc) · 5.98 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
{{@include("header", it)/}}
<div class="row justify-content-md-center">
<div class="col-lg-10 col-xl-8">
<div class="alert alert-info text-center" role="alert">
<span class="font-weight-bold">
This is a page exclusively for advanced users. <br>
Do not expect any support in our Discord if you mess with something on this page.
</span>
<br>
This is also an undocumented feature for a reason: nothing here is expected to work properly and things might be added or removed for any reason.
</div>
</div>
</div>
<div class="row justify-content-md-center">
<div class="col-lg-8 col-xl-6 mw-col6">
<div class="card card-accent-danger" style="min-height: 160px;">
<div class="card-header font-weight-bold">Random buttons, knobs and data:</div>
<div class="card-body text-center">
<!-- Verbosity -->
<span class="text-muted">
With verbosity enabled, you will see more detailed information on the terminal. <br>
Good to help getting information on errors. <br>
</span>
{{@if(it.verbosityEnabled)}}
<button class="btn btn-md btn-danger mt-2" onclick="doChangeVerbosity(false)">
Disable Verbosity
</button>
{{#else}}
<button class="btn btn-md btn-success mt-2" onclick="doChangeVerbosity(true)">
Enable Verbosity
</button>
{{/if}}
<hr>
<!-- Profile Monitor -->
<span class="text-muted">
This will execute the profiler in the Monitor for 5 seconds. <br>
Required the Server to be started for showing the profiler URL. <br>
</span>
<button class="btn btn-md btn-outline-dark mt-2" onclick="doProfileMonitor()">Profile Monitor</button>
</div>
</div>
<div class="text-center">
<img src="img/not-meme.jpg" alt="Not A Meme" class="img-fluid" style="max-width: 350px;">
</div>
</div>
<div class="col-lg-8 col-xl-6 mw-col6 text-center">
<div class="form-group row justify-content-center">
<div class="col-sm-3">
<input class="form-control" type="text" id="magicActionInput" value="perform_magic">
</div>
<button class="btn btn-md btn-outline-dark" onclick="doMagicTrick()">Magic Button</button>
</div>
<pre class="alert alert-secondary mt-2 text-left" id="magicPre">What will happen when its pressed?!</pre>
</div>
</div>
<div class="row justify-content-md-center">
</div>
{{@include("footer", it)/}}
<script>
//============================================== Magic
function doMagicTrick(){
let data = {
action: document.getElementById('magicActionInput').value.trim(),
parameter: false
}
const magicPre = document.getElementById("magicPre");
magicPre.innerText = 'doing magic';
const notify = $.notify({ message: '<p class="text-center">Performing Magic...</p>' }, {});
txAdminAPI({
type: "POST",
url: '/advanced',
timeout: REQ_TIMEOUT_LONG,
data: data,
success: function (data) {
if(data.type === 'success'){
notify.update('progress', 0);
notify.update('type', 'success');
notify.update('message', 'Check the magic box below...');
magicPre.innerText = data.message;
}else{
notify.update('progress', 0);
notify.update('type', data.type);
notify.update('message', data.message);
}
},
error: function (xmlhttprequest, textstatus, message) {
notify.update('progress', 0);
notify.update('type', 'danger');
notify.update('message', message);
}
});
}
//============================================== Verbosity
function doChangeVerbosity(desiredState) {
let data = {
action: 'change_verbosity',
parameter: desiredState
}
const notify = $.notify({ message: '<p class="text-center">Executing Command...</p>' }, {});
txAdminAPI({
type: "POST",
url: '/advanced',
data: data,
success: function (data) {
if(data.refresh === true){
window.location.reload(true);
}else{
notify.update('progress', 0);
notify.update('type', data.type);
notify.update('message', data.message);
}
},
error: function (xmlhttprequest, textstatus, message) {
notify.update('progress', 0);
notify.update('type', 'danger');
notify.update('message', message);
}
});
}
//============================================== Profiler
function doProfileMonitor() {
let data = {
action: 'profile_monitor',
parameter: false
}
const notify = $.notify({ message: '<p class="text-center">Executing Command...</p>' }, {});
txAdminAPI({
type: "POST",
url: '/fxserver/commands',
data: data,
success: function (data) {
notify.update('progress', 0);
notify.update('type', data.type);
notify.update('message', data.message);
},
error: function (xmlhttprequest, textstatus, message) {
notify.update('progress', 0);
notify.update('type', 'danger');
notify.update('message', message);
}
});
}
</script>