forked from NicoRuizDev/Better-Dashactyl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.html
234 lines (228 loc) · 17.4 KB
/
install.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<script src="https://cdn.tailwindcss.com"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<title>Dashactyl - Installation</title>
<div class="bg-[#252931]">
<h1 class="text-3xl text-center font-bold underline pt-6 text-white">
Welcome to the Dashactyl Installation page.
</h1>
<br />
<p class="text-center text-white">Please follow out the following information. They are all required fields.</p>
<div id="install_div" class="flex justify-center" style="display: 'none'">
<div class="rounded-xl bg-gradient-to-r p-2 sm:p-6 mt-8 w-1/2">
<form id="installForm">
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="host_name"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="host_name"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Host Name
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="application_url"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="application_url"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Application URL
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="pterodactyl_url"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="pterodactyl_url"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Pterodactyl URL
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="pterodactyl_key"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="pterodactyl_key"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Pterodactyl Key
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="discord_invite"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="discord_invite"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Server Invite
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="discord_id"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="discord_id"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Application Client ID
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="discord_secret"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="discord_secret"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Application Client Secret
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="discord_token"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="discord_token"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Bot Token
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="discord_webhook"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" "/>
<label for="discord_webhook"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Webhook (OPTIONAL)
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="discord_guild"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="discord_guild"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Server ID
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="registered_role"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="registered_role"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Discord Registered Role ID
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="afk_interval"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="afk_interval"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
AFK Interval (in minutes)
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="afk_coins"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="afk_coins"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
AFK Coins
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="arcio_code"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="arcio_code"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
Arc.io code
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="ram_price"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="ram_price"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
1MB Ram Price
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="cpu_price"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="cpu_price"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
1% CPU Price
</label>
</div>
<div class="relative z-0 w-full mb-6 group">
<input type="text" name="disk_price"
class="block py-2.5 px-0 w-full text-sm text-white bg-transparent border-0 border-b-2 border-gray-300 appearance-none focus:outline-none focus:ring-0 focus:border-blue-600 peer"
placeholder=" " required />
<label for="disk_price"
class="peer-focus:font-medium absolute text-sm text-[#0050ff] duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">
1 MB Disk Price
</label>
</div>
<p class="text-white">If anythings have to be change, connect to your mongodb on Compass and navigate to Dashactyl-V2 DB. Bext scroll down to settings and edit the config.</p>
<button type="submit"
class="ml-96 text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
Install
</button>
</form>
</div>
</div>
</div>
<script>
$.fn.serializeObject = function () {
var o = {};
var a = this.serializeArray();
$.each(a, function () {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
</script>
<script>
$('#installForm').submit(async function (e) {
e.preventDefault();
const values = $(this).serializeObject();
$.ajax({
type: 'POST', url: '/install', data: { data: JSON.stringify(values) }
}).done(function (response) {
if (!response.error) {
if (response.success === true) {
return Swal.fire({
title: 'Success!',
text: 'Installation was successful!',
icon: 'success',
confirmButtonText: 'OK'
}).then(() => {
window.location.href = '/login';
});
} else {
return Swal.fire({
title: 'Error!',
text: 'Installation was not successful! Error: Unknown',
icon: 'error',
confirmButtonText: 'OK'
});
}
} else {
return Swal.fire({
title: 'Error!',
text: 'Installation was not successful! Error: ' + response.error,
icon: 'error',
confirmButtonText: 'OK'
});
}
})
});
</script>