mgmt.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>OCB Management Panel</title>
  5. <link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
  6. <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
  7. </head>
  8. <script src="/static/mgmtpanel.js"></script>
  9. <div class="navbar">
  10. <div class="tab">
  11. <button class="tablinks" onclick="window.open('{{ url_for('web_panels.mgmtqueue') }}', '_blank')">Rewards Queue Management</button>
  12. <button class="tablinks" data-tab="managerewards" onclick="openTab(event, 'managerewards')">Rewards</button>
  13. <button class="tablinks" data-tab="categories" onclick="openTab(event, 'categories')">Categories</button>
  14. <button class="tablinks" data-tab="accounts" onclick="openTab(event, 'accounts')">Manage Accounts</button>
  15. <button class="tablinks" data-tab="announcements" onclick="openTab(event, 'announcements')">Announcements</button>
  16. <button class="tablinks" data-tab="todolist" onclick="openTab(event, 'todolist')">To-Do List</button>
  17. <button class="tablinks" data-tab="alerts" onclick="openTab(event, 'alerts')">Alerts</button>
  18. <button class="tablinks" data-tab="settings" onclick="openTab(event, 'settings')">Settings</button>
  19. {% if kofi_integration %}
  20. <button class="tablinks" data-tab="kofi-settings" onclick="openTab(event, 'kofi-settings')">Kofi Settings</button>
  21. {% endif %}
  22. </div>
  23. <img src="/static/img/ownchatbotwide.png">
  24. </div>
  25. <div id='managerewards' class="tabcontent">
  26. <h3>Manage Rewards</h3>
  27. <body>
  28. <div>
  29. <h4>Reward Types:</h4>
  30. <ul>
  31. <li><u>Redeems</u> are standard stream point rewards. They get added to the queue for the streamer to fulfill.</li>
  32. <li><u>Specials</u> are redeems, but they run system commands and scripts. This enables you to integrate a lot of other fun things, such as letting your viewers control lighting, activate devices, trigger webhooks, etc. Specials do not go into the queue, because they happen automagically.</li>
  33. <ul>
  34. <li>Be careful with this one. It does require some more advanced scripting/command line knowledge. Make sure you test your specials before letting viewers use them.</li>
  35. </ul>
  36. <li><u>Votes</u> are just that, votes. Your viewers can vote on them.</li>
  37. <li><u>Goals</u> are rewards that everyone in chat can contribute to. The streamer fulfills the reward when the goal is reached.</li>
  38. <li>Add rewards to categories to enable and disable groups of rewards.</li>
  39. <li>Rewards with no categories are inactive.</li>
  40. </ul>
  41. </div>
  42. <table>
  43. <tr>
  44. <td>
  45. </td>
  46. <td>
  47. </td>
  48. <td>
  49. </td>
  50. <td>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td>
  55. <a href="{{ url_for('web_panels.add', reward_type='redeem') }}"><button class="button button2" onclick="openTab(event, 'managerewards')">Create a Redeem</button></a><br>
  56. </td>
  57. <td>
  58. <a href="{{ url_for('web_panels.add', reward_type='special') }}"><button class="button button2" onclick="openTab(event, 'managerewards')">Create a Special</button></a><br>
  59. </td>
  60. <td>
  61. <a href="{{ url_for('web_panels.add', reward_type='vote') }}"><button class="button button2" onclick="openTab(event, 'managerewards')">Create a Vote</button></a><br>
  62. </td>
  63. <td>
  64. <a href="{{ url_for('web_panels.add', reward_type='goal') }}"><button class="button button2" onclick="openTab(event, 'managerewards')">Create a Goal</button></a><br>
  65. </td>
  66. </tr>
  67. </table>
  68. <br>
  69. {% if rewards %}
  70. Rewards in <span style="color: red !important;">red</span> are inactive. To activate a reward, add it to an active category.
  71. <table>
  72. <thead>
  73. <tr>
  74. <th style="width:15%">Name</th>
  75. <th>Target</th>
  76. <th>Price</th>
  77. <th>Info</th>
  78. <th>Cool down</th>
  79. <th>Category</th>
  80. <th style="width:15%">Actions</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. {% for reward, reward_info in rewards.items() %}
  85. {% if reward in active_rewards %}
  86. <tr>
  87. {% else %}
  88. <tr style="color: red;">
  89. {% endif %}
  90. <td>{{ prefix }}{{ reward }}</td>
  91. {% if reward_info["type"] == "goal" %}
  92. <td>{{ reward_info["target"] }}</td>
  93. {% else %}
  94. <td>N/A</td>
  95. {% endif %}
  96. {% if reward_info["type"] == "goal" %}
  97. <td>N/A</td>
  98. {% else %}
  99. <td>{{ reward_info["price"] }}</td>
  100. {% endif %}
  101. <td>{{ reward_info["info"] }}</td>
  102. {% if reward_info["cooldown"] > 0 %}
  103. {% set minutes_label = 'minute' if reward_info["cooldown"] == 1 else 'minutes' %}
  104. <td>{{ reward_info["cooldown"] }} {{ minutes_label }}</td>
  105. {% else %}
  106. <td>None</td>
  107. {% endif %}
  108. <td>{{ reward_info["categories"] | join(', ') }}</td>
  109. <td>
  110. <a href="{{ url_for('web_panels.edit', reward_name=reward) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: green;">Edit</span></button></a>&nbsp
  111. <a href="{{ url_for('web_panels.delete', reward_name=reward) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: red;">Delete</span></button></a>&nbsp
  112. {% if reward_info["type"] == "goal" or reward_info["type"] == "vote" %}
  113. <a href="{{ url_for('web_panels.reset', reward_name=reward, reward_type=reward_info["type"]) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: orange;">Reset</span></button></a>
  114. {% endif %}
  115. </td>
  116. </tr>
  117. {% endfor %}
  118. </tbody>
  119. </table>
  120. {% endif %}
  121. </body>
  122. </div>
  123. <div id='accounts' class="tabcontent">
  124. <body>
  125. <h3>Manage Viewer Accounts</h3>
  126. {% if users %}
  127. To merge an account with a temporary account: Copy the email address from the temporary account, click "edit" next to the account you want to merge, paste the email address into that account, click "save".<br><br>
  128. <table>
  129. <thead>
  130. <tr>
  131. <th>User</th>
  132. <th>Points balance</th>
  133. <th>Email</th>
  134. <th>Authed</th>
  135. <th></th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. {% for user in users %}
  140. <tr>
  141. {% if not user[1] %}
  142. <td style="color: green;"> Temporary Account </td>
  143. {% else %}
  144. <td> {{ user[1] }} </td>
  145. {% endif %}
  146. {% set points_label = 'point' if user[2] == 1 else 'points' %}
  147. <td>{{ user[2] }} {{ points_label }}</td>
  148. {% if user[4] %}
  149. {% if not user[1] %}
  150. <td style="color: green;">{{ user[4] }}</td>
  151. {% else %}
  152. <td>{{ user[4] }}</td>
  153. {% endif %}
  154. {% else %}
  155. <td>none</td>
  156. {% endif %}
  157. {% if user[3] %}
  158. <td>Yes</td>
  159. {% else %}
  160. <td>No</td>
  161. {% endif %}
  162. <td> <a href="/mgmt/edit_account/{{ user[0] }}?name={{ user[1] }}&points={{ user[2] }}&email={{ user[4] }}"><button class="button button2" onclick="openTab(event, 'panel')">Edit</button></a> </td>
  163. </tr>
  164. {% endfor %}
  165. </tbody>
  166. </table>
  167. {% endif %}
  168. </body>
  169. </div>
  170. <div id='categories' class="tabcontent">
  171. <body>
  172. <h3>Manage Categories</h3>
  173. <div>
  174. &nbsp;&nbsp;<a href="{{ url_for('web_panels.add', reward_type='category') }}"><button class="button button2" onclick="openTab(event, 'categories')">Create a new category</button></a><br>
  175. <table>
  176. <thead>
  177. <tr>
  178. <th style="width: 50%;"><h3>Active Categories</h3></th>
  179. <th style="width: 50%;"><h3>Inactive Categories</h3></th>
  180. </tr>
  181. </thead>
  182. <tbody>
  183. <tr>
  184. <td>
  185. {% for cat in active_categories %}
  186. &nbsp;&nbsp;{{ cat }} - <a href="/mgmt/deactivate/{{ cat }}"><span style="color: green;">Deactivate</span></a>&nbsp;<a href="/mgmt/delcat/{{ cat }}/active"><span style="color: red;">Delete</span></a><br>
  187. {% endfor %}
  188. </td>
  189. <td>
  190. {% for cat in inactive_categories %}
  191. &nbsp;&nbsp;{{ cat }} - <a href="/mgmt/activate/{{ cat }}"><span style="color: green;">Activate</span></a>&nbsp;<a href="/mgmt/delcat/{{ cat }}/inactive"><span style="color: red;">Delete</span></a><br>
  192. {% endfor %}
  193. </td>
  194. </tr>
  195. </tbody>
  196. </table>
  197. </div>
  198. </body>
  199. </div>
  200. <div id='announcements' class="tabcontent">
  201. <body>
  202. <form method="POST" action="/mgmt/announcements">
  203. <table>
  204. <h3>Manage Announcements</h3>
  205. <table>
  206. <thead>
  207. <tr style="border-bottom: none;">
  208. <th style="width: 20%;"></th>
  209. <th style="width: 50%;"></th>
  210. <th></th>
  211. </tr>
  212. </thead>
  213. <tr>
  214. <td> <label for="announce_enable">Enable:</label> </td>
  215. {% if settings_info[9] %}
  216. <td> <input type="checkbox" name="announce_enable" value="{{ settings_info[9] }}" checked> </td>
  217. {% else %}
  218. <td> <input type="checkbox" name="announce_enable" value="{{ settings_info[9] }}"> </td>
  219. {% endif %}
  220. <td>Enable periodic announcements</td>
  221. </tr>
  222. <tr>
  223. <td> <label for="announce_interval">Interval:</label> </td>
  224. <td> <input type="number" name="announce_interval" value="{{ settings_info[10] }}" size="2" required> minutes</td>
  225. <td>How long between each announcement?</td>
  226. </tr>
  227. <tr>
  228. <td> <label for="announcements">Announcements:</label> </td>
  229. <td>
  230. <textarea name="announcements" rows="5" cols="50">{{ announcements | join('\n') }}</textarea>
  231. </td>
  232. <td>Enter your announcements, one per line. May contain html <a href=https://www.w3schools.com/tags/tag_img.asp>IMG tags</a> to display images.</td>
  233. </tr>
  234. </table>
  235. <br><button class="button button2" type="submit">Save Changes</button><br>
  236. </form>
  237. <br><br>
  238. </body>
  239. </div>
  240. <div id='settings' class="tabcontent">
  241. <body style="text-align: left;">
  242. <form method="POST" action="/mgmt/settings">
  243. <table>
  244. <h3>OwnchatBot Settings</h3>
  245. <thead>
  246. <tr style="border-bottom: none;">
  247. <th style="width: 20%;"></th>
  248. <th></th>
  249. <th style="width: 50%;"></th>
  250. </tr>
  251. </thead>
  252. <tr>
  253. <td> <label for="points_interval">Points Interval:</label> </td>
  254. <td> <input type="number" name="points_interval" value="{{ settings_info[1] }}" size="5" required> minutes</td>
  255. <td>How often do you want to award your viewers points?</td>
  256. </tr>
  257. <tr>
  258. <td> <label for="points_award">Points Award:</label> </td>
  259. <td> <input type="number" name="points_award" value="{{ settings_info[2] }}" size="5" required> points</td>
  260. <td>How many points do you want to award them?</td>
  261. </tr>
  262. <tr>
  263. <td> <label for="gunicorn_logging">Gunicorn Logging:</label> </td>
  264. {% if settings_info[3] %}
  265. <td> <input type="checkbox" name="gunicorn_logging" value="{{ settings_info[3] }}" checked> </td>
  266. {% else %}
  267. <td> <input type="checkbox" name="gunicorn_logging" value="{{ settings_info[3] }}"> </td>
  268. {% endif %}
  269. <td>Enable Gunicorn logging integration.</td>
  270. </tr>
  271. <tr>
  272. <td> <label for="prefix">Chat Command Prefix:</label> </td>
  273. <td> <input type="text" name="prefix" maxlength="1" size="1" value="{{ settings_info[4] }}" required> </td>
  274. <td>Character that preceeds chat commands, so OwnchatBot knows what to look for.<br>Example: "{{ settings_info[4] }}points"</td>
  275. </tr>
  276. </table>
  277. <h3>Owncast Integration</h3>
  278. <table>
  279. <thead>
  280. <tr style="border-bottom: none;">
  281. <th style="width: 20%;"></th>
  282. <th></th>
  283. <th style="width: 50%;"></th>
  284. </tr>
  285. </thead>
  286. <tr>
  287. <td> <label for="access_id">Access Token Name:</label> </td>
  288. <td style="padding: 5px;"> <input type="text" name="access_id" value="{{ settings_info[0] }}" size="40"> </td>
  289. <td>Create in Owncast Admin panel. Integrations -> Access Tokens (check all three boxes)</td>
  290. </tr>
  291. <tr>
  292. <td> <label for="access_token">Access Token:</label> </td>
  293. <td style="padding: 5px;"> <input type="password" name="access_token" value="{{ settings_info[5] }}" size="40"> </td>
  294. <td>The token you created above.</td>
  295. </tr>
  296. <tr>
  297. <td> <label for="owncast_url">Your Owncast URL:</label> </td>
  298. <td> <input type="text" name="owncast_url" value="{{ settings_info[6] }}" size="40"> </td>
  299. <td>The external URL of your Owncast instance, with "http://" or "https://".</td>
  300. </tr>
  301. </table>
  302. <h3>Kofi Integration</h3>
  303. <table>
  304. <thead>
  305. <tr style="border-bottom: none;">
  306. <th style="width: 20%;"></th>
  307. <th></th>
  308. <th style="width: 50%;"></th>
  309. </tr>
  310. </thead>
  311. <tr>
  312. <td> <label for="kofi_integration">Enable:</label> </td>
  313. {% if settings_info[8] %}
  314. <td> <input type="checkbox" name="kofi_integration" value="{{ settings_info[8] }}" checked> </td>
  315. <td>Enable Ko-fi integration.</td>
  316. {% else %}
  317. <td> <input type="checkbox" name="kofi_integration" value="{{ settings_info[8] }}"> </td>
  318. <td>Enable Ko-fi integration. ("Kofi Settings" button will appear in the navigation bar when enabled.)</td>
  319. {% endif %}
  320. </tr>
  321. <tr>
  322. <td> <label for="kofi_token">Verification Token:</label> </td>
  323. <td style="padding: 5px;"> <input type="password" name="kofi_token" value="{{ settings_info[7] }}" size="40"> </td>
  324. <td>Get from Kofi -> More -> API -> Webhooks -> Advanced -> Verification Token.</td>
  325. </tr>
  326. </table>
  327. <br><button class="button button2" type="submit">Save Changes</button><br>
  328. </form>
  329. <br><br>
  330. </body>
  331. </div>
  332. <div id='kofi-settings' class="tabcontent">
  333. <body style="text-align: left;">
  334. <form method="POST" action="/mgmt/ksettings">
  335. <table>
  336. <h3>Kofi Settings</h3>
  337. <h4> Donations </h4>
  338. <thead>
  339. <tr style="border-bottom: none;">
  340. <th style="width: 20%;"></th>
  341. <th></th>
  342. <th style="width: 50%;"></th>
  343. </tr>
  344. </thead>
  345. <tr>
  346. <td> <label for="enable_donations">Enable points for donations:</label> </td>
  347. {% if kofi_settings['donations'] %}
  348. <td> <input type="checkbox" name="enable_donations" value="{{ kofi_settings['donations'] }}" checked> </td>
  349. {% else %}
  350. <td> <input type="checkbox" name="enable_donations" value="{{ kofi_settings['donations'] }}"> </td>
  351. {% endif %}
  352. <td>Enable awarding points for donations</td>
  353. </tr>
  354. <tr>
  355. <td> <label for="set_donation_points">Points per dollar:</label> </td>
  356. <td> <input type="number" name="set_donation_points" value="{{ kofi_settings['donation_points'] }}" size="5" required> points</td>
  357. <td>How many points should viewers recieve, for every dollar they donate?</td>
  358. </tr>
  359. <tr>
  360. <td> <label for="kofi_url">Kofi Page:</label> </td>
  361. <td style="padding: 5px;"> <input type="text" name="kofi_url" value="{{ kofi_settings['kofi_url'] }}" size="30"> </td>
  362. <td>What is your Kofi page URL?</td>
  363. </tr>
  364. <tr>
  365. <table>
  366. <h4> Subscriptions </h4>
  367. <tbody>
  368. <tr>
  369. <td> <label for="enable_subs">Enable points for subscriptions:</label> </td>
  370. {% if kofi_settings['subs'] %}
  371. <td> <input type="checkbox" name="enable_subs" value="{{ kofi_settings['subs'] }}" checked> </td>
  372. {% else %}
  373. <td> <input type="checkbox" name="enable_subs" value="{{ kofi_settings['subs'] }}"> </td>
  374. {% endif %}
  375. <td>Enable awarding points for monthly subscriptions</td>
  376. </tr>
  377. <tr>
  378. <td> <label for="sub_points">Points per month:</label> </td>
  379. <td> <input type="number" name="sub_points" value="{{ kofi_settings['sub_points'] }}" size="6" required> points</td>
  380. <td>How many points should subscribers recieve every month?</td>
  381. </tr>
  382. </tbody>
  383. </table>
  384. </tr>
  385. </table>
  386. <br><button class="button button2" type="submit">Save Changes</button><br>
  387. </form>
  388. <br><br>
  389. </body>
  390. </div>
  391. <div id='todolist' class="tabcontent">
  392. <script>
  393. function focusInput() { // Function to focus on the input field
  394. document.getElementById('itemInput').focus();
  395. }
  396. </script>
  397. <body onload="focusInput()">
  398. <h1>To-Do List</h1>
  399. <form id="todo-item-form" method="POST" onsubmit="focusInput()" action="/mgmt/addtodoitem">
  400. <input type="text" id="itemInput" name="item" placeholder="Add a new item">
  401. <button id="todo-item-form" class="button button2" type="submit">Add</button>
  402. </form>
  403. <ul>
  404. {% if items %}
  405. {% for item in items %}
  406. {% if item.crossed == 'no' %}
  407. <li style="text-decoration:none;">
  408. {{ item.name }}
  409. <a href="{{ url_for('web_panels.cross', item_id=loop.index0) }}">[Cross Off]</a>&nbsp;<span style="color: red;"><a href="{{ url_for('web_panels.rem_todo_item', item_id=loop.index0) }}">[Remove]</a></span>
  410. </li>
  411. {% else %}
  412. <li> <span style="text-decoration:line-through;">
  413. {{ item.name }}</span>
  414. <a href="{{ url_for('web_panels.uncross', item_id=loop.index0) }}">[Un-Cross]</a>&nbsp;<span style="color: red;"><a href="{{ url_for('web_panels.rem_todo_item', item_id=loop.index0) }}">[Remove]</a></span>
  415. </li>
  416. {% endif %}
  417. {% endfor %}
  418. {% endif %}
  419. </ul>
  420. <form action="/mgmt/clearlist" method="get" style="display: inline;">
  421. <button class="button button2" type="submit" class="button">Clear List</button>
  422. </form>
  423. <br><br>
  424. </div>
  425. <div id='alerts' class="tabcontent">
  426. <body>
  427. <h2>Customize Your Alerts</h2>
  428. <table>
  429. <thead>
  430. <tr style="border-bottom: none;">
  431. <th style="width: 20%;">Type</th>
  432. <th style="width: 20%;">Image</th>
  433. <th></th>
  434. <th style="width: 15%;"></th>
  435. <th style="width: 25%;">Browser Source</th>
  436. </tr>
  437. </thead>
  438. <tr>
  439. <form id="nf_upload" action="/mgmt/alertupload/FOLLOWER_ALERT" method="post" enctype="multipart/form-data">
  440. <td>New Follower:</td>
  441. {% set follower_alert = alerts_dict["FOLLOWER_ALERT"] %}
  442. {% if follower_alert %}
  443. {% if "webm" in follower_alert %}
  444. <td><video height="100" autoplay loop><source src="{{ url_for('web_panels.assets', asset_name=follower_alert) }}" type="video/webm"></video></td>
  445. {% else %}
  446. <td><img src="{{ url_for('web_panels.assets', asset_name=follower_alert) }}"></td>
  447. {% endif %}
  448. {% else %}
  449. <td>Empty</td>
  450. {% endif %}
  451. <td><input type="file" name="FOLLOWER_ALERT" accept=".gif, .jpg, .jpeg, .png, .webm" required></td>
  452. <td><button id="nf_upload" class="button button2" type="submit">Upload</button>
  453. </form>&nbsp
  454. <a href="{{ url_for('web_panels.del_alert', alert_type='FOLLOWER_ALERT') }}"><button class="button button2" onclick="openTab(event, 'alerts')"><span style="color: red;">Clear</span></button></a></td>
  455. <td>/alert/follower</td>
  456. </tr>
  457. <tr>
  458. <form id="nms_upload" action="/mgmt/alertupload/MILESTONE_ALERT" method="post" enctype="multipart/form-data">
  459. <td>Milestone Reached:</td>
  460. {% set milestone_alert = alerts_dict["MILESTONE_ALERT"] %}
  461. {% if milestone_alert %}
  462. {% if "webm" in milestone_alert %}
  463. <td><video height="100" autoplay loop><source src="{{ url_for('web_panels.assets', asset_name=milestone_alert) }}" type="video/webm"></video></td>
  464. {% else %}
  465. <td><img src="{{ url_for('web_panels.assets', asset_name=milestone_alert) }}"></td>
  466. {% endif %}
  467. {% else %}
  468. <td>Empty</td>
  469. {% endif %}
  470. <td><input type="file" name="MILESTONE_ALERT" accept=".gif, .jpg, .jpeg, .png, .webm" required></td>
  471. <td><button id="nms_upload" class="button button2" type="submit">Upload</button></form>&nbsp
  472. <a href="{{ url_for('web_panels.del_alert', alert_type='MILESTONE_ALERT') }}"><button class="button button2" onclick="openTab(event, 'alerts')"><span style="color: red;">Clear</span></button></a></td>
  473. <td>/alert/milestone</td>
  474. </tr>
  475. <tr>
  476. <form id="ng_upload" action="/mgmt/alertupload/GOAL_ALERT" method="post" enctype="multipart/form-data">
  477. <td>Goal Reached:</td>
  478. {% set goal_alert = alerts_dict["GOAL_ALERT"] %}
  479. {% if goal_alert %}
  480. {% if "webm" in goal_alert %}
  481. <td><video height="100" autoplay loop><source src="{{ url_for('web_panels.assets', asset_name=goal_alert) }}" type="video/webm"></video></td>
  482. {% else %}
  483. <td><img src="{{ url_for('web_panels.assets', asset_name=goal_alert) }}"></td>
  484. {% endif %}
  485. {% else %}
  486. <td>Empty</td>
  487. {% endif %}
  488. <td><input type="file" name="GOAL_ALERT" accept=".gif, .jpg, .jpeg, .png, .webm" required></td>
  489. <td><button id="ng_upload" class="button button2" type="submit">Upload</button></form>&nbsp
  490. <a href="{{ url_for('web_panels.del_alert', alert_type='GOAL_ALERT') }}"><button class="button button2" onclick="openTab(event, 'alerts')"><span style="color: red;">Clear</span></button></a></td>
  491. <td>/alert/goal</td>
  492. </tr>
  493. </table>
  494. </body>
  495. </div>
  496. <br><br>
  497. </html>