parent
6bd2b56919
commit
ba80ac8d2a
|
@ -0,0 +1,21 @@
|
|||
buildOptions = function(field,possiblities){
|
||||
if(!field)console.error('field',field)
|
||||
var fieldElement = ''
|
||||
possiblities.forEach(function(option){
|
||||
if(option.optgroup){
|
||||
fieldElement += '<optgroup label="' + option.name + '">'
|
||||
fieldElement += buildOptions(field,option.optgroup)
|
||||
fieldElement += '</optgroup>'
|
||||
}else{
|
||||
var selected = ''
|
||||
if(option.value === field.default){
|
||||
selected = 'selected'
|
||||
}
|
||||
fieldElement += '<option value="' + option.value + '" ' + selected + '>' + option.name + '</option>'
|
||||
}
|
||||
})
|
||||
return fieldElement
|
||||
}
|
||||
module.exports = {
|
||||
buildOptions: buildOptions
|
||||
}
|
|
@ -12,6 +12,7 @@ var cors = require('cors')
|
|||
var proxy = httpProxy.createProxyServer({})
|
||||
var ejs = require('ejs');
|
||||
var fileupload = require("express-fileupload");
|
||||
var fieldBuild = require('./fieldBuild');
|
||||
module.exports = function(s,config,lang,app,io){
|
||||
const {
|
||||
ptzControl,
|
||||
|
@ -44,6 +45,7 @@ module.exports = function(s,config,lang,app,io){
|
|||
passables.originalURL = s.getOriginalUrl(req)
|
||||
passables.baseUrl = req.protocol+'://'+req.hostname
|
||||
passables.config = s.getConfigWithBranding(req.hostname)
|
||||
passables.fieldBuild = fieldBuild
|
||||
res.render(paths,passables,callback)
|
||||
}
|
||||
//child node proxy check
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"cws": "^2.0.0",
|
||||
"digest-fetch": "^1.2.1",
|
||||
"discord.js": "^12.2.0",
|
||||
"ejs": "^2.7.4",
|
||||
"ejs": "^3.1.9",
|
||||
"express": "^4.17.1",
|
||||
"express-fileupload": "^1.4.0",
|
||||
"form-data": "^4.0.0",
|
||||
|
@ -2288,6 +2288,21 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
|
@ -2965,10 +2980,15 @@
|
|||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||
},
|
||||
"node_modules/ejs": {
|
||||
"version": "2.7.4",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz",
|
||||
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==",
|
||||
"hasInstallScript": true,
|
||||
"version": "3.1.9",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz",
|
||||
"integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==",
|
||||
"dependencies": {
|
||||
"jake": "^10.8.5"
|
||||
},
|
||||
"bin": {
|
||||
"ejs": "bin/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
@ -3529,6 +3549,33 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/filelist": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",
|
||||
"integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==",
|
||||
"dependencies": {
|
||||
"minimatch": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/filelist/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/filelist/node_modules/minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||
|
@ -4065,6 +4112,14 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
|
@ -4725,6 +4780,23 @@
|
|||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"node_modules/jake": {
|
||||
"version": "10.8.7",
|
||||
"resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz",
|
||||
"integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==",
|
||||
"dependencies": {
|
||||
"async": "^3.2.3",
|
||||
"chalk": "^4.0.2",
|
||||
"filelist": "^1.0.4",
|
||||
"minimatch": "^3.1.2"
|
||||
},
|
||||
"bin": {
|
||||
"jake": "bin/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/js-sdsl": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-2.1.4.tgz",
|
||||
|
@ -7271,6 +7343,17 @@
|
|||
"resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/tarn": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz",
|
||||
|
@ -9888,6 +9971,15 @@
|
|||
"traverse": ">=0.3.0 <0.4"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
|
@ -10414,9 +10506,12 @@
|
|||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||
},
|
||||
"ejs": {
|
||||
"version": "2.7.4",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz",
|
||||
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA=="
|
||||
"version": "3.1.9",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz",
|
||||
"integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==",
|
||||
"requires": {
|
||||
"jake": "^10.8.5"
|
||||
}
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
|
@ -10825,6 +10920,32 @@
|
|||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
|
||||
"integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
|
||||
},
|
||||
"filelist": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz",
|
||||
"integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==",
|
||||
"requires": {
|
||||
"minimatch": "^5.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
||||
"requires": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||
|
@ -11223,6 +11344,11 @@
|
|||
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
|
||||
"integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||
},
|
||||
"has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
|
@ -11707,6 +11833,17 @@
|
|||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"jake": {
|
||||
"version": "10.8.7",
|
||||
"resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz",
|
||||
"integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==",
|
||||
"requires": {
|
||||
"async": "^3.2.3",
|
||||
"chalk": "^4.0.2",
|
||||
"filelist": "^1.0.4",
|
||||
"minimatch": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"js-sdsl": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-2.1.4.tgz",
|
||||
|
@ -13665,6 +13802,14 @@
|
|||
"resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
|
||||
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"tarn": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz",
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"cws": "^2.0.0",
|
||||
"digest-fetch": "^1.2.1",
|
||||
"discord.js": "^12.2.0",
|
||||
"ejs": "^2.7.4",
|
||||
"ejs": "^3.1.9",
|
||||
"express": "^4.17.1",
|
||||
"express-fileupload": "^1.4.0",
|
||||
"form-data": "^4.0.0",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="apple-mobile-web-app-title" content="Shinobi">
|
||||
<% include header-favicon.ejs %>
|
||||
<%- include('header-favicon'); %>
|
||||
<meta name="application-name" content="Shinobi"/>
|
||||
<meta name="msapplication-TileColor" content="#333333" />
|
||||
<meta name="msapplication-TileImage" content="libs/img/icon/mstile-144x144.png" />
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<body class="bg-darker">
|
||||
<% include home/menuFirst.ejs %>
|
||||
<%- include('home/menuFirst'); %>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<% include home/menuSide.ejs %>
|
||||
<%- include('home/menuSide'); %>
|
||||
<main id="pageTabContainer" class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
||||
<% (config.webBlocksPreloaded).forEach(function(block){ %>
|
||||
<%- include(__dirname + '/web/pages/blocks/' +block + '.ejs') %>
|
||||
|
|
|
@ -8,18 +8,13 @@
|
|||
</div>
|
||||
<%
|
||||
const details = $user.details
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Account Settings'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Account Settings'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<%
|
||||
include stickySubmitBar.ejs
|
||||
%>
|
||||
<% Object.keys(define['Account Settings'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Account Settings'].blocks[blockKey],
|
||||
details: details
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<%- include('stickySubmitBar'); %>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<main class="container page-tab pt-3" id="tab-apiKeys">
|
||||
<div class="dark row" id="apis">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['API Keys'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['API Keys'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['API Keys'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['API Keys'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3" id="tab-calendarView">
|
||||
<div class="row <%- define.Theme.isDark ? `dark` : '' %>">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Calendar'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['Calendar'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Calendar'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Calendar'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/vendor/fullcalendar.min.css">
|
||||
<script src="<%-window.libURL%>assets/vendor/js/fullcalendar.min.js"></script>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<main class="container page-tab pt-3" id="tab-cameraProbe">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Camera Probe'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Camera Probe'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Camera Probe'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Camera Probe'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3 dark" id="tab-configFinder">
|
||||
<div class="row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Montior Configuration Finder'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Montior Configuration Finder'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Montior Configuration Finder'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Montior Configuration Finder'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<% window.additionalJsScripts.push('assets/js/bs5.configFinder.js') %>
|
||||
</main>
|
||||
|
|
|
@ -1,69 +1,51 @@
|
|||
<%
|
||||
buildOptions = function(field,possiblities){
|
||||
if(!field)console.error('field',field)
|
||||
var fieldElement = ''
|
||||
possiblities.forEach(function(option){
|
||||
if(option.optgroup){
|
||||
fieldElement += '<optgroup label="' + option.name + '">'
|
||||
fieldElement += buildOptions(field,option.optgroup)
|
||||
fieldElement += '</optgroup>'
|
||||
}else{
|
||||
var selected = ''
|
||||
if(option.value === field.default){
|
||||
selected = 'selected'
|
||||
}
|
||||
fieldElement += '<option value="' + option.value + '" ' + selected + '>' + option.name + '</option>'
|
||||
}
|
||||
})
|
||||
return fieldElement
|
||||
}
|
||||
drawBlock = function(monitorSettings){
|
||||
if(monitorSettings.evaluation && !eval(monitorSettings.evaluation)){
|
||||
drawBlock = function(theBlock){
|
||||
if(theBlock.evaluation && !eval(theBlock.evaluation)){
|
||||
return
|
||||
}
|
||||
var attributes = []
|
||||
var styles = []
|
||||
var sectionClass = []
|
||||
var headerTitle = monitorSettings.headerTitle || lang[monitorSettings.name] || monitorSettings.name
|
||||
if(monitorSettings.hidden === true){
|
||||
var headerTitle = theBlock.headerTitle || lang[theBlock.name] || theBlock.name
|
||||
if(theBlock.hidden === true){
|
||||
styles.push('display:none')
|
||||
}
|
||||
if(monitorSettings.style){
|
||||
styles.push(monitorSettings.style)
|
||||
if(theBlock.style){
|
||||
styles.push(theBlock.style)
|
||||
}
|
||||
if(monitorSettings.isSection === true){
|
||||
if(theBlock.isSection === true){
|
||||
attributes.push('section')
|
||||
}
|
||||
if(monitorSettings.attribute){
|
||||
attributes.push(monitorSettings.attribute)
|
||||
if(theBlock.attribute){
|
||||
attributes.push(theBlock.attribute)
|
||||
}
|
||||
if(!monitorSettings.noId && !monitorSettings.id && monitorSettings.name){
|
||||
var userSettingsId = monitorSettings.name.replace(/[^a-zA-Z ]/g, '').replace(/[^a-zA-Z ]/g, '').replace(/ /g, '')
|
||||
monitorSettings.id = userSettingsId
|
||||
if(!theBlock.noId && !theBlock.id && theBlock.name){
|
||||
var userSettingsId = theBlock.name.replace(/[^a-zA-Z ]/g, '').replace(/[^a-zA-Z ]/g, '').replace(/ /g, '')
|
||||
theBlock.id = userSettingsId
|
||||
}
|
||||
if(monitorSettings.id)attributes.push(`id="${monitorSettings.id}"`);
|
||||
if(monitorSettings.color){
|
||||
sectionClass.push(monitorSettings.color)
|
||||
if(theBlock.id)attributes.push(`id="${theBlock.id}"`);
|
||||
if(theBlock.color){
|
||||
sectionClass.push(theBlock.color)
|
||||
}
|
||||
if(monitorSettings['section-class']){
|
||||
sectionClass.push(monitorSettings['section-class'])
|
||||
if(theBlock['section-class']){
|
||||
sectionClass.push(theBlock['section-class'])
|
||||
}
|
||||
if(monitorSettings.isAdvanced){ %>
|
||||
if(theBlock.isAdvanced){ %>
|
||||
<div class="h_us_input h_us_advanced" style="display:none">
|
||||
<% }
|
||||
if(monitorSettings['section-pre-pre-class']){ %>
|
||||
<div class="<%- monitorSettings['section-pre-pre-class'] %>">
|
||||
if(theBlock['section-pre-pre-class']){ %>
|
||||
<div class="<%- theBlock['section-pre-pre-class'] %>">
|
||||
<% }
|
||||
if(monitorSettings['section-pre-class']){ %>
|
||||
<div class="<%- monitorSettings['section-pre-class'] %>">
|
||||
if(theBlock['section-pre-class']){ %>
|
||||
<div class="<%- theBlock['section-pre-class'] %>">
|
||||
<% }
|
||||
%>
|
||||
<<%- monitorSettings.isForm ? 'form' : 'div' %> <%- attributes.join(' ') %> style="<%- styles.join(';') %>" class="<%- !monitorSettings.noDefaultSectionClasses ? `card form-group-group p-3 ${define.Theme.isDark ? 'bg-dark' : 'bg-light'} mb-3 shadow` : '' %> <%- sectionClass.join(' ') %>">
|
||||
<% if(!monitorSettings['noHeader']){ %>
|
||||
<h4 class="form-section-header <%- monitorSettings.headerButtons || monitorSettings.headerTitle && ( monitorSettings.headerTitle.indexOf('<a ') > -1 || monitorSettings.headerTitle.indexOf('<button ') > -1 ) ? 'no-toggle-header' : '' %> cursor-pointer mb-3 pb-3 <%- define.Theme.isDark ? 'text-white' : '' %> border-bottom-dotted border-color-<%- monitorSettings.color || 'dark' %> <%- monitorSettings.headerClass %>"><%- headerTitle %>
|
||||
<% if(monitorSettings.headerButtons){ %>
|
||||
<<%- theBlock.isForm ? 'form' : 'div' %> <%- attributes.join(' ') %> style="<%- styles.join(';') %>" class="<%- !theBlock.noDefaultSectionClasses ? `card form-group-group p-3 ${define.Theme.isDark ? 'bg-dark' : 'bg-light'} mb-3 shadow` : '' %> <%- sectionClass.join(' ') %>">
|
||||
<% if(!theBlock['noHeader']){ %>
|
||||
<h4 class="form-section-header <%- theBlock.headerButtons || theBlock.headerTitle && ( theBlock.headerTitle.indexOf('<a ') > -1 || theBlock.headerTitle.indexOf('<button ') > -1 ) ? 'no-toggle-header' : '' %> cursor-pointer mb-3 pb-3 <%- define.Theme.isDark ? 'text-white' : '' %> border-bottom-dotted border-color-<%- theBlock.color || 'dark' %> <%- theBlock.headerClass %>"><%- headerTitle %>
|
||||
<% if(theBlock.headerButtons){ %>
|
||||
<div class="pull-right">
|
||||
<% monitorSettings.headerButtons.forEach(function(button){ %>
|
||||
<% theBlock.headerButtons.forEach(function(button){ %>
|
||||
<a class="btn btn-success btn-xs <%- button.class %>">
|
||||
<% if(button.icon){ %><i class="fa fa-<%- button.icon %>"></i><% } %>
|
||||
<% if(button.text){ %><%- button.text %><% } %>
|
||||
|
@ -73,9 +55,9 @@ drawBlock = function(monitorSettings){
|
|||
<% } %>
|
||||
</h4>
|
||||
<% } %>
|
||||
<div class="box-wrapper <%- monitorSettings['box-wrapper-class'] || '' %>" style="<%- monitorSettings['box-wrapper-style'] || '' %>">
|
||||
<% if(monitorSettings['input-mapping']){ %>
|
||||
<div class="form-group-group btn-default card shadow mb-2" style="display:none" input-mapping="<%- monitorSettings['input-mapping'] %>">
|
||||
<div class="box-wrapper <%- theBlock['box-wrapper-class'] || '' %>" style="<%- theBlock['box-wrapper-style'] || '' %>">
|
||||
<% if(theBlock['input-mapping']){ %>
|
||||
<div class="form-group-group btn-default card shadow mb-2" style="display:none" input-mapping="<%- theBlock['input-mapping'] %>">
|
||||
<h5 class="card-body d-flex flex-row m-0">
|
||||
<div class="flex-grow-1">
|
||||
<%-lang['Input Feeds Selected']%>
|
||||
|
@ -87,17 +69,17 @@ drawBlock = function(monitorSettings){
|
|||
<div class="card-footer pb-0 choices"></div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if(monitorSettings.blockquote){ %>
|
||||
<blockquote class="<%- monitorSettings.blockquoteClass || '' %>">
|
||||
<%- monitorSettings.blockquote %>
|
||||
<% if(theBlock.blockquote){ %>
|
||||
<blockquote class="<%- theBlock.blockquoteClass || '' %>">
|
||||
<%- theBlock.blockquote %>
|
||||
</blockquote>
|
||||
<% } %>
|
||||
<% if(monitorSettings.blocks){
|
||||
monitorSettings.blocks.forEach(function(settingsBlock){
|
||||
drawBlock(settingsBlock)
|
||||
<% if(theBlock.blocks){
|
||||
theBlock.blocks.forEach(function(theBlock){
|
||||
drawBlock(theBlock)
|
||||
})
|
||||
}
|
||||
if(monitorSettings.info){
|
||||
if(theBlock.info){
|
||||
function drawInfoItem(field){
|
||||
let evaluation = `${field.evaluation || ''}`
|
||||
if(field.ejs){
|
||||
|
@ -257,7 +239,7 @@ drawBlock = function(monitorSettings){
|
|||
break;
|
||||
case'select':
|
||||
fieldElement = `<select class="form-control ${fieldClass.join(' ')}" ${attributes.join(' ')}>`
|
||||
fieldElement += buildOptions(field,possiblities)
|
||||
fieldElement += fieldBuild.buildOptions(field,possiblities)
|
||||
fieldElement += '</select>'
|
||||
break;
|
||||
}
|
||||
|
@ -319,20 +301,21 @@ drawBlock = function(monitorSettings){
|
|||
<% };
|
||||
};
|
||||
}
|
||||
monitorSettings.info.forEach(drawInfoItem)
|
||||
theBlock.info.forEach(drawInfoItem)
|
||||
}
|
||||
%>
|
||||
</div>
|
||||
</<%- monitorSettings.isForm ? 'form' : 'div' %>>
|
||||
</<%- theBlock.isForm ? 'form' : 'div' %>>
|
||||
<%
|
||||
if(monitorSettings['section-pre-class']){ %>
|
||||
if(theBlock['section-pre-class']){ %>
|
||||
</div>
|
||||
<% }
|
||||
if(monitorSettings['section-pre-pre-class']){ %>
|
||||
if(theBlock['section-pre-pre-class']){ %>
|
||||
</div>
|
||||
<% }
|
||||
if(monitorSettings.isAdvanced){ %>
|
||||
if(theBlock.isAdvanced){ %>
|
||||
</div>
|
||||
<% }
|
||||
}
|
||||
drawBlock(theBlock)
|
||||
%>
|
|
@ -1,20 +1,12 @@
|
|||
<main class="container page-tab pt-3" id="tab-eventFilters">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Event Filters'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Event Filters'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Event Filters'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Event Filters'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<div class="col-md-12">
|
||||
<%
|
||||
include stickySubmitBar.ejs
|
||||
%>
|
||||
<%- include('stickySubmitBar'); %>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3" id="tab-eventListWithPics">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Events'].blocks).forEach(function(blockKey){
|
||||
var theBlocks = define['Events'].blocks[blockKey]
|
||||
drawBlock(theBlocks)
|
||||
}) %>
|
||||
<% Object.keys(define['Events'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Events'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</form>
|
||||
</main>
|
||||
<script src="<%-window.libURL%>assets/js/bs5.eventListWithPics.js"></script>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3" id="tab-fileBinView">
|
||||
<div class="row <%- define.Theme.isDark ? `dark` : '' %>">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['FileBin'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['FileBin'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['FileBin'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['FileBin'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<div style="margin-bottom: 50px;"></div>
|
||||
<h4 class="sticky-bar p-3 d-flex flex-row">
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3" id="tab-helpWindow">
|
||||
<div class="row <%- define.Theme.isDark ? `dark` : '' %>">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Help Window'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['Help Window'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Help Window'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Help Window'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<style>
|
||||
.blockquoteInHelp:before,.blockquoteInHelp:after{
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<main class="page-tab" id="tab-initial">
|
||||
<div class="row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Home'].blocks).forEach(function(blockKey){
|
||||
const theBlock = define['Home'].blocks[blockKey];
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Home'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Home'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="container page-tab pt-3" id="tab-logViewer">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Log Viewer'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Log Viewer'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Log Viewer'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Log Viewer'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</form>
|
||||
<script src="<%-window.libURL%>assets/js/bs5.logViewer.js"></script>
|
||||
</main>
|
||||
|
|
|
@ -25,14 +25,8 @@
|
|||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% drawBlock(define.SideMenu.blocks.SideMenuBeforeList) %>
|
||||
|
||||
<%- include('drawBlock', {theBlock: define.SideMenu.blocks.SideMenuBeforeList}); %>
|
||||
<div tab-specific-content="liveGrid" style="display:none">
|
||||
<div class="form-group px-3">
|
||||
<div class="dropdown">
|
||||
|
@ -72,7 +66,7 @@
|
|||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
<% drawBlock(define.SideMenu.blocks.SideMenuAfterList) %>
|
||||
<%- include('drawBlock', {theBlock: define.SideMenu.blocks.SideMenuAfterList}); %>
|
||||
<% if(showMonitors){ %>
|
||||
<div>
|
||||
<div class="form-group px-3">
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
<main class="page-tab pt-3" id="tab-monitorMap">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<%
|
||||
var pageName = 'Monitor Map';
|
||||
Object.keys(define[pageName].blocks).forEach(function(blockKey){
|
||||
var pageLayout = define[pageName].blocks[blockKey]
|
||||
drawBlock(pageLayout)
|
||||
})
|
||||
%>
|
||||
var pageName = 'Monitor Map';
|
||||
Object.keys(define[pageName].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define[pageName].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
|
||||
</form>
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.monitorMap.css" />
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
<main class="container page-tab pt-3" id="tab-monitorSettings">
|
||||
<form>
|
||||
<div class="dark">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Monitor Settings'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Monitor Settings'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Monitor Settings'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Monitor Settings'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<div style="margin-bottom: 50px;"></div>
|
||||
</div>
|
||||
<div class="sticky-bar p-3 d-flex flex-row">
|
||||
|
@ -46,13 +40,6 @@
|
|||
</div>
|
||||
</form>
|
||||
</main>
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
|
||||
<script>
|
||||
var monitorSettingsAdditionalInputMapFieldHtml = `<% Object.keys(define["Monitor Settings Additional Input Map"].blocks).forEach(function(blockKey){
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<main class="container page-tab pt-3" id="tab-monitorStates">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Monitor States'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['Monitor States'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Monitor States'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Monitor States'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<div class="col-md-12">
|
||||
<%
|
||||
include stickySubmitBar.ejs
|
||||
%>
|
||||
<%- include('stickySubmitBar'); %>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<main class="container page-tab pt-3" id="tab-onvifDeviceManager">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['ONVIF Device Manager'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['ONVIF Device Manager'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['ONVIF Device Manager'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['ONVIF Device Manager'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<div class="col-md-12">
|
||||
<%
|
||||
include stickySubmitBar.ejs
|
||||
%>
|
||||
<%- include('stickySubmitBar'); %>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<main class="page-tab pt-3" id="tab-onvifScanner">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['ONVIF Scanner'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['ONVIF Scanner'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['ONVIF Scanner'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['ONVIF Scanner'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<main class="container page-tab pt-3" id="tab-regionEditor">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Region Editor'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Region Editor'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Region Editor'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Region Editor'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<div class="col-md-12">
|
||||
<%
|
||||
include stickySubmitBar.ejs
|
||||
%>
|
||||
<%- include('stickySubmitBar'); %>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
<main class="container page-tab pt-3" id="tab-schedules">
|
||||
<form class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Schedules'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['Schedules'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Schedules'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Schedules'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
<div class="col-md-12">
|
||||
<%
|
||||
include stickySubmitBar.ejs
|
||||
%>
|
||||
<%- include('stickySubmitBar'); %>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3" id="tab-studio">
|
||||
<div class="row <%- define.Theme.isDark ? `dark` : '' %>" id="studio">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Studio'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['Studio'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Studio'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Studio'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
</main>
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.studio.css">
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="container page-tab dark pt-3" id="tab-subAccountManager">
|
||||
<div id="subAccountManager" class="row">
|
||||
<%
|
||||
const details = $user.details
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Sub-Account Manager'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Sub-Account Manager'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Sub-Account Manager'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Sub-Account Manager'].blocks[blockKey],
|
||||
details: $user.details
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<main class="page-tab pt-3" id="tab-timelapseViewer">
|
||||
<div class="dark row">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Timelapse'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Timelapse'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Timelapse'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Timelapse'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<div style="margin-bottom: 50px;"></div>
|
||||
<h4 class="sticky-bar p-3 d-flex flex-row">
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
<main class="page-tab" id="tab-timeline" style="position:relative;margin-right:-1.5rem;margin-left:-1.5rem;">
|
||||
<div class="dark">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<%
|
||||
var pageName = 'Timeline';
|
||||
Object.keys(define[pageName].blocks).forEach(function(blockKey){
|
||||
var pageLayout = define[pageName].blocks[blockKey]
|
||||
drawBlock(pageLayout)
|
||||
})
|
||||
%>
|
||||
var pageName = 'Timeline';
|
||||
Object.keys(define[pageName].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define[pageName].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
|
||||
</div>
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.timeline.css" />
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
<main class="page-tab pt-3" id="tab-videosTableView">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.videosTable.css">
|
||||
<div class="row <%- define.Theme.isDark ? `dark` : '' %>">
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Videos Table'].blocks).forEach(function(blockKey){
|
||||
var theBlock = define['Videos Table'].blocks[blockKey]
|
||||
drawBlock(theBlock)
|
||||
}) %>
|
||||
<% Object.keys(define['Videos Table'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('drawBlock', {
|
||||
theBlock: define['Videos Table'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<div style="margin-bottom: 50px;"></div>
|
||||
<h4 class="sticky-bar p-3 d-flex flex-row">
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
var buildOptions
|
||||
%>
|
||||
<form class="dark">
|
||||
<%
|
||||
include fieldBuilders.ejs
|
||||
%>
|
||||
<%- include('home/fieldBuilders'); %>
|
||||
<%
|
||||
drawBlock(define['LDAP'].blocks.LDAP)
|
||||
%>
|
||||
|
|
|
@ -3,17 +3,11 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<form class="modal-content" style="background:transparent">
|
||||
<div>
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include home/fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Admin Account Settings'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Admin Account Settings'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Admin Account Settings'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('home/drawBlock', {
|
||||
theBlock: define['Admin Account Settings'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
</div>
|
||||
<input style="display:none" type="checkbox" id="edit"/>
|
||||
<input type="hidden" name="details" value="{}">
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
<form>
|
||||
<%
|
||||
var drawBlock
|
||||
var buildOptions
|
||||
%>
|
||||
<%
|
||||
include home/fieldBuilders.ejs
|
||||
%>
|
||||
<% Object.keys(define['Super User Preferences'].blocks).forEach(function(blockKey){
|
||||
var accountSettings = define['Super User Preferences'].blocks[blockKey]
|
||||
drawBlock(accountSettings)
|
||||
}) %>
|
||||
<% Object.keys(define['Super User Preferences'].blocks).forEach(function(blockKey) { -%>
|
||||
<%- include('home/drawBlock', {
|
||||
theBlock: define['Super User Preferences'].blocks[blockKey]
|
||||
}) %>
|
||||
<% }) -%>
|
||||
|
||||
</form>
|
||||
<script src="<%-window.libURL%>assets/js/super.preferences.js" type="text/javascript"></script>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<% include systemInfoBlock.ejs %>
|
||||
<%- include('systemInfoBlock'); %>
|
||||
</div>
|
||||
<div id="logs" class="col-md-7">
|
||||
<div class="form-group-group red" style="height:400px;overflow:auto">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% var pageTitle = lang.Shinobi %>
|
||||
<% include blocks/header %>
|
||||
<%- include('blocks/header', {pageTitle: pageTitle}); %>
|
||||
<script>var $user=<%- JSON.stringify($user) %>;</script>
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/vendor/bootstrap5/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bootstrap5-theme.css">
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% var pageTitle = lang.Shinobi + ' - ' + lang["2-Factor Authentication"] %>
|
||||
<head>
|
||||
<!-- Powered by Shinobi, http://shinobi.video -->
|
||||
<% include blocks/header-title.ejs %>
|
||||
<%- include('blocks/header-title', {pageTitle: pageTitle}); %>
|
||||
<%
|
||||
if(config.baseURL)window.libURL = config.baseURL;
|
||||
if(!window.libURL)window.libURL = originalURL;
|
||||
%>
|
||||
<% include blocks/header-meta.ejs %>
|
||||
<%- include('blocks/header-meta'); %>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/vendor/bootstrap5/css/bootstrap.min.css">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/gradients.css">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.darktheme.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<% include blocks/header-favicon.ejs %>
|
||||
<%- include('blocks/header-favicon'); %>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/jquery.min.js"></script>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/jquery-ui.min.js"></script>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/jquery.serialize.js"></script>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<% var pageTitle = lang.Shinobi %>
|
||||
|
||||
<% include blocks/header.ejs %>
|
||||
<% include blocks/header-loggedIn.ejs %>
|
||||
<%- include('blocks/header', {pageTitle: pageTitle}); %>
|
||||
<%- include('blocks/header-loggedIn'); %>
|
||||
<!-- Page -->
|
||||
<% include blocks/home.ejs %>
|
||||
<%- include('blocks/home'); %>
|
||||
<!-- Footer -->
|
||||
<% include blocks/footer.ejs %>
|
||||
<%- include('blocks/footer'); %>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<!-- Powered by Shinobi, http://shinobi.video -->
|
||||
<% include blocks/header-title.ejs %>
|
||||
<%- include('blocks/header-title'); %>
|
||||
<%
|
||||
if(config.baseURL)window.libURL = config.baseURL;
|
||||
if(!window.libURL)window.libURL = originalURL;
|
||||
%>
|
||||
<% include blocks/header-meta.ejs %>
|
||||
<%- include('blocks/header-meta'); %>
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/vendor/bootstrap5/css/bootstrap.min.css">
|
||||
|
@ -17,7 +17,7 @@
|
|||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/gradients.css">
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/css/bs5.darktheme.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<% include blocks/header-favicon.ejs %>
|
||||
<%- include('blocks/header-favicon'); %>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/jquery.min.js"></script>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/jquery-ui.min.js"></script>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/jquery.serialize.js"></script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% var pageTitle = lang.Shinobi %>
|
||||
<% include blocks/header %>
|
||||
<%- include('blocks/header', {pageTitle: pageTitle}); %>
|
||||
<script>var $user=<%- JSON.stringify($user) %>;</script>
|
||||
<link rel="stylesheet" href="<%-window.libURL%>assets/vendor/bootstrap5/css/bootstrap.min.css">
|
||||
<div id="main" class="container">
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
if(config.baseURL)window.libURL = config.baseURL;
|
||||
if(!window.libURL)window.libURL = originalURL;
|
||||
%>
|
||||
<% include blocks/header-meta.ejs %>
|
||||
<% include blocks/header-favicon.ejs %>
|
||||
<%- include('blocks/header-meta'); %>
|
||||
<%- include('blocks/header-favicon'); %>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
|
||||
<!-- Fonts and icons -->
|
||||
|
@ -96,8 +96,8 @@
|
|||
<div class="tab-pane active" id="accounts" role="tabpanel">
|
||||
<div class="row">
|
||||
<div class="col-md-5 text-left">
|
||||
<% include blocks/heyActivate.ejs %>
|
||||
<% include blocks/systemInfoBlock.ejs %>
|
||||
<%- include('blocks/heyActivate'); %>
|
||||
<%- include('blocks/systemInfoBlock'); %>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="mb-4"><a href="#" class="add btn btn-block btn-default"><i class="fa fa-plus"></i> <%- lang.Add %></a></div>
|
||||
|
@ -108,22 +108,22 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="tab-pane text-left" id="config" role="tabpanel">
|
||||
<% include blocks/superConfigEditor.ejs %>
|
||||
<%- include('blocks/superConfigEditor'); %>
|
||||
</div>
|
||||
<div class="tab-pane text-left" id="system" role="tabpanel">
|
||||
<% include blocks/superSystemTab.ejs %>
|
||||
<%- include('blocks/superSystemTab'); %>
|
||||
</div>
|
||||
<div class="tab-pane text-left" id="customAutoLoad" role="tabpanel">
|
||||
<% include blocks/superCustomAutoLoadManager.ejs %>
|
||||
<%- include('blocks/superCustomAutoLoadManager'); %>
|
||||
</div>
|
||||
<div class="tab-pane text-left" id="changeSuperPreferences" role="tabpanel">
|
||||
<% include blocks/superPreferences.ejs %>
|
||||
<%- include('blocks/superPreferences'); %>
|
||||
</div>
|
||||
<div class="tab-pane text-left" id="easyRemoteAccess" role="tabpanel">
|
||||
<% include blocks/easyRemoteAccess.ejs %>
|
||||
<%- include('blocks/easyRemoteAccess'); %>
|
||||
</div>
|
||||
<div class="tab-pane text-left" id="superPluginManager" role="tabpanel">
|
||||
<% include blocks/superPluginManager.ejs %>
|
||||
<%- include('blocks/superPluginManager'); %>
|
||||
</div>
|
||||
<% customAutoLoad.superPageBlocks.forEach(function(block){ %>
|
||||
<%- include(block) %>
|
||||
|
@ -146,7 +146,7 @@
|
|||
</div>
|
||||
<div id="temp" style="display:none"></div>
|
||||
</body>
|
||||
<% include blocks/confirm.ejs %>
|
||||
<%- include('blocks/confirm'); %>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/pnotify.custom.min.js" type="text/javascript"></script>
|
||||
<script src="<%-window.libURL%>assets/vendor/moment-with-locales.js"></script>
|
||||
<script src="<%-window.libURL%>assets/vendor/js/livestamp.min.js" type="text/javascript"></script>
|
||||
|
@ -340,7 +340,7 @@ $('body')
|
|||
location.href = location.href.split('/super')[0];
|
||||
})
|
||||
</script>
|
||||
<% include blocks/mainpermissions.ejs %>
|
||||
<%- include('blocks/mainpermissions'); %>
|
||||
<% customAutoLoad.superLibsJs.forEach(function(lib){ %>
|
||||
<script src="<%-window.libURL%>libs/js/<%-lib%>"></script>
|
||||
<% }) %>
|
||||
|
|
Loading…
Reference in New Issue