├── .gitattributes
├── .gitignore
├── LICENSE
├── Makefile
├── apidoc.json
├── asterisk
├── acl.conf
├── aeap.conf
├── asterisk.conf
├── ccss.conf
├── cdr.conf
├── cel.conf
├── cli_aliases.conf
├── codecs.conf
├── config.sample.lua
├── custom
│ └── .placeholder
├── extconfig.sample.conf
├── extensions.conf
├── extensions.lua
├── features.conf
├── geolocation.conf
├── http.sample.conf
├── indications.conf
├── logger.conf
├── lua
│ ├── log.lua
│ ├── md5.lua
│ ├── redis.lua
│ └── split.lua
├── manager.conf
├── modules.conf
├── musiconhold.conf
├── phones
│ └── placeholder.conf
├── pjproject.conf
├── pjsip.sample.conf
├── pjsip_wizard.conf
├── prometheus.conf
├── rtp.conf
├── sorcery.conf
├── stasis.conf
├── statsd.conf
├── stir_shaken.conf
├── trunks
│ ├── kamailio.conf
│ └── placeholder.conf
└── udptl.conf
├── changelog.md
├── client
├── config
│ └── config.sample.json5
├── css
│ ├── MarkerCluster.Default.css
│ ├── MarkerCluster.css
│ ├── cropper.css
│ ├── index.css
│ ├── jstree
│ │ ├── default-dark
│ │ │ ├── 32px.png
│ │ │ ├── 40px.png
│ │ │ ├── style.css
│ │ │ └── throbber.gif
│ │ └── default
│ │ │ ├── 32px.png
│ │ │ ├── 40px.png
│ │ │ ├── style.css
│ │ │ └── throbber.gif
│ └── leaflet.awesome-markers.css
├── favicon.ico
├── i18n
│ ├── en.json
│ └── ru.json
├── img
│ ├── 404.png
│ ├── admin.png
│ ├── cctv.png
│ ├── lanta.png
│ ├── lantaIcon.png
│ ├── lantaText.png
│ ├── markers-matte.png
│ ├── markers-matte@2x.png
│ ├── markers-plain.png
│ ├── markers-shadow.png
│ ├── markers-shadow@2x.png
│ ├── markers-soft.png
│ ├── markers-soft@2x.png
│ ├── noavatar.png
│ ├── noimage.png
│ ├── rbt.png
│ ├── rbtIcon.png
│ ├── rbtText.png
│ ├── rosteleset.png
│ ├── rostelesetIcon.png
│ ├── rostelesetText.png
│ ├── smart.png
│ ├── smartIcon.png
│ ├── smartText.png
│ └── spinnerSmall.svg
├── index.html
├── js
│ ├── app.js
│ ├── beep.js
│ ├── browser.min.js
│ ├── clipboard.min.js
│ ├── cropper.min.js
│ ├── faicons.js
│ ├── favico.min.js
│ ├── form.js
│ ├── i18n.js
│ ├── idbkvstore.min.js
│ ├── json5.min.js
│ ├── jssip.min.js
│ ├── jstree.js
│ ├── leaflet.awesome-markers.min.js
│ ├── leaflet.markercluster.min.js
│ ├── linkify-html.min.js
│ ├── linkify.min.js
│ ├── loader.js
│ ├── menu.js
│ ├── mqtt.min.js
│ ├── phpjs.js
│ ├── polygon.js
│ ├── purify.min.js
│ ├── pwgen.js
│ ├── rectangles.js
│ ├── rest.js
│ ├── rs232.js
│ ├── table.js
│ ├── tz.js
│ ├── upload.js
│ ├── utils.js
│ └── widgets.js
├── lib
│ └── .placeholder
├── modules
│ ├── about
│ │ ├── about.js
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── readme.md
│ ├── addresses
│ │ ├── _search.js
│ │ ├── addresses.js
│ │ ├── cameras.js
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── domophones.js
│ │ ├── houses.js
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ ├── keys.js
│ │ ├── readme.md
│ │ ├── subscriberDevices.js
│ │ ├── subscriberInbox.js
│ │ ├── subscribers.js
│ │ └── upload.js
│ ├── asterisk
│ │ ├── asterisk.js
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── readme.md
│ ├── cdr
│ │ ├── cdr.js
│ │ └── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ ├── companies
│ │ ├── companies.js
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ ├── contacts
│ │ ├── contacts.js
│ │ └── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ ├── cs
│ │ ├── cs.js
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── sheet.js
│ ├── custom
│ │ ├── .placeholder
│ │ └── version
│ ├── darkmode
│ │ ├── darkmode.js
│ │ └── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ ├── geocoder
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── geocoder.js
│ │ └── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ ├── groups
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── groups.js
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── readme.md
│ ├── map
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── map.js
│ ├── mqtt
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── mqtt.js
│ ├── notes
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── notes.js
│ ├── notifications
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ └── ru.json
│ │ └── notifications.js
│ ├── permissions
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── permissions.js
│ ├── providers
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── providers.js
│ ├── queues
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ └── queues.js
│ ├── tt
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── i18n
│ │ │ ├── en.json
│ │ │ └── ru.json
│ │ ├── issue.js
│ │ ├── json.js
│ │ ├── settings.js
│ │ ├── tt.js
│ │ └── workspaces.js
│ └── users
│ │ ├── custom
│ │ └── .placeholder
│ │ ├── i18n
│ │ ├── en.json
│ │ └── ru.json
│ │ └── users.js
├── patches
│ ├── modal.js
│ └── util.js
├── sw.js
├── ttf
│ └── peignot.ttf
├── version.app
└── version.cli
├── doc
├── api
│ ├── assets
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── bootstrap.min.css
│ │ ├── bootstrap.min.css.map
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon.ico
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ ├── glyphicons-halflings-regular.woff2
│ │ ├── main.bundle.js
│ │ ├── main.css
│ │ ├── prism-diff-highlight.css
│ │ ├── prism-toolbar.css
│ │ └── prism.css
│ └── index.html
├── drafts
│ ├── appeal.lua
│ ├── callcenter.lua
│ ├── common.lua
│ ├── courier.lua
│ ├── debt.lua
│ ├── fitters.lua
│ ├── hw.lua
│ ├── lanta.lua
│ ├── libs
│ │ ├── lanta.lua
│ │ ├── rtl_common.lua
│ │ ├── rtl_conditions.lua
│ │ ├── rtl_transfer.lua
│ │ └── rtl_utils.lua
│ └── office.lua
├── examples
│ ├── client
│ │ ├── config
│ │ │ └── config.json
│ │ └── modules
│ │ │ ├── about
│ │ │ └── custom
│ │ │ │ └── subversion.js
│ │ │ ├── custom
│ │ │ ├── custom.js
│ │ │ └── i18n
│ │ │ │ └── ru.json
│ │ │ └── map
│ │ │ └── custom
│ │ │ └── cameras.js
│ ├── cs
│ │ ├── sheet1.json
│ │ ├── sheet2.json
│ │ ├── sheet3.json
│ │ ├── sheet4.json
│ │ └── sheet5.json
│ ├── server
│ │ ├── api
│ │ │ └── addresses
│ │ │ │ └── custom
│ │ │ │ └── house.php
│ │ └── backends
│ │ │ └── authorization
│ │ │ └── custom
│ │ │ └── custom.php
│ └── tt
│ │ ├── filters
│ │ ├── created.json
│ │ ├── my.json
│ │ ├── search.json
│ │ └── watch.json
│ │ ├── viewers
│ │ ├── tt_format_client_id.js
│ │ └── tt_format_subject.js
│ │ └── workflows
│ │ ├── appeal.lua
│ │ ├── base.lua
│ │ ├── connect.lua
│ │ └── installation.lua
├── hardware
│ ├── is
│ │ └── syslog_events.md
│ └── qtech
│ │ ├── DialReplace.sample.xml
│ │ ├── ICKey.sample.xml
│ │ ├── PrivateKey.sample.xml
│ │ └── syslog_events.md
└── mobile
│ ├── assets
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512.png
│ ├── apple-touch-icon.png
│ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon.ico
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ ├── glyphicons-halflings-regular.woff2
│ ├── main.bundle.js
│ ├── main.css
│ ├── prism-diff-highlight.css
│ ├── prism-toolbar.css
│ └── prism.css
│ └── index.html
├── important.md
├── install
├── 01.nooble.md
├── 02.nodejs.md
├── 03.postgresql.md
├── 04.bouncer.md
├── 05.clickhouse.md
├── 06.mongo.md
├── 07.install.md
├── 08.nginx.md
├── 09.acme.md
├── 10.asterisk.md
├── 11.event.md
├── 12.falprs.md
├── 12.frs_deprecated.md
├── 13.push.md
├── 14.mosquitto.md
├── 15.onlyoffice.md
├── 93.pwa.md
├── 94.desktop.md
├── 95.prometheus.md
├── 97.zabbix.md
├── 98.kamailio.md
├── 99.post_install.md
├── clickhouse
│ └── log.xml
├── deb
│ └── libssl1.1_1.1.1o-1_amd64.deb
├── kamailio
│ ├── dev
│ │ └── v4
│ │ │ ├── kamailio-local.sample.cfg
│ │ │ ├── kamailio-routing.cfg
│ │ │ ├── kamailio.cfg
│ │ │ ├── kamctlrc.sample
│ │ │ ├── tls.cfg
│ │ │ └── xhttp.conf
│ ├── kamailio-local.sample.cfg
│ ├── kamailio-routing.cfg
│ ├── kamailio.cfg
│ ├── kamctlrc.sample
│ ├── tls.cfg
│ └── xhttp.conf
├── logrotate
│ ├── asterisk
│ ├── event
│ ├── frs
│ └── rbt_push
├── monitoring
│ ├── prometheus
│ │ └── .placeholder
│ └── zabbix
│ │ ├── agent
│ │ └── rbt
│ │ │ └── systemd_services.conf
│ │ └── templates
│ │ ├── v6.x
│ │ ├── camera
│ │ │ └── zbx_camera_template_simple.yaml
│ │ ├── intercom
│ │ │ ├── zbx_intercom_template_akuvox_e12.yaml
│ │ │ ├── zbx_intercom_template_beward_dks.yaml
│ │ │ ├── zbx_intercom_template_beward_ds.yaml
│ │ │ ├── zbx_intercom_template_qtech_qbr-27c-h.yaml
│ │ │ ├── zbx_intercom_template_rubetek_rv-3434.yaml
│ │ │ ├── zbx_intercom_template_sokol_v2.yaml
│ │ │ ├── zbx_intercom_template_sokol_v5.yaml
│ │ │ ├── zbx_intercom_template_ufanet_secret_top.yaml
│ │ │ └── zbx_relay_template_slines_rodos.yaml
│ │ └── services
│ │ │ ├── zbx_asterisk_template.yaml
│ │ │ ├── zbx_flussonic_media_server_template.yaml
│ │ │ ├── zbx_frs_template.yaml
│ │ │ └── zbx_smart_yard_server_template.yaml
│ │ └── v7.x
│ │ ├── camera
│ │ └── zbx_camera_template_simple.yaml
│ │ ├── intercom
│ │ ├── zbx_intercom_template_akuvox_e12.yaml
│ │ ├── zbx_intercom_template_beward_dks.yaml
│ │ ├── zbx_intercom_template_beward_ds.yaml
│ │ ├── zbx_intercom_template_qtech_qbr-27c-h.yaml
│ │ ├── zbx_intercom_template_rubetek_rv-3434.yaml
│ │ ├── zbx_intercom_template_sokol_v2.yaml
│ │ ├── zbx_intercom_template_sokol_v5.yaml
│ │ ├── zbx_intercom_template_ufanet_secret_top.yaml
│ │ └── zbx_relay_template_slines_rodos.yaml
│ │ └── services
│ │ ├── zbx_asterisk_template.yaml
│ │ ├── zbx_flussonic_media_server_template.yaml
│ │ ├── zbx_frs_template.yaml
│ │ └── zbx_smart_yard_server_template.yaml
├── mosquitto
│ ├── passwd
│ └── rbt.conf
├── nginx
│ ├── m
│ ├── rbt
│ └── rbt_force_ssl
├── patches
│ └── res_pjsip_session.c.18.16.0.patch
├── pgbouncer
│ ├── pgbouncer.ini
│ └── userlist.txt
├── prometheus_stack
│ └── services
│ │ ├── alertmanager
│ │ └── config.yml
│ │ ├── blackbox
│ │ └── blackbox.yml
│ │ ├── karma
│ │ └── config.yml
│ │ ├── process-exporter
│ │ └── process-exporter.yml
│ │ └── prometheus
│ │ ├── prometheus.yml.template
│ │ ├── rules
│ │ └── alert_rules.yml
│ │ └── web.yml
├── readme.md
├── rtpengine
│ └── rtpengine.sample.conf
├── systemd
│ ├── asterisk.service
│ ├── event
│ │ ├── event_akuvox.service
│ │ ├── event_beward.service
│ │ ├── event_beward_ds.service
│ │ ├── event_brovotech.service
│ │ ├── event_is.service
│ │ ├── event_qtech.service
│ │ ├── event_rubetek.service
│ │ ├── event_sputnik_cloud.service
│ │ └── event_ufanet.service
│ ├── frs.service
│ ├── mongodb.service
│ └── mqtt.service
└── tt_demo
│ ├── create_demo_tt_process.php
│ └── tt_mobile_demo_workflow.lua
├── readme.md
├── server
├── .gitignore
├── api
│ ├── accounts
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── group.php
│ │ ├── groupUsers.php
│ │ ├── groups.php
│ │ ├── password.php
│ │ ├── user.php
│ │ ├── userGroups.php
│ │ └── users.php
│ ├── addresses
│ │ ├── addresses.php
│ │ ├── area.php
│ │ ├── city.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── favorites.php
│ │ ├── house.php
│ │ ├── region.php
│ │ ├── search.php
│ │ ├── settlement.php
│ │ └── street.php
│ ├── api-header.md
│ ├── api.php
│ ├── apidoc.json
│ ├── authentication
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── login.php
│ │ ├── logout.php
│ │ └── two_fa.php
│ ├── authorization
│ │ ├── available.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── methods.php
│ │ └── rights.php
│ ├── cameras
│ │ ├── camera.php
│ │ ├── cameras.php
│ │ ├── camshot.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── cdr
│ │ ├── cdr.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── companies
│ │ ├── companies.php
│ │ ├── company.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── configs
│ │ ├── configs.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── contacts
│ │ ├── contact.php
│ │ ├── contacts.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── cs
│ │ ├── cell.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── reserveCell.php
│ │ ├── sheet.php
│ │ └── sheets.php
│ ├── custom
│ │ ├── custom.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── files
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── file.php
│ │ └── files.php
│ ├── geo
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── suggestions.php
│ ├── houses
│ │ ├── autoconfigure.php
│ │ ├── cameras.php
│ │ ├── cms.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── customFields.php
│ │ ├── customFieldsConfiguration.php
│ │ ├── domophone.php
│ │ ├── domophones.php
│ │ ├── entrance.php
│ │ ├── flat.php
│ │ ├── flats.php
│ │ ├── house.php
│ │ ├── path.php
│ │ ├── search.php
│ │ └── sharedEntrances.php
│ ├── inbox
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── message.php
│ ├── mqtt
│ │ ├── config.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── notes
│ │ ├── check.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── note.php
│ │ ├── notes.php
│ │ └── xyz.php
│ ├── providers
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── json.php
│ │ └── provider.php
│ ├── queues
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── queues.php
│ ├── server
│ │ ├── clearCache.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── version.php
│ ├── subscribers
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── device.php
│ │ ├── devices.php
│ │ ├── flatCameras.php
│ │ ├── key.php
│ │ ├── keys.php
│ │ ├── search.php
│ │ ├── searchFlat.php
│ │ ├── searchRf.php
│ │ ├── subscriber.php
│ │ ├── subscriberCameras.php
│ │ └── subscribers.php
│ ├── tt
│ │ ├── action.php
│ │ ├── arrays.php
│ │ ├── bulkAction.php
│ │ ├── comment.php
│ │ ├── crontab.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── customField.php
│ │ ├── customFilter.php
│ │ ├── favoriteFilter.php
│ │ ├── file.php
│ │ ├── filter.php
│ │ ├── issue.php
│ │ ├── issueTemplate.php
│ │ ├── issues.php
│ │ ├── journal.php
│ │ ├── json.php
│ │ ├── lib.php
│ │ ├── link.php
│ │ ├── printIssue.php
│ │ ├── prints.php
│ │ ├── project.php
│ │ ├── resolution.php
│ │ ├── role.php
│ │ ├── status.php
│ │ ├── suggestions.php
│ │ ├── tag.php
│ │ ├── tt.php
│ │ ├── viewer.php
│ │ └── workflow.php
│ └── user
│ │ ├── avatar.php
│ │ ├── custom
│ │ └── .placeholder
│ │ ├── notify.php
│ │ ├── settings.php
│ │ └── whoAmI.php
├── asterisk.php
├── backends
│ ├── accounting
│ │ ├── accounting.php
│ │ ├── clickhouse
│ │ │ └── clickhouse.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── none
│ │ │ └── none.php
│ │ ├── readme.md
│ │ └── syslog
│ │ │ └── syslog.php
│ ├── addresses
│ │ ├── addresses.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── internal
│ │ │ └── internal.php
│ │ └── readme.md
│ ├── authentication
│ │ ├── authentication.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── external
│ │ │ └── external.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── authorization
│ │ ├── allow
│ │ │ └── allow.php
│ │ ├── authorization.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── internal
│ │ │ └── internal.php
│ ├── backend.php
│ ├── cameras
│ │ ├── cameras.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── internal
│ │ │ └── internal.php
│ ├── cdr
│ │ ├── cdr.php
│ │ └── custom
│ │ │ └── .placeholder
│ ├── companies
│ │ ├── companies.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── internal
│ │ │ └── internal.php
│ ├── configs
│ │ ├── configs.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── json
│ │ │ └── json.php
│ ├── contacts
│ │ ├── contacts.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── cs
│ │ ├── cs.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── internal
│ │ │ └── internal.php
│ ├── custom
│ │ └── custom.php
│ ├── customFields
│ │ ├── customFields.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── dvr
│ │ ├── custom
│ │ │ ├── .placeholder
│ │ │ └── custom.php
│ │ ├── dvr.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── dvr_exports
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── dvr_exports.php
│ │ ├── filesystem
│ │ │ └── filesystem.php
│ │ └── mongo
│ │ │ └── mongo.php
│ ├── external
│ │ ├── external.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── files
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── files.php
│ │ ├── fs
│ │ │ └── fs.php
│ │ └── mongo
│ │ │ └── mongo.php
│ ├── frs
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── frs.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── geocoder
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── dadata
│ │ │ └── dadata.php
│ │ └── geocoder.php
│ ├── groups
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── groups.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── households
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── households.php
│ │ └── internal
│ │ │ └── internal.php
│ ├── inbox
│ │ ├── clickhouse
│ │ │ └── clickhouse.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── inbox.php
│ ├── isdn
│ │ ├── .traits
│ │ │ ├── incoming.php
│ │ │ ├── push.php
│ │ │ └── sms.php
│ │ ├── bundle
│ │ │ └── bundle.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── isdn.php
│ │ └── lanta
│ │ │ └── lanta.php
│ ├── issue_adapter
│ │ ├── issue_adapter.php
│ │ ├── lanta
│ │ │ └── lanta.php
│ │ ├── sample
│ │ │ └── .placeholder
│ │ └── teledom
│ │ │ └── teledom.php
│ ├── monitoring
│ │ ├── monitoring.php
│ │ ├── prometheus
│ │ │ └── prometheus.php
│ │ ├── simple
│ │ │ └── simple.php
│ │ └── zabbix
│ │ │ └── zabbix.php
│ ├── mqtt
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── internal
│ │ │ └── internal.php
│ │ └── mqtt.php
│ ├── notes
│ │ ├── internal
│ │ │ └── internal.php
│ │ └── notes.php
│ ├── plog
│ │ ├── clickhouse
│ │ │ └── clickhouse.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── plog.php
│ ├── processes
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── internal
│ │ │ └── internal.php
│ │ └── processes.php
│ ├── providers
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── lanta
│ │ │ └── lanta.php
│ │ └── providers.php
│ ├── queue
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── internal
│ │ │ └── internal.php
│ │ └── queue.php
│ ├── sip
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── internal
│ │ │ └── internal.php
│ │ └── sip.php
│ ├── tt
│ │ ├── .traits
│ │ │ └── db.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── mongo
│ │ │ └── mongo.php
│ │ ├── tt.php
│ │ └── workflow.php
│ └── users
│ │ ├── custom
│ │ └── .placeholder
│ │ ├── internal
│ │ └── internal.php
│ │ └── users.php
├── cli.php
├── cli
│ ├── autoconfig.php
│ ├── clickhouse.php
│ ├── config.php
│ ├── cron.php
│ ├── custom
│ │ └── .placeholder
│ ├── db.php
│ ├── init.php
│ ├── server.php
│ ├── templates.php
│ └── tests.php
├── composer.json
├── config
│ └── config.sample.json5
├── data
│ ├── backup_db.php
│ ├── clickhouse
│ │ ├── v1_core.sql
│ │ ├── v1_database.sql
│ │ ├── v1_inbox.sql
│ │ ├── v1_plog.sql
│ │ ├── v1_syslog.sql
│ │ ├── v1_ttlog.sql
│ │ ├── v2_syslog.sql
│ │ ├── v3_nlog.sql
│ │ ├── v4_inbox.sql
│ │ ├── v5_inbox.sql
│ │ ├── v6_nlog.sql
│ │ └── v7_plog.sql
│ ├── files
│ │ └── .placeholder
│ ├── install.json
│ ├── install.php
│ ├── install_clickhouse.json
│ ├── install_clickhouse.php
│ ├── install_tt_mobile_template.php
│ ├── pgsql
│ │ ├── v10_houses.sql
│ │ ├── v11_tt.sql
│ │ ├── v12_core.sql
│ │ ├── v13_cameras.sql
│ │ ├── v14_houses.sql
│ │ ├── v15_core.sql
│ │ ├── v16_houses.sql
│ │ ├── v17_cameras.sql
│ │ ├── v17_houses.sql
│ │ ├── v17_plog.sql
│ │ ├── v18_tt.sql
│ │ ├── v19_tt.sql
│ │ ├── v1_addresses.sql
│ │ ├── v1_cameras.sql
│ │ ├── v1_core.sql
│ │ ├── v1_dvr.sql
│ │ ├── v1_frs.sql
│ │ ├── v1_houses.sql
│ │ ├── v1_inbox.sql
│ │ ├── v1_plog.sql
│ │ ├── v1_providers.sql
│ │ ├── v1_tasks.sql
│ │ ├── v1_tt.sql
│ │ ├── v20_tt.sql
│ │ ├── v21_cameras.sql
│ │ ├── v22_houses.sql
│ │ ├── v23_addresses.sql
│ │ ├── v24_comments.sql
│ │ ├── v25_houses.sql
│ │ ├── v26_core.sql
│ │ ├── v27_houses.sql
│ │ ├── v28_mult.sql
│ │ ├── v29_ua.sql
│ │ ├── v2_addresses.sql
│ │ ├── v30_houses.sql
│ │ ├── v31_houses.sql
│ │ ├── v32_core.sql
│ │ ├── v33_houses.sql
│ │ ├── v34_cameras.sql
│ │ ├── v35_indexes.sql
│ │ ├── v35_mult.sql
│ │ ├── v35_mult_1.php
│ │ ├── v35_mult_2.php
│ │ ├── v36_tt.sql
│ │ ├── v37_tt.sql
│ │ ├── v38_settings.sql
│ │ ├── v39_core.sql
│ │ ├── v3_tasks.sql
│ │ ├── v40_core.sql
│ │ ├── v41_notes.sql
│ │ ├── v42_core.sql
│ │ ├── v43_addresses.sql
│ │ ├── v44_tt.sql
│ │ ├── v45_search.php
│ │ ├── v45_search.sql
│ │ ├── v46_mult.sql
│ │ ├── v47_inbox.sql
│ │ ├── v48_mult.sql
│ │ ├── v49_core.sql
│ │ ├── v4_cameras.sql
│ │ ├── v50_version.sql
│ │ ├── v51_path.sql
│ │ ├── v52_indexes.sql
│ │ ├── v53_avatar.sql
│ │ ├── v54_households.sql
│ │ ├── v55_core.sql
│ │ ├── v56_cameras.sql
│ │ ├── v57_domophones.sql
│ │ ├── v58_cameras.sql
│ │ ├── v59_video_1.sql
│ │ ├── v59_video_2.php
│ │ ├── v59_video_3.sql
│ │ ├── v5_companies.sql
│ │ ├── v60_cars.sql
│ │ ├── v61_cars.sql
│ │ ├── v62_cameras.sql
│ │ ├── v63_custom_fields.sql
│ │ ├── v64_bundle.sql
│ │ ├── v65_paranoid.sql
│ │ ├── v66_custom_fields.sql
│ │ ├── v67_subscribers_flats.sql
│ │ ├── v68_custom_fields.sql
│ │ ├── v69_domophones.sql
│ │ ├── v6_companies.sql
│ │ ├── v70_custom_fields.sql
│ │ ├── v71_custom_fields.sql
│ │ ├── v72_project_comments.sql
│ │ ├── v73_favorite_filters.sql
│ │ ├── v74_favorite_filters.sql
│ │ ├── v75_readonly.sql
│ │ ├── v7_address.sql
│ │ ├── v8_core.sql
│ │ └── v9_tt.sql
│ ├── schema.php
│ ├── sqlite
│ │ ├── v10_houses.sql
│ │ ├── v11_tt.sql
│ │ ├── v12_core.sql
│ │ ├── v13_cameras.sql
│ │ ├── v14_houses.sql
│ │ ├── v15_core.sql
│ │ ├── v16_houses.sql
│ │ ├── v17_cameras.sql
│ │ ├── v17_houses.sql
│ │ ├── v17_plog.sql
│ │ ├── v18_tt.sql
│ │ ├── v19_tt.sql
│ │ ├── v1_addresses.sql
│ │ ├── v1_cameras.sql
│ │ ├── v1_core.sql
│ │ ├── v1_dvr.sql
│ │ ├── v1_frs.sql
│ │ ├── v1_houses.sql
│ │ ├── v1_inbox.sql
│ │ ├── v1_plog.sql
│ │ ├── v1_providers.sql
│ │ ├── v1_tasks.sql
│ │ ├── v1_tt.sql
│ │ ├── v20_tt.sql
│ │ ├── v21_cameras.sql
│ │ ├── v22_houses.sql
│ │ ├── v23_addresses.sql
│ │ ├── v24_comments.sql
│ │ ├── v25_houses.sql
│ │ ├── v26_core.sql
│ │ ├── v27_houses.sql
│ │ ├── v28_mult.sql
│ │ ├── v29_ua.sql
│ │ ├── v2_addresses.sql
│ │ ├── v30_houses.sql
│ │ ├── v31_houses.sql
│ │ ├── v32_core.sql
│ │ ├── v33_houses.sql
│ │ ├── v34_cameras.sql
│ │ ├── v35_indexes.sql
│ │ ├── v35_mult.sql
│ │ ├── v35_mult_1.php
│ │ ├── v35_mult_2.php
│ │ ├── v36_tt.sql
│ │ ├── v37_tt.sql
│ │ ├── v38_settings.sql
│ │ ├── v39_core.sql
│ │ ├── v3_tasks.sql
│ │ ├── v40_core.sql
│ │ ├── v41_notes.sql
│ │ ├── v42_core.sql
│ │ ├── v43_addresses.sql
│ │ ├── v44_tt.sql
│ │ ├── v45_search.php
│ │ ├── v45_search.sql
│ │ ├── v46_mult.sql
│ │ ├── v47_inbox.sql
│ │ ├── v48_mult.sql
│ │ ├── v49_core.sql
│ │ ├── v4_cameras.sql
│ │ ├── v50_version.sql
│ │ ├── v51_path.sql
│ │ ├── v52_indexes.sql
│ │ ├── v53_avatar.sql
│ │ ├── v54_households.sql
│ │ ├── v55_core.sql
│ │ ├── v56_cameras.sql
│ │ ├── v57_domophones.sql
│ │ ├── v58_cameras.sql
│ │ ├── v59_video_1.sql
│ │ ├── v59_video_2.php
│ │ ├── v59_video_3.sql
│ │ ├── v5_companies.sql
│ │ ├── v60_cars.sql
│ │ ├── v61_cars.sql
│ │ ├── v62_cameras.sql
│ │ ├── v63_custom_fields.sql
│ │ ├── v64_bundle.sql
│ │ ├── v65_paranoid.sql
│ │ ├── v66_custom_fields.sql
│ │ ├── v67_subscribers_flats.sql
│ │ ├── v68_custom_fields.sql
│ │ ├── v69_domophones.sql
│ │ ├── v6_companies.sql
│ │ ├── v70_custom_fields.sql
│ │ ├── v71_custom_fields.sql
│ │ ├── v72_project_comments.sql
│ │ ├── v73_favorite_filters.sql
│ │ ├── v74_favorite_filters.sql
│ │ ├── v75_readonly.sql
│ │ ├── v7_address.sql
│ │ ├── v8_core.sql
│ │ └── v9_tt.sql
│ ├── tables.json
│ └── tt_mobile_template
│ │ ├── tt_filter_all.json
│ │ ├── tt_mobile_template.sql
│ │ └── tt_mobile_workflow.lua
├── db
│ └── backup
│ │ └── .placeholder
├── fixes
│ └── .placeholder
├── frontend.php
├── hw
│ ├── Interfaces
│ │ └── DbConfigUpdaterInterface.php
│ ├── SmartConfigurator
│ │ ├── ConfigurationBuilder
│ │ │ ├── CameraConfigurationBuilder.php
│ │ │ ├── ConfigurationBuilder.php
│ │ │ └── DomophoneConfigurationBuilder.php
│ │ ├── DbConfigCollector
│ │ │ ├── CameraDbConfigCollector.php
│ │ │ ├── DomophoneDbConfigCollector.php
│ │ │ └── IDbConfigCollector.php
│ │ └── SmartConfigurator.php
│ ├── autoconfigure_device.php
│ ├── autoload.php
│ ├── hw.php
│ └── ip
│ │ ├── camera
│ │ ├── akuvox
│ │ │ └── akuvox.php
│ │ ├── beward
│ │ │ └── beward.php
│ │ ├── brovotech
│ │ │ └── brovotech.php
│ │ ├── camera.php
│ │ ├── entities
│ │ │ └── DetectionZone.php
│ │ ├── fake
│ │ │ ├── fake.php
│ │ │ └── img
│ │ │ │ └── callcenter.jpg
│ │ ├── hikvision
│ │ │ ├── hikvision.php
│ │ │ └── hikvisionRtsp.php
│ │ ├── is
│ │ │ └── is.php
│ │ ├── models
│ │ │ ├── akuvox.json
│ │ │ ├── beward.json
│ │ │ ├── beward_ds.json
│ │ │ ├── brovotech.json
│ │ │ ├── fake.json
│ │ │ ├── hikvision.json
│ │ │ ├── hikvision_rtsp.json
│ │ │ ├── is.json
│ │ │ ├── qtech.json
│ │ │ ├── rubetek.json
│ │ │ ├── sputnik.json
│ │ │ └── ufanet.json
│ │ ├── qtech
│ │ │ └── qtech.php
│ │ ├── rubetek
│ │ │ └── rubetek.php
│ │ ├── sputnik
│ │ │ └── sputnik.php
│ │ ├── ufanet
│ │ │ └── ufanet.php
│ │ └── utils
│ │ │ └── DetectionZoneUtils.php
│ │ ├── common
│ │ ├── akuvox
│ │ │ └── akuvox.php
│ │ ├── beward
│ │ │ └── beward.php
│ │ ├── hikvision
│ │ │ └── hikvision.php
│ │ ├── is
│ │ │ ├── is.php
│ │ │ ├── scripts
│ │ │ │ ├── get_syslog_conf
│ │ │ │ └── upload_syslog_conf
│ │ │ └── templates
│ │ │ │ └── custom.conf
│ │ ├── qtech
│ │ │ └── qtech.php
│ │ ├── rubetek
│ │ │ └── rubetek.php
│ │ ├── sputnik
│ │ │ └── sputnik.php
│ │ └── ufanet
│ │ │ ├── Timezone.php
│ │ │ └── ufanet.php
│ │ ├── domophone
│ │ ├── akuvox
│ │ │ ├── akuvox.php
│ │ │ └── e12.php
│ │ ├── beward
│ │ │ ├── beward.php
│ │ │ ├── dks.php
│ │ │ └── ds06.php
│ │ ├── cmses
│ │ │ ├── bk-100.json
│ │ │ ├── bk-400.json
│ │ │ ├── com-100u.json
│ │ │ ├── com-220u.json
│ │ │ ├── com-25u.json
│ │ │ ├── digital.json
│ │ │ ├── factorial_8x8.json
│ │ │ ├── kad2501.json
│ │ │ ├── kad2502.json
│ │ │ ├── kkm-100s2.json
│ │ │ ├── kkm-105.json
│ │ │ ├── kkm-108.json
│ │ │ ├── km100-7.1.json
│ │ │ ├── km100-7.2.json
│ │ │ ├── km100-7.3.json
│ │ │ ├── km100-7.5.json
│ │ │ ├── km20-1.json
│ │ │ ├── kmg-100.json
│ │ │ └── qad-100.json
│ │ ├── domophone.php
│ │ ├── hikvision
│ │ │ ├── hikvision.php
│ │ │ └── kv6113.php
│ │ ├── is
│ │ │ ├── is.php
│ │ │ ├── iscomx1.php
│ │ │ └── iscomx1plus.php
│ │ ├── models
│ │ │ ├── dks.json
│ │ │ ├── ds06.json
│ │ │ ├── e12.json
│ │ │ ├── iscomx1.json
│ │ │ ├── iscomx1plus.json
│ │ │ ├── kv6113.json
│ │ │ ├── qdb27ch.json
│ │ │ ├── rodos.json
│ │ │ ├── rv3434.json
│ │ │ ├── secretTop.json
│ │ │ └── sputnik.json
│ │ ├── qtech
│ │ │ ├── qdb27ch.php
│ │ │ └── qtech.php
│ │ ├── rubetek
│ │ │ ├── RubetekConst.php
│ │ │ ├── legacy
│ │ │ │ └── rubetek.php
│ │ │ ├── rubetek.php
│ │ │ └── rv3434.php
│ │ ├── silines
│ │ │ └── rodos.php
│ │ ├── sputnik
│ │ │ └── sputnik.php
│ │ └── ufanet
│ │ │ ├── assets
│ │ │ ├── display_image_default_1.jpg
│ │ │ ├── display_image_default_2.jpg
│ │ │ └── display_image_default_3.jpg
│ │ │ ├── secretTop.php
│ │ │ └── ufanet.php
│ │ └── ip.php
├── i18n
│ ├── custom
│ │ └── .placeholder
│ ├── en.json
│ └── ru.json
├── internal.php
├── internal
│ ├── actions
│ │ ├── callFinished.php
│ │ ├── motionDetection.php
│ │ ├── openDoor.php
│ │ └── setRabbitGates.php
│ ├── frs
│ │ ├── callback.php
│ │ └── camshot.php
│ ├── lprs
│ │ └── callback.php
│ └── prometheus
│ │ ├── monitoring_utils.php
│ │ ├── targets_domophone.php
│ │ ├── targets_http.php
│ │ └── targets_icmp.php
├── kamailio.php
├── kamailio
│ └── kamailio.php
├── lib
│ └── GoogleAuthenticator
│ │ ├── GoogleAuthenticator.php
│ │ ├── LICENSE.md
│ │ └── README.md
├── md.php
├── mobile.php
├── mobile
│ ├── address
│ │ ├── access.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── getAddressList.php
│ │ ├── getSettingsList.php
│ │ ├── intercom.php
│ │ ├── modifyKey.php
│ │ ├── offices.php
│ │ ├── openDoor.php
│ │ ├── plog.php
│ │ ├── plogCamshot.php
│ │ ├── plogDays.php
│ │ ├── registerQR.php
│ │ ├── resend.php
│ │ └── resetCode.php
│ ├── api-header.md
│ ├── apidoc.json
│ ├── call
│ │ ├── camshot.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── live.php
│ ├── cctv
│ │ ├── all.php
│ │ ├── allTree.php
│ │ ├── camMap.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── download.php
│ │ ├── helpers
│ │ │ └── listCameras.php
│ │ ├── overview.php
│ │ ├── ranges.php
│ │ ├── recDownload.php
│ │ ├── recPrepare.php
│ │ └── youtube.php
│ ├── custom
│ │ └── .placeholder
│ ├── ext
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── ext.php
│ │ ├── list.php
│ │ └── options.php
│ ├── frs
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── disLike.php
│ │ ├── like.php
│ │ └── listFaces.php
│ ├── geo
│ │ ├── address.php
│ │ ├── coder.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── getAllLocations.php
│ │ ├── getAllServices.php
│ │ ├── getHouses.php
│ │ ├── getServices.php
│ │ └── getStreets.php
│ ├── inbox
│ │ ├── alert.php
│ │ ├── chatReaded.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── inbox.html
│ │ ├── inbox.php
│ │ ├── readed.php
│ │ └── unreaded.php
│ ├── issues
│ │ ├── action.php
│ │ ├── actionV2.php
│ │ ├── comment.php
│ │ ├── commentV2.php
│ │ ├── create.php
│ │ ├── createV2.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── listConnect.php
│ │ └── listConnectV2.php
│ ├── lprs
│ │ ├── addNumber.php
│ │ ├── listNumbers.php
│ │ └── removeNumber.php
│ ├── pay
│ │ ├── bonus.php
│ │ ├── custom
│ │ │ └── .placeholder
│ │ ├── prepare.php
│ │ └── process.php
│ ├── sip
│ │ ├── custom
│ │ │ └── .placeholder
│ │ └── helpMe.php
│ └── user
│ │ ├── addMyPhone.php
│ │ ├── appVersion.php
│ │ ├── checkPhone.php
│ │ ├── confirmCode.php
│ │ ├── custom
│ │ └── .placeholder
│ │ ├── getName.php
│ │ ├── getPaymentsList.php
│ │ ├── notification.php
│ │ ├── phonePattern.php
│ │ ├── ping.php
│ │ ├── pushTokens.php
│ │ ├── registerPushToken.php
│ │ ├── requestCode.php
│ │ ├── restore.php
│ │ └── sendName.php
├── services
│ ├── ami
│ │ ├── ami.js
│ │ └── package.json
│ ├── event
│ │ ├── config.sample.json
│ │ ├── constants.js
│ │ ├── draft
│ │ │ └── OmnyWebHookService_emample_messages.xml
│ │ ├── index.js
│ │ ├── package.json
│ │ ├── services
│ │ │ ├── AkuvoxService.js
│ │ │ ├── BewardService.js
│ │ │ ├── BewardServiceDS.js
│ │ │ ├── BrovotechService.js
│ │ │ ├── IsService.js
│ │ │ ├── NonameWebHookService.js
│ │ │ ├── OmnyWebHookService.js
│ │ │ ├── QtechService.js
│ │ │ ├── RubetekService.js
│ │ │ ├── SputnikCloudService.js
│ │ │ ├── UfanetService.js
│ │ │ ├── base
│ │ │ │ ├── SyslogService.js
│ │ │ │ ├── WebHookService.js
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── spamwords.json
│ │ └── utils
│ │ │ ├── API.js
│ │ │ ├── getTimestamp.js
│ │ │ ├── index.js
│ │ │ ├── isIpAddress.js
│ │ │ ├── mdTimer.js
│ │ │ ├── mdTimer_test.js
│ │ │ ├── parseSyslogMessage.js
│ │ │ ├── syslog_client.js
│ │ │ └── urlParser.js
│ ├── intercom_provision
│ │ ├── index.js
│ │ ├── package.json
│ │ ├── readme.md
│ │ └── templates
│ │ │ └── akuvox_intercom_config_template.ejs
│ ├── mqtt
│ │ ├── agent.js
│ │ └── package.json
│ ├── push
│ │ ├── .env_example
│ │ ├── assets
│ │ │ └── .placeholder
│ │ ├── constants.js
│ │ ├── package.json
│ │ ├── push.js
│ │ └── push.service
│ ├── readme.md
│ └── sys_exporter
│ │ ├── .dockerignore
│ │ ├── .env_example
│ │ ├── app
│ │ ├── constants.js
│ │ ├── index.js
│ │ ├── metrics
│ │ │ ├── devices
│ │ │ │ ├── akuvox.js
│ │ │ │ ├── beward.js
│ │ │ │ ├── qtech.js
│ │ │ │ └── rubetek.js
│ │ │ ├── index.js
│ │ │ ├── metricsFactory.js
│ │ │ └── registry.js
│ │ ├── middleware
│ │ │ └── auth.js
│ │ ├── routes
│ │ │ ├── metrics.js
│ │ │ ├── probe.js
│ │ │ └── routes.js
│ │ └── utils
│ │ │ └── metrics.js
│ │ ├── docker-compose.yml
│ │ ├── docker
│ │ └── node
│ │ │ └── Dockerfile
│ │ ├── package.json
│ │ └── readme.md
└── utils
│ ├── apache_request_headers.php
│ ├── api_exec.php
│ ├── api_response.php
│ ├── array_diff_assoc_recursive.php
│ ├── array_key_first.php
│ ├── checkint.php
│ ├── checkstr.php
│ ├── cleanup.php
│ ├── clear_cache.php
│ ├── clickhouse.php
│ ├── db_ext.php
│ ├── debug.php
│ ├── email.php
│ ├── error.php
│ ├── forgot.php
│ ├── format_usage.php
│ ├── generate_password.php
│ ├── guidv4.php
│ ├── i18n.php
│ ├── install_crontabs.php
│ ├── is_executable.php
│ ├── loader.php
│ ├── max_upload_size.php
│ ├── mb_levenshtein.php
│ ├── mime_content_type.php
│ ├── mobile_project.php
│ ├── mongo2sql.php
│ ├── parse_url_ext.php
│ ├── purifier.php
│ ├── reindex.php
│ └── response.php
├── static
├── .placeholder
├── fonts
│ └── sourcesanspro
│ │ ├── sourcesanspro.css
│ │ ├── sourcesanspro.ttf
│ │ ├── sourcesanspro.woff
│ │ ├── sourcesanspro.woff2
│ │ ├── sourcesansproblack.ttf
│ │ ├── sourcesansproblack.woff
│ │ ├── sourcesansproblack.woff2
│ │ ├── sourcesansproblackitalic.ttf
│ │ ├── sourcesansproblackitalic.woff
│ │ ├── sourcesansproblackitalic.woff2
│ │ ├── sourcesansprobold.ttf
│ │ ├── sourcesansprobold.woff
│ │ ├── sourcesansprobold.woff2
│ │ ├── sourcesansprobolditalic.ttf
│ │ ├── sourcesansprobolditalic.woff
│ │ ├── sourcesansprobolditalic.woff2
│ │ ├── sourcesansproextralight.ttf
│ │ ├── sourcesansproextralight.woff
│ │ ├── sourcesansproextralight.woff2
│ │ ├── sourcesansproextralightitalic.ttf
│ │ ├── sourcesansproextralightitalic.woff
│ │ ├── sourcesansproextralightitalic.woff2
│ │ ├── sourcesansproitalic.ttf
│ │ ├── sourcesansproitalic.woff
│ │ ├── sourcesansproitalic.woff2
│ │ ├── sourcesansprolight.ttf
│ │ ├── sourcesansprolight.woff
│ │ ├── sourcesansprolight.woff2
│ │ ├── sourcesansprolightitalic.ttf
│ │ ├── sourcesansprolightitalic.woff
│ │ ├── sourcesansprolightitalic.woff2
│ │ ├── sourcesansprosemibold.ttf
│ │ ├── sourcesansprosemibold.woff
│ │ ├── sourcesansprosemibold.woff2
│ │ ├── sourcesansprosemibolditalic.ttf
│ │ ├── sourcesansprosemibolditalic.woff
│ │ └── sourcesansprosemibolditalic.woff2
├── icon
│ └── avatar.png
└── portal
│ └── .placeholder
└── version
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.ova filter=lfs diff=lfs merge=lfs -text
2 |
--------------------------------------------------------------------------------
/apidoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "RBT",
3 | "version": "1.0.0",
4 | "template": {
5 | "forceLanguage": "en"
6 | }
7 | }
--------------------------------------------------------------------------------
/asterisk/acl.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/acl.conf
--------------------------------------------------------------------------------
/asterisk/aeap.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/aeap.conf
--------------------------------------------------------------------------------
/asterisk/asterisk.conf:
--------------------------------------------------------------------------------
1 | [directories]
2 | astcachedir => /tmp
3 | astetcdir => /etc/asterisk
4 | astmoddir => /usr/lib/asterisk/modules
5 | astvarlibdir => /var/lib/asterisk
6 | astdbdir => /var/lib/asterisk
7 | astkeydir => /var/lib/asterisk
8 | astdatadir => /var/lib/asterisk
9 | astagidir => /var/lib/asterisk/agi-bin
10 | astspooldir => /var/spool/asterisk
11 | astrundir => /var/run/asterisk
12 | astlogdir => /var/log/asterisk
13 | astsbindir => /usr/sbin
14 |
15 | [options]
16 |
--------------------------------------------------------------------------------
/asterisk/ccss.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/ccss.conf
--------------------------------------------------------------------------------
/asterisk/cdr.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/cdr.conf
--------------------------------------------------------------------------------
/asterisk/cel.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/cel.conf
--------------------------------------------------------------------------------
/asterisk/cli_aliases.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/cli_aliases.conf
--------------------------------------------------------------------------------
/asterisk/codecs.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/codecs.conf
--------------------------------------------------------------------------------
/asterisk/config.sample.lua:
--------------------------------------------------------------------------------
1 | realm = "rbt"
2 | dm_server = "http://127.0.0.1/asterisk/extensions"
3 | redis_server_host = "127.0.0.1"
4 | redis_server_port = 6379
5 | redis_server_auth = false
6 | log.outfile = false
7 | trunk = "first"
8 | -- hangup_cause = 16
9 | lang = "ru"
10 | --custom = {
11 | -- "custom_script_name"
12 | --}
13 |
--------------------------------------------------------------------------------
/asterisk/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/custom/.placeholder
--------------------------------------------------------------------------------
/asterisk/extconfig.sample.conf:
--------------------------------------------------------------------------------
1 | [settings]
2 | ps_aors = curl,http://127.0.0.1/asterisk/aors
3 | ps_auths = curl,http://127.0.0.1/asterisk/auths
4 | ps_endpoints = curl,http://127.0.0.1/asterisk/endpoints
5 |
--------------------------------------------------------------------------------
/asterisk/extensions.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/extensions.conf
--------------------------------------------------------------------------------
/asterisk/features.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/features.conf
--------------------------------------------------------------------------------
/asterisk/geolocation.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/geolocation.conf
--------------------------------------------------------------------------------
/asterisk/http.sample.conf:
--------------------------------------------------------------------------------
1 | [general]
2 | enabled = yes
3 | bindaddr = 127.0.0.1
4 | bindport = 8088
5 | tlsenable = no
6 |
--------------------------------------------------------------------------------
/asterisk/logger.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/logger.conf
--------------------------------------------------------------------------------
/asterisk/lua/split.lua:
--------------------------------------------------------------------------------
1 | -- Compatibility: Lua-5.1
2 | function split(str, pat)
3 | local t = {} -- NOTE: use {n = 0} in Lua-5.0
4 | local fpat = "(.-)"..pat
5 | local last_end = 1
6 | local s, e, cap = str:find(fpat, 1)
7 | while s do
8 | if s ~= 1 or cap ~= "" then
9 | table.insert(t,cap)
10 | end
11 | last_end = e + 1
12 | s, e, cap = str:find(fpat, last_end)
13 | end
14 | if last_end <= #str then
15 | cap = str:sub(last_end)
16 | table.insert(t, cap)
17 | end
18 | return t
19 | end
20 |
--------------------------------------------------------------------------------
/asterisk/manager.conf:
--------------------------------------------------------------------------------
1 | [general]
2 | enabled = yes
3 | webenabled = yes
4 | port = 5038
5 | bindaddr = 127.0.0.1
6 |
7 | [asterisk]
8 | secret = 881d6256664648e0ebe1ed0e9b1340f2
9 | read = all
10 | write = all
11 |
--------------------------------------------------------------------------------
/asterisk/musiconhold.conf:
--------------------------------------------------------------------------------
1 | [default]
2 | mode = files
3 | sort = random
4 | directory = moh
5 |
--------------------------------------------------------------------------------
/asterisk/phones/placeholder.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/phones/placeholder.conf
--------------------------------------------------------------------------------
/asterisk/pjproject.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/pjproject.conf
--------------------------------------------------------------------------------
/asterisk/pjsip.sample.conf:
--------------------------------------------------------------------------------
1 | [transport-udp]
2 | type = transport
3 | protocol = udp
4 | bind = 0.0.0.0:5060
5 |
6 | [transport-tcp]
7 | type = transport
8 | protocol = tcp
9 | bind = 0.0.0.0:5060
10 |
11 | #include "phones/*.conf"
12 | #include "trunks/*.conf"
13 |
--------------------------------------------------------------------------------
/asterisk/pjsip_wizard.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/pjsip_wizard.conf
--------------------------------------------------------------------------------
/asterisk/prometheus.conf:
--------------------------------------------------------------------------------
1 | [general]
2 | enabled = yes
3 | core_metrics_enabled = yes
4 | uri = metrics
5 | auth_username = prometheus
6 | auth_password = aeshahjui5roo8haGh8bun0shei1Yair
7 |
--------------------------------------------------------------------------------
/asterisk/rtp.conf:
--------------------------------------------------------------------------------
1 | [general]
2 | rtpstart = 10000
3 | rtpend = 20000
4 |
--------------------------------------------------------------------------------
/asterisk/sorcery.conf:
--------------------------------------------------------------------------------
1 | [res_pjsip]
2 | aor = realtime,ps_aors
3 | aor = config,pjsip.conf,criteria=type=aor
4 | auth = realtime,ps_auths
5 | auth = config,pjsip.conf,criteria=type=auth
6 | endpoint = realtime,ps_endpoints
7 | endpoint = config,pjsip.conf,criteria=type=endpoint
8 |
--------------------------------------------------------------------------------
/asterisk/stasis.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/stasis.conf
--------------------------------------------------------------------------------
/asterisk/statsd.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/statsd.conf
--------------------------------------------------------------------------------
/asterisk/stir_shaken.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/stir_shaken.conf
--------------------------------------------------------------------------------
/asterisk/trunks/kamailio.conf:
--------------------------------------------------------------------------------
1 | [kamailio]
2 | type = aor
3 | contact = sip:127.0.0.1:50602
4 |
5 | [kamailio]
6 | type = endpoint
7 | transport = transport-tcp
8 | context = default
9 | disallow = all
10 | allow = alaw,ulaw,h264,h265
11 | aors = kamailio
12 |
--------------------------------------------------------------------------------
/asterisk/trunks/placeholder.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/trunks/placeholder.conf
--------------------------------------------------------------------------------
/asterisk/udptl.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/asterisk/udptl.conf
--------------------------------------------------------------------------------
/changelog.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/changelog.md
--------------------------------------------------------------------------------
/client/css/jstree/default-dark/32px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/css/jstree/default-dark/32px.png
--------------------------------------------------------------------------------
/client/css/jstree/default-dark/40px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/css/jstree/default-dark/40px.png
--------------------------------------------------------------------------------
/client/css/jstree/default-dark/throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/css/jstree/default-dark/throbber.gif
--------------------------------------------------------------------------------
/client/css/jstree/default/32px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/css/jstree/default/32px.png
--------------------------------------------------------------------------------
/client/css/jstree/default/40px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/css/jstree/default/40px.png
--------------------------------------------------------------------------------
/client/css/jstree/default/throbber.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/css/jstree/default/throbber.gif
--------------------------------------------------------------------------------
/client/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/favicon.ico
--------------------------------------------------------------------------------
/client/img/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/404.png
--------------------------------------------------------------------------------
/client/img/admin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/admin.png
--------------------------------------------------------------------------------
/client/img/cctv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/cctv.png
--------------------------------------------------------------------------------
/client/img/lanta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/lanta.png
--------------------------------------------------------------------------------
/client/img/lantaIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/lantaIcon.png
--------------------------------------------------------------------------------
/client/img/lantaText.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/lantaText.png
--------------------------------------------------------------------------------
/client/img/markers-matte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-matte.png
--------------------------------------------------------------------------------
/client/img/markers-matte@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-matte@2x.png
--------------------------------------------------------------------------------
/client/img/markers-plain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-plain.png
--------------------------------------------------------------------------------
/client/img/markers-shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-shadow.png
--------------------------------------------------------------------------------
/client/img/markers-shadow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-shadow@2x.png
--------------------------------------------------------------------------------
/client/img/markers-soft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-soft.png
--------------------------------------------------------------------------------
/client/img/markers-soft@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/markers-soft@2x.png
--------------------------------------------------------------------------------
/client/img/noavatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/noavatar.png
--------------------------------------------------------------------------------
/client/img/noimage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/noimage.png
--------------------------------------------------------------------------------
/client/img/rbt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/rbt.png
--------------------------------------------------------------------------------
/client/img/rbtIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/rbtIcon.png
--------------------------------------------------------------------------------
/client/img/rbtText.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/rbtText.png
--------------------------------------------------------------------------------
/client/img/rosteleset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/rosteleset.png
--------------------------------------------------------------------------------
/client/img/rostelesetIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/rostelesetIcon.png
--------------------------------------------------------------------------------
/client/img/rostelesetText.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/rostelesetText.png
--------------------------------------------------------------------------------
/client/img/smart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/smart.png
--------------------------------------------------------------------------------
/client/img/smartIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/smartIcon.png
--------------------------------------------------------------------------------
/client/img/smartText.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/img/smartText.png
--------------------------------------------------------------------------------
/client/lib/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/lib/.placeholder
--------------------------------------------------------------------------------
/client/modules/about/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/about/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/about/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "about": "RoBoT",
3 | "text": [
4 | "",
5 | "RoBoT - RBT (SmartYard-Server)",
6 | "",
7 | "Client version: %s",
8 | "SmartYard version: %s",
9 | "DB version: %s",
10 | "Customization version: %s",
11 | "
Fully autonomous server part for quick launch of your intercom and video surveillance service SmartYard (Теледом)"
12 | ]
13 | }
--------------------------------------------------------------------------------
/client/modules/about/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "about": "RoBoT",
3 | "text": [
4 | "",
5 | "RoBoT - RBT (SmartYard-Server)",
6 | "",
7 | "Версия клиента: %s",
8 | "Версия SmartYard: %s",
9 | "Версия БД: %s",
10 | "Версия кастомизаций: %s",
11 | "
Полностью автономная серверная часть для быстрого запуска домофонии и видеонаблюдения для мобильных приложений SmartYard (Теледом)"
12 | ]
13 | }
--------------------------------------------------------------------------------
/client/modules/about/readme.md:
--------------------------------------------------------------------------------
1 | Module for showing information about the project
2 |
3 | Depends on the backends: **none**
--------------------------------------------------------------------------------
/client/modules/addresses/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/addresses/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/addresses/readme.md:
--------------------------------------------------------------------------------
1 | The module responsible for the classifier of addresses and the settings of the houses
2 |
3 | Depends on the backends: addresses, cameras, households
--------------------------------------------------------------------------------
/client/modules/asterisk/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/asterisk/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/asterisk/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "asterisk": "WebRTC",
3 | "outgoingCall": "Outgoing Call",
4 | "dialing": "Called: %S",
5 | "dialFail": "Number Dialing Error"
6 | }
--------------------------------------------------------------------------------
/client/modules/asterisk/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "asterisk": "WebRTC",
3 | "outgoingCall": "Исходящий вызов",
4 | "dialing": "Вызывается: %s",
5 | "dialFail": "Ошибка набора номера"
6 | }
--------------------------------------------------------------------------------
/client/modules/asterisk/readme.md:
--------------------------------------------------------------------------------
1 | Module for calls from Web to the application and apartments
2 |
3 | Depends on the backends: **none**
--------------------------------------------------------------------------------
/client/modules/cdr/cdr.js:
--------------------------------------------------------------------------------
1 | // "fake" module, required for adding some i18n translations and API defenitions
2 | // for real CDR backend it must be realized at custom server backend extension
3 | ({
4 | init: function () {
5 | moduleLoaded("cdr", this);
6 | },
7 | }).init();
--------------------------------------------------------------------------------
/client/modules/cdr/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": {
3 | "cdr": {
4 | "_title": "CDR",
5 | "cdr": {
6 | "_title": "CDR",
7 | "POST": "View"
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/client/modules/cdr/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": {
3 | "cdr": {
4 | "_title": "Записи звонков",
5 | "cdr": {
6 | "_title": "Записи звонков",
7 | "POST": "Просмотр"
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/client/modules/companies/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/companies/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/contacts/contacts.js:
--------------------------------------------------------------------------------
1 | ({
2 | meta: [],
3 |
4 | init: function () {
5 | if (AVAIL("contacts", "contacts")) {
6 | leftSide("far fa-fw fa-address-book", i18n("contacts.contacts"), "?#contacts", "contacts");
7 | }
8 | moduleLoaded("contacts", this);
9 | },
10 |
11 | renderContects: function (params) {
12 |
13 | },
14 |
15 | route: function (params) {
16 | document.title = i18n("windowTitle") + " :: " + i18n("contacts.contacts");
17 |
18 | $("#altForm").hide();
19 | subTop();
20 |
21 | modules.contacts.renderContacts(params);
22 | },
23 | }).init();
--------------------------------------------------------------------------------
/client/modules/contacts/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "contact": "Conact",
3 | "contacts": "Contacts",
4 | "methods": {
5 | "companies": {
6 | "_title": "Contacts",
7 | "companies": {
8 | "_title": "Contacts",
9 | "GET": "View"
10 | },
11 | "company": {
12 | "_title": "Conact",
13 | "PUT": "Edit",
14 | "POST": "Create",
15 | "DELETE": "Delete"
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/client/modules/contacts/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "contact": "Контакт",
3 | "contacts": "Контакты",
4 | "methods": {
5 | "companies": {
6 | "_title": "Контакты",
7 | "companies": {
8 | "_title": "Контакты",
9 | "GET": "Доступ"
10 | },
11 | "company": {
12 | "_title": "Контакт",
13 | "POST": "Создание",
14 | "PUT": "Изменение",
15 | "DELETE": "Удаление"
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/client/modules/cs/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/cs/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/custom/version:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/custom/version
--------------------------------------------------------------------------------
/client/modules/darkmode/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "dark":"dark",
3 | "light":"light",
4 | "auto":"auto"
5 | }
--------------------------------------------------------------------------------
/client/modules/darkmode/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "dark":"Темная",
3 | "light":"Светлая",
4 | "auto":"Системная"
5 | }
--------------------------------------------------------------------------------
/client/modules/geocoder/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/geocoder/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/geocoder/geocoder.js:
--------------------------------------------------------------------------------
1 | ({
2 | init: function () {
3 | moduleLoaded("geocoder", this);
4 | },
5 | }).init();
--------------------------------------------------------------------------------
/client/modules/geocoder/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": {
3 | "geo": {
4 | "_title": "Geocoder",
5 | "suggestions": {
6 | "_title": "Geotips",
7 | "GET": "Usage"
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/client/modules/geocoder/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": {
3 | "geo": {
4 | "_title": "Геокодер",
5 | "suggestions": {
6 | "_title": "Геоподсказки",
7 | "GET": "Использование"
8 | }
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/client/modules/groups/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/groups/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/groups/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "gid": "#",
3 | "acronym": "Label",
4 | "name": "Group Name",
5 | "add": "Add Group",
6 | "groups": "Groups",
7 | "group": "Group",
8 | "edit": "Edit Group",
9 | "groupWasChanged": "Changes saved successfully",
10 | "groupWasAdded": "Group added",
11 | "groupWasDeleted": "Group deleted",
12 | "usersCount": "Users",
13 | "users": "Group Users",
14 | "confirmDelete": "Delete group \"#%s\"?",
15 | "delete": "Delete Group",
16 | "admin": "Group Administrator"
17 | }
18 |
--------------------------------------------------------------------------------
/client/modules/groups/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "gid": "#",
3 | "acronym": "Ярлык",
4 | "name": "Имя группы",
5 | "add": "Добавить группу",
6 | "groups": "Группы",
7 | "group": "Группа",
8 | "edit": "Редактирование группы",
9 | "groupWasChanged": "Изменения сохранены успешно",
10 | "groupWasAdded": "Группа добавлена",
11 | "groupWasDeleted": "Группа удалена",
12 | "usersCount": "Пользователей",
13 | "users": "Пользователи группы",
14 | "confirmDelete": "Удалить группу \"#%s\"?",
15 | "delete": "Удалить группу",
16 | "admin": "Администратор группы"
17 | }
--------------------------------------------------------------------------------
/client/modules/groups/readme.md:
--------------------------------------------------------------------------------
1 | User group management module
2 |
3 | Depends on the backends: groups
--------------------------------------------------------------------------------
/client/modules/map/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/map/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/map/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "map": "Map"
3 | }
--------------------------------------------------------------------------------
/client/modules/map/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "map": "Карта"
3 | }
--------------------------------------------------------------------------------
/client/modules/mqtt/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/mqtt/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/mqtt/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
--------------------------------------------------------------------------------
/client/modules/mqtt/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
--------------------------------------------------------------------------------
/client/modules/notes/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "notes": "Notes",
3 | "subject": "Subject",
4 | "body": "Body",
5 | "list": "List",
6 | "category": "Category",
7 | "remind": "Remind",
8 | "icon": "Icon",
9 | "font": "Font",
10 | "color": "Color",
11 | "createNote": "Create note",
12 | "default": "By default",
13 | "checks": "Checkboxes",
14 | "deleteNote": "Delete note?",
15 | "modifyNote": "Modify note"
16 | }
--------------------------------------------------------------------------------
/client/modules/notes/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "notes": "Заметки",
3 | "subject": "Тема",
4 | "body": "Заметка",
5 | "list": "Список",
6 | "category": "Категория",
7 | "remind": "Напоминание",
8 | "icon": "Значок",
9 | "font": "Шрифт",
10 | "color": "Цвет",
11 | "createNote": "Добавить заметку",
12 | "default": "По умолчанию",
13 | "checks": "Список",
14 | "deleteNote": "Удалить заметку?",
15 | "modifyNote": "Изменить заметку"
16 | }
--------------------------------------------------------------------------------
/client/modules/notifications/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/notifications/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/notifications/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/client/modules/notifications/notifications.js:
--------------------------------------------------------------------------------
1 | ({
2 | init: function () {
3 | // leftSide("fas fa-fw fa-mail-bulk blink-icon notifications", i18n("notifications.notifications"), "?#notifications", "tt");
4 | moduleLoaded("notifications", this);
5 | },
6 |
7 | route: function (params) {
8 | subTop();
9 | $("#altForm").hide();
10 |
11 | document.title = i18n("windowTitle") + " :: " + i18n("notifications.notifications");
12 |
13 | $("#mainForm").html(i18n("notifications.notifications"));
14 |
15 | loadingDone();
16 | },
17 | }).init();
--------------------------------------------------------------------------------
/client/modules/permissions/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/permissions/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/permissions/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": "Permissions",
3 | "api": "Section",
4 | "method": "Method",
5 | "action": "Action",
6 | "mode": "Mode",
7 | "allowNone": "Default",
8 | "allowYes": "Allowed",
9 | "allowNo": "Forbidden",
10 | "add": "Add",
11 | "edit": "Edit",
12 | "users": "Users",
13 | "groups": "Groups",
14 | "addRights": "Add the rule",
15 | "methods": {
16 | "authorization": {
17 | "_title": "Authorization",
18 | "rights": {
19 | "_title": "Privilege",
20 | "POST": "Assignment",
21 | "GET": "View"
22 | }
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/client/modules/providers/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/providers/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/queues/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/queues/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/queues/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "queues": "Queues",
3 | "taskId": "#",
4 | "objectType": "Object type",
5 | "objectId": "Object ID",
6 | "methods": {
7 | "queues": {
8 | "_title": "Queues",
9 | "queues": {
10 | "_title": "Queues",
11 | "GET": "View"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/client/modules/queues/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | "queues": "Очереди",
3 | "taskId": "#",
4 | "objectType": "Тип объекта",
5 | "objectId": "ID объекта",
6 | "methods": {
7 | "queues": {
8 | "_title": "Очереди",
9 | "queues": {
10 | "_title": "Очереди",
11 | "GET": "Просмотр"
12 | }
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/client/modules/tt/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/tt/custom/.placeholder
--------------------------------------------------------------------------------
/client/modules/users/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/modules/users/custom/.placeholder
--------------------------------------------------------------------------------
/client/ttf/peignot.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/client/ttf/peignot.ttf
--------------------------------------------------------------------------------
/client/version.app:
--------------------------------------------------------------------------------
1 | ../version
--------------------------------------------------------------------------------
/client/version.cli:
--------------------------------------------------------------------------------
1 | 168
--------------------------------------------------------------------------------
/doc/api/assets/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/android-chrome-192x192.png
--------------------------------------------------------------------------------
/doc/api/assets/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/android-chrome-512x512.png
--------------------------------------------------------------------------------
/doc/api/assets/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/apple-touch-icon.png
--------------------------------------------------------------------------------
/doc/api/assets/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/favicon-16x16.png
--------------------------------------------------------------------------------
/doc/api/assets/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/favicon-32x32.png
--------------------------------------------------------------------------------
/doc/api/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/favicon.ico
--------------------------------------------------------------------------------
/doc/api/assets/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/doc/api/assets/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/doc/api/assets/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/doc/api/assets/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/doc/api/assets/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/doc/api/assets/prism-diff-highlight.css:
--------------------------------------------------------------------------------
1 | pre.diff-highlight > code .token.deleted:not(.prefix),
2 | pre > code.diff-highlight .token.deleted:not(.prefix) {
3 | background-color: rgba(255, 0, 0, .1);
4 | color: inherit;
5 | display: block;
6 | }
7 |
8 | pre.diff-highlight > code .token.inserted:not(.prefix),
9 | pre > code.diff-highlight .token.inserted:not(.prefix) {
10 | background-color: rgba(0, 255, 128, .1);
11 | color: inherit;
12 | display: block;
13 | }
14 |
--------------------------------------------------------------------------------
/doc/examples/client/modules/about/custom/subversion.js:
--------------------------------------------------------------------------------
1 | ({
2 | init: function () {
3 | console.log(modules);
4 | moduleLoaded("about.subversion", this);
5 | },
6 | }).init();
7 |
--------------------------------------------------------------------------------
/doc/examples/client/modules/custom/i18n/ru.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/doc/examples/client/modules/map/custom/cameras.js:
--------------------------------------------------------------------------------
1 | ({
2 | realRoute: false,
3 |
4 | init: function () {
5 | moduleLoaded("map.cameras", this);
6 | },
7 |
8 | route: function (params) {
9 | subTop("cameras");
10 | modules.map.cameras.realRoute(params);
11 | },
12 |
13 | allLoaded: function () {
14 | modules.map.cameras.realRoute = modules.map.route;
15 | modules.map.route = modules.map.cameras.route;
16 | }
17 | }).init();
18 |
--------------------------------------------------------------------------------
/doc/examples/server/api/addresses/custom/house.php:
--------------------------------------------------------------------------------
1 | code .token.deleted:not(.prefix),
2 | pre > code.diff-highlight .token.deleted:not(.prefix) {
3 | background-color: rgba(255, 0, 0, .1);
4 | color: inherit;
5 | display: block;
6 | }
7 |
8 | pre.diff-highlight > code .token.inserted:not(.prefix),
9 | pre > code.diff-highlight .token.inserted:not(.prefix) {
10 | background-color: rgba(0, 255, 128, .1);
11 | color: inherit;
12 | display: block;
13 | }
14 |
--------------------------------------------------------------------------------
/install/02.nodejs.md:
--------------------------------------------------------------------------------
1 | ## Install Node.js
2 |
3 | ```bash
4 | curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
5 | apt-get update -y && apt-get install -y yarn nodejs
6 | ```
7 |
8 | [Next](03.postgresql.md)
9 |
--------------------------------------------------------------------------------
/install/04.bouncer.md:
--------------------------------------------------------------------------------
1 | ## Install PgBouncer
2 |
3 | 01. Install
4 | ```bash
5 | apt install -y pgbouncer
6 | ```
7 |
8 | 02. Copy pgbouncer config
9 | ```bash
10 | rm -rf /etc/pgbouncer
11 | ln -sf /opt/rbt/install/pgbouncer /etc/pgbouncer
12 | ```
13 |
14 | [Next](05.clickhouse.md)
15 |
--------------------------------------------------------------------------------
/install/08.nginx.md:
--------------------------------------------------------------------------------
1 | ## Configure Nginx
2 |
3 | ```bash
4 | rm /etc/nginx/sites-enabled/default
5 | ln -sf /opt/rbt/install/nginx/rbt_force_ssl /etc/nginx/sites-enabled/rbt
6 | ```
7 |
8 | [Next](09.acme.md)
9 |
--------------------------------------------------------------------------------
/install/09.acme.md:
--------------------------------------------------------------------------------
1 | ## Get SSL certificate
2 |
3 | ```bash
4 | curl https://get.acme.sh | sh -s email=
5 | ```
6 |
7 | ```bash
8 | acme.sh --set-default-ca --server letsencrypt
9 | ```
10 |
11 | ```bash
12 | acme.sh --issue -d example.com -w /var/www/html
13 | ```
14 |
15 | ```bash
16 | acme.sh --install-cert -d example.com --key-file /etc/ssl/key.pem --fullchain-file /etc/ssl/cert.pem --reloadcmd "service nginx force-reload"
17 | ```
18 |
19 | [Next](10.asterisk.md)
20 |
--------------------------------------------------------------------------------
/install/12.falprs.md:
--------------------------------------------------------------------------------
1 | Use the FALPRS project instructions at this [link](https://github.com/rosteleset/falprs?tab=readme-ov-file#build_and_setup_falprs).
2 |
3 | [Next](13.push.md)
4 |
--------------------------------------------------------------------------------
/install/14.mosquitto.md:
--------------------------------------------------------------------------------
1 | ## Install Mosquitto
2 |
3 | ```bash
4 | ln -sf /opt/rbt/install/mosquitto/rbt.conf /etc/mosquitto/conf.d/rbt.conf
5 | mosquitto_passwd -c -b /opt/rbt/install/mosquitto/passwd rbt
6 | ```
7 |
8 | ```bash
9 | cd /opt/rbt/server/services/mqtt
10 | npm i express mqtt redis
11 | ```
12 |
13 | ```bash
14 | ln -sf /opt/rbt/install/systemd/mqtt.service /etc/systemd/system/mqtt.service
15 | ```
16 |
17 | ```bash
18 | systemctl enable mqtt
19 | systemctl start mqtt
20 | ```
21 |
22 | [Next](15.onlyoffice.md)
23 |
--------------------------------------------------------------------------------
/install/15.onlyoffice.md:
--------------------------------------------------------------------------------
1 | ## Install OnlyOffice server (only if you need print forms for your tasks)
2 |
3 | ```bash
4 | apt-get install libstdc++6 libcurl3-gnutls libc6 libxml2 libcurl4 fonts-dejavu fonts-opensymbol fonts-liberation ttf-mscorefonts-installer fonts-crosextra-carlito
5 | ```
6 |
7 | ```bash
8 | wget https://download.onlyoffice.com/install/desktop/docbuilder/linux/onlyoffice-documentbuilder_amd64.deb -O /tmp/onlyoffice-documentbuilder_amd64.deb
9 | ```
10 |
11 | ```bash
12 | dpkg --install /tmp/onlyoffice-documentbuilder_amd64.deb
13 | ```
14 |
15 | [Next](99.post_install.md)
16 |
--------------------------------------------------------------------------------
/install/93.pwa.md:
--------------------------------------------------------------------------------
1 | ## Install PWA app
2 |
3 | https://github.com/rosteleset/SmartYard-TT-PWA
4 |
--------------------------------------------------------------------------------
/install/94.desktop.md:
--------------------------------------------------------------------------------
1 | ## Install "desktop" CCTV app
2 |
3 | https://github.com/rosteleset/SmartYard-Vue
4 |
--------------------------------------------------------------------------------
/install/99.post_install.md:
--------------------------------------------------------------------------------
1 | don't forget to disable firewall or enable incoming connections to ports:
2 |
3 | nginx:
4 |
5 | ```
6 | 80,443/tcp
7 | ```
8 |
9 | asterisk:
10 |
11 | ```
12 | 5060/tcp
13 | 5060/udp
14 | 10000:20000/udp
15 | ```
16 |
--------------------------------------------------------------------------------
/install/deb/libssl1.1_1.1.1o-1_amd64.deb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/install/deb/libssl1.1_1.1.1o-1_amd64.deb
--------------------------------------------------------------------------------
/install/kamailio/dev/v4/tls.cfg:
--------------------------------------------------------------------------------
1 | [server:default]
2 | method = TLSv1.2+
3 | certificate = /etc/letsencrypt/live/domain.example/fullchain.pem
4 | private_key = /etc/letsencrypt/live/domain.example/privkey.pem
5 |
6 | [client:default]
7 | method = TLSv1.2+
8 | verify_certificate = yes
9 | require_certificate = yes
10 |
--------------------------------------------------------------------------------
/install/kamailio/tls.cfg:
--------------------------------------------------------------------------------
1 | [server:default]
2 | method = TLSv1.2+
3 | certificate = /etc/letsencrypt/live/domain.example/fullchain.pem
4 | private_key = /etc/letsencrypt/live/domain.example/privkey.pem
5 |
6 | [client:default]
7 | method = TLSv1.2+
8 | verify_certificate = yes
9 | require_certificate = yes
10 |
--------------------------------------------------------------------------------
/install/logrotate/asterisk:
--------------------------------------------------------------------------------
1 | /var/log/asterisk/*log {
2 | daily
3 | missingok
4 | rotate 3
5 | compress
6 | notifempty
7 | postrotate
8 | /usr/sbin/asterisk -rx "logger reload" > /dev/null 2> /dev/null
9 | endscript
10 | }
11 |
--------------------------------------------------------------------------------
/install/logrotate/event:
--------------------------------------------------------------------------------
1 | /var/log/event_service/*.log {
2 | daily
3 | missingok
4 | rotate 3
5 | compress
6 | notifempty
7 | copytruncate
8 | dateext
9 | dateformat -%Y-%m-%d
10 | }
11 |
--------------------------------------------------------------------------------
/install/logrotate/frs:
--------------------------------------------------------------------------------
1 | /var/log/frs/*.log {
2 | rotate 3
3 | daily
4 | compress
5 | missingok
6 | notifempty
7 | copytruncate
8 | }
9 |
--------------------------------------------------------------------------------
/install/logrotate/rbt_push:
--------------------------------------------------------------------------------
1 | /var/log/rbt_push_service/*.log {
2 | daily
3 | missingok
4 | rotate 7
5 | compress
6 | notifempty
7 | copytruncate
8 | dateext
9 | dateformat -%Y-%m-%d
10 | }
--------------------------------------------------------------------------------
/install/monitoring/prometheus/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/install/monitoring/prometheus/.placeholder
--------------------------------------------------------------------------------
/install/monitoring/zabbix/agent/rbt/systemd_services.conf:
--------------------------------------------------------------------------------
1 | UserParameter=systemd.unit.is-active[*],systemctl is-active --quiet '$1' && echo 1 || echo 0
2 | UserParameter=systemd.unit.is-failed[*],systemctl is-failed --quiet '$1' && echo 1 || echo 0
3 | UserParameter=systemd.unit.is-enabled[*],systemctl is-enabled --quiet '$1' && echo 1 || echo 0
4 |
--------------------------------------------------------------------------------
/install/monitoring/zabbix/templates/v6.x/camera/zbx_camera_template_simple.yaml:
--------------------------------------------------------------------------------
1 | zabbix_export:
2 | version: '6.4'
3 | template_groups:
4 | - uuid: 0dc1da9287cd4310a74fb94f3d979008
5 | name: Templates/Cameras
6 | templates:
7 | - uuid: 59a318f11f524f2bb31e42fd6ffe4840
8 | template: Camera_simple
9 | name: 'Camera | Simple check'
10 | vendor:
11 | name: SmartYard
12 | version: 6.4-0
13 | templates:
14 | - name: 'ICMP Ping'
15 | groups:
16 | - name: Templates/Cameras
17 |
--------------------------------------------------------------------------------
/install/monitoring/zabbix/templates/v7.x/camera/zbx_camera_template_simple.yaml:
--------------------------------------------------------------------------------
1 | zabbix_export:
2 | version: '7.2'
3 | template_groups:
4 | - uuid: 0dc1da9287cd4310a74fb94f3d979008
5 | name: Templates/Cameras
6 | templates:
7 | - uuid: 59a318f11f524f2bb31e42fd6ffe4840
8 | template: Camera_simple
9 | name: 'Camera | Simple check'
10 | vendor:
11 | name: SmartYard
12 | version: 2025-04
13 | templates:
14 | - name: 'ICMP Ping'
15 | groups:
16 | - name: Templates/Cameras
17 |
--------------------------------------------------------------------------------
/install/mosquitto/passwd:
--------------------------------------------------------------------------------
1 | rbt:$7$101$vdqM7ZZ50DCnRPAL$lAGduFEhnVMtLY+r5XTsZkgnGao2hwrPVySOW03WYN22TqtiMJBzM19HzaoHpYGQaQV+W9Fodf1aFxYtf8fAUA==
2 |
--------------------------------------------------------------------------------
/install/mosquitto/rbt.conf:
--------------------------------------------------------------------------------
1 | password_file /opt/rbt/install/mosquitto/passwd
2 |
3 | listener 8081 127.0.0.1
4 | socket_domain ipv4
5 | protocol websockets
6 | allow_anonymous false
7 |
8 | listener 1883 127.0.0.1
9 | socket_domain ipv4
10 | protocol mqtt
11 | allow_anonymous false
12 |
--------------------------------------------------------------------------------
/install/pgbouncer/userlist.txt:
--------------------------------------------------------------------------------
1 | rbt rbt
2 |
--------------------------------------------------------------------------------
/install/prometheus_stack/services/alertmanager/config.yml:
--------------------------------------------------------------------------------
1 | route:
2 | receiver: 'alertmanager-bot'
3 |
4 | receivers:
5 | - name: 'alertmanager-bot'
6 | webhook_configs:
7 | - send_resolved: true
8 | url: 'http://alertmanager:4293'
--------------------------------------------------------------------------------
/install/prometheus_stack/services/process-exporter/process-exporter.yml:
--------------------------------------------------------------------------------
1 | process_names:
2 | - name: mysqld
3 | cmdline:
4 | - 'mysqld'
5 | - name: run_php
6 | cmdline:
7 | - 'run_frs'
8 | - name: php-fpm
9 | cmdline:
10 | - 'php-fpm'
11 |
--------------------------------------------------------------------------------
/install/prometheus_stack/services/prometheus/web.yml:
--------------------------------------------------------------------------------
1 | # user: admin password: prometheus
2 | basic_auth_users:
3 | admin: $2b$10$leOsqgS/qbXg2aHY/WETqOh2pFdWL4cD3bN0WynA3fpRNDLhy8sqG
4 |
--------------------------------------------------------------------------------
/install/rtpengine/rtpengine.sample.conf:
--------------------------------------------------------------------------------
1 | [rtpengine]
2 | interface = any
3 | listen-ng = localhost:2223
4 | listen-http = localhost:2225
5 | listen-cli = localhost:2224
6 | timeout = 60
7 | silent-timeout = 3600
8 | tos = 184
9 | port-min = 10000
10 | port-max = 40000
11 | recording-dir = /var/spool/rtpengine
12 | recording-method = proc
13 |
--------------------------------------------------------------------------------
/install/systemd/asterisk.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Asterisk PBX and telephony daemon
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | Environment=HOME=/var/lib/asterisk
8 | WorkingDirectory=/var/lib/asterisk
9 | User=asterisk
10 | Group=asterisk
11 | ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf
12 | ExecReload=/usr/sbin/asterisk -rx 'core reload'
13 | LimitCORE=infinity
14 | Restart=always
15 | RestartSec=4
16 | StandardOutput=null
17 | PrivateTmp=true
18 | ExecStartPre=+/bin/bash -c '[ ! -d "/var/run/asterisk" ] && /bin/mkdir /var/run/asterisk ; /bin/chown -R asterisk:asterisk /var/{lib,log,run,spool}/asterisk'
19 |
20 | [Install]
21 | WantedBy=multi-user.target
22 |
--------------------------------------------------------------------------------
/install/systemd/event/event_is.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Event service for Intersvyaz intercom syslog messages
3 | Documentation=https://github.com/rosteleset/SmartYard-Server/tree/main/install
4 | After=network.target
5 |
6 | [Service]
7 | SyslogIdentifier=event_is
8 | Type=simple
9 | WorkingDirectory=/opt/rbt/server/services/event/
10 | ExecStart=/usr/bin/node /opt/rbt/server/services/event/index.js is
11 | RestartSec=10
12 | Restart=always
13 | User=rbt
14 | Group=rbt
15 | LimitCORE=infinity
16 | KillMode=process
17 | StandardOutput=null
18 | #StandardOutput=append:/var/log/event_service/event_is.log
19 | StandardError=append:/var/log/event_service/event_is.error.log
20 |
21 | [Install]
22 | WantedBy=multi-user.target
23 |
--------------------------------------------------------------------------------
/install/systemd/frs.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Face Recognition System
3 | Wants=network.target
4 | After=syslog.target network-online.target mysql.service
5 |
6 | [Service]
7 | Type=simple
8 | ExecStart=/opt/frs/frs --frs-config /opt/frs/sample.config
9 | Restart=on-failure
10 | RestartSec=10
11 | KillMode=control-group
12 | User=frs
13 | Group=frs
14 | StandardError=file:/var/log/frs/error.log
15 |
16 | [Install]
17 | WantedBy=multi-user.target
18 |
--------------------------------------------------------------------------------
/install/systemd/mqtt.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=MQTT agent
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | Environment=HOME=/tmp
8 | WorkingDirectory=/tmp
9 | User=www-data
10 | Group=www-data
11 | ExecStart=/opt/rbt/server/services/mqtt/agent.js
12 | LimitCORE=infinity
13 | Restart=always
14 | RestartSec=4
15 | StandardOutput=null
16 | PrivateTmp=true
17 |
18 | [Install]
19 | WantedBy=multi-user.target
20 |
--------------------------------------------------------------------------------
/install/tt_demo/tt_mobile_demo_workflow.lua:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/install/tt_demo/tt_mobile_demo_workflow.lua
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | ### RoBoT - RBT (SmartYard-Server)
2 | Fully autonomous server part for quick launch of your intercom and video surveillance service
3 |
4 | ### [Important information](https://github.com/rosteleset/SmartYard-Server/blob/main/important.md)
5 |
6 | ### [Installation](https://github.com/rosteleset/SmartYard-Server/tree/main/install) (start from 01.nooble.md)
7 |
8 | ### [Wiki](https://github.com/rosteleset/SmartYard-Server/wiki)
9 |
10 | ### [SERVER API](https://rosteleset.github.io/SmartYard-Server/doc/api/) (WiP)
11 |
12 | ### [MOBILE API](https://rosteleset.github.io/SmartYard-Server/doc/mobile/) (WiP)
13 |
--------------------------------------------------------------------------------
/server/.gitignore:
--------------------------------------------------------------------------------
1 | var
2 | vendor
3 |
4 | # Lock on very precise versions to avoid interfering with dependencies expansion. Merging the lock file is a headache
5 | composer.lock
6 |
--------------------------------------------------------------------------------
/server/api/accounts/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/accounts/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/addresses/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/addresses/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/api-header.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/api-header.md
--------------------------------------------------------------------------------
/server/api/apidoc.json:
--------------------------------------------------------------------------------
1 | {
2 | "header": {
3 | "title": "Common part",
4 | "filename": "api-header.md",
5 | "version": "1.0.0"
6 | }
7 | }
--------------------------------------------------------------------------------
/server/api/authentication/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/authentication/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/authorization/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/authorization/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/cameras/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/cameras/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/cdr/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/cdr/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/companies/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/companies/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/configs/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/configs/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/contacts/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/contacts/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/cs/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/cs/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/custom/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/custom/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/files/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/files/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/geo/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/geo/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/houses/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/houses/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/inbox/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/inbox/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/mqtt/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/mqtt/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/notes/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/notes/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/providers/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/providers/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/queues/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/queues/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/server/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/server/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/subscribers/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/subscribers/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/tt/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/tt/custom/.placeholder
--------------------------------------------------------------------------------
/server/api/user/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/api/user/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/accounting/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/accounting/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/accounting/readme.md:
--------------------------------------------------------------------------------
1 | Module for storing and processing logs
--------------------------------------------------------------------------------
/server/backends/addresses/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/addresses/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/addresses/readme.md:
--------------------------------------------------------------------------------
1 | Module for working with an address classifier (with accuracy to home)
--------------------------------------------------------------------------------
/server/backends/authentication/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/authentication/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/authorization/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/authorization/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/cameras/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/cameras/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/cdr/cdr.php:
--------------------------------------------------------------------------------
1 | getSubscribers("id", $subscriberId)[0];
16 |
17 | return 'your custom token for number ' . $subscriber['mobile'];
18 | }
19 |
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/server/backends/dvr_exports/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/dvr_exports/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/files/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/files/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/frs/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/frs/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/geocoder/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/geocoder/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/geocoder/geocoder.php:
--------------------------------------------------------------------------------
1 | config["backends"]["isdn"]["sms_secret"]));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server/backends/isdn/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/backends/isdn/custom/.placeholder
--------------------------------------------------------------------------------
/server/backends/isdn/lanta/lanta.php:
--------------------------------------------------------------------------------
1 | =8.1",
6 | "colinodell/json5": "3.0.0",
7 | "erusev/parsedown": "1.7.4",
8 | "ezyang/htmlpurifier": "4.18.0",
9 | "mobiledetect/mobiledetectlib": "4.8.09",
10 | "mongodb/mongodb": "2.0",
11 | "phpmailer/phpmailer": "6.9.3"
12 | },
13 | "config": {
14 | "sort-packages": true
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v1_core.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS core_vars
2 | (
3 | `var_name` String,
4 | `var_value` String
5 | ) ENGINE = ReplacingMergeTree ORDER BY var_name;
6 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v1_database.sql:
--------------------------------------------------------------------------------
1 | CREATE
2 | DATABASE IF NOT EXISTS default;
3 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v1_inbox.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS default.inbox
2 | (
3 | `date` UInt32,
4 | `id` String,
5 | `msg` String,
6 | `action` String
7 | )
8 | ENGINE = MergeTree
9 | PARTITION BY toYYYYMM(FROM_UNIXTIME(date))
10 | ORDER BY date
11 | TTL FROM_UNIXTIME(date) + toIntervalYear(1)
12 | SETTINGS index_granularity = 8192;
13 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v1_syslog.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS default.syslog
2 | (
3 | `date` UInt32,
4 | `ip` IPv4,
5 | `sub_id` String,
6 | `unit` String,
7 | `msg` String,
8 | INDEX syslog_ip ip TYPE set(100) GRANULARITY 1024,
9 | INDEX syslog_sub_id sub_id TYPE set(100) GRANULARITY 1024,
10 | INDEX syslog_unit unit TYPE set(100) GRANULARITY 1024
11 | ) ENGINE = MergeTree
12 | PARTITION BY (toYYYYMMDD(FROM_UNIXTIME(date)), unit)
13 | ORDER BY date
14 | TTL FROM_UNIXTIME(date) + toIntervalDay(31)
15 | SETTINGS index_granularity = 8192;
16 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v1_ttlog.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS default.ttlog
2 | (
3 | `date` UInt32,
4 | `issue` String,
5 | `login` String,
6 | `action` String,
7 | `old` String,
8 | `new` String,
9 | INDEX ttlog_date date TYPE set(100) GRANULARITY 1024,
10 | INDEX ttlog_issue issue TYPE set(100) GRANULARITY 1024,
11 | INDEX ttlog_login login TYPE set(100) GRANULARITY 1024
12 | )
13 | ENGINE = MergeTree
14 | PARTITION BY toYYYYMMDD(FROM_UNIXTIME(date))
15 | ORDER BY date
16 | TTL FROM_UNIXTIME(date) + toIntervalYear(5)
17 | SETTINGS index_granularity = 1024;
18 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v2_syslog.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE default.syslog
2 | ADD COLUMN IF NOT EXISTS sub_id String AFTER ip,
3 | ADD INDEX IF NOT EXISTS syslog_sub_id sub_id TYPE set(100) GRANULARITY 1024;
4 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v3_nlog.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS default.nlog
2 | (
3 | `date` UInt32,
4 | `login` String,
5 | `subject` String,
6 | `message` String,
7 | `target` String,
8 | INDEX nlog_date date TYPE set(100) GRANULARITY 1024,
9 | INDEX nlog_login login TYPE set(100) GRANULARITY 1024
10 | )
11 | ENGINE = MergeTree
12 | PARTITION BY toYYYYMMDD(FROM_UNIXTIME(date))
13 | ORDER BY date
14 | TTL FROM_UNIXTIME(date) + toIntervalYear(5)
15 | SETTINGS index_granularity = 1024;
16 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v4_inbox.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE inbox
2 | ADD COLUMN IF NOT EXISTS `msg_id` integer FIRST,
3 | ADD COLUMN IF NOT EXISTS `house_subscriber_id` integer AFTER msg_id,
4 | ADD COLUMN IF NOT EXISTS `title` String AFTER id,
5 | ADD COLUMN IF NOT EXISTS `code` String AFTER action,
6 | MODIFY COLUMN `id` String AFTER house_subscriber_id;
7 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v5_inbox.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE inbox DROP COLUMN house_subscriber_id;
--------------------------------------------------------------------------------
/server/data/clickhouse/v6_nlog.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE nlog (ADD COLUMN IF NOT EXISTS `id` String AFTER login);
2 | ALTER TABLE nlog (ADD COLUMN IF NOT EXISTS `uid` Integer AFTER login);
3 | ALTER TABLE nlog (ADD COLUMN IF NOT EXISTS `to` String AFTER login);
4 |
--------------------------------------------------------------------------------
/server/data/clickhouse/v7_plog.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE plog ADD COLUMN IF NOT EXISTS `vehicle` String AFTER preview;
2 |
--------------------------------------------------------------------------------
/server/data/files/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/data/files/.placeholder
--------------------------------------------------------------------------------
/server/data/install_clickhouse.json:
--------------------------------------------------------------------------------
1 | {
2 | "1": [
3 | "v1_database.sql",
4 | "v1_core.sql",
5 | "v1_inbox.sql",
6 | "v1_plog.sql",
7 | "v1_syslog.sql",
8 | "v1_ttlog.sql"
9 | ],
10 | "2": [
11 | "v2_syslog.sql"
12 | ],
13 | "3": [
14 | "v3_nlog.sql"
15 | ],
16 | "4": [
17 | "v4_inbox.sql"
18 | ],
19 | "5": [
20 | "v5_inbox.sql"
21 | ],
22 | "6": [
23 | "v6_nlog.sql"
24 | ],
25 | "7": [
26 | "v7_plog.sql"
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/server/data/pgsql/v10_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD IF NOT EXISTS contract character varying;
2 | CREATE INDEX IF NOT EXISTS houses_flats_contract on houses_flats(contract);
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v11_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields_options ADD IF NOT EXISTS option_display character varying;
--------------------------------------------------------------------------------
/server/data/pgsql/v12_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD IF NOT EXISTS primary_group integer;
2 | ALTER TABLE core_groups ADD IF NOT EXISTS admin integer;
--------------------------------------------------------------------------------
/server/data/pgsql/v13_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD IF NOT EXISTS timezone character varying;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v14_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD IF NOT EXISTS login character varying;
2 | ALTER TABLE houses_flats ADD IF NOT EXISTS password character varying;
3 | CREATE UNIQUE INDEX IF NOT EXISTS houses_flats_login on houses_flats(login);
4 |
--------------------------------------------------------------------------------
/server/data/pgsql/v16_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_entrances ADD IF NOT EXISTS video character varying;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v17_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD IF NOT EXISTS sub_id character varying;
--------------------------------------------------------------------------------
/server/data/pgsql/v17_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD IF NOT EXISTS sub_id character varying;
--------------------------------------------------------------------------------
/server/data/pgsql/v17_plog.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE plog_call_done ADD IF NOT EXISTS sub_id character varying;
2 | ALTER TABLE plog_door_open ADD IF NOT EXISTS sub_id character varying;
--------------------------------------------------------------------------------
/server/data/pgsql/v18_tt.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE tt_prints (
2 | tt_print_id SERIAL PRIMARY KEY,
3 | form_name CHARACTER VARYING NOT NULL,
4 | extension CHARACTER VARYING NOT NULL,
5 | description CHARACTER VARYING NOT NULL
6 | );
7 |
8 | CREATE UNIQUE INDEX tt_prints_uniq ON tt_prints (form_name);
--------------------------------------------------------------------------------
/server/data/pgsql/v19_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields ADD IF NOT EXISTS catalog CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v1_dvr.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE camera_records
2 | (
3 | record_id serial primary key,
4 | camera_id integer not null,
5 | subscriber_id integer not null,
6 | start integer,
7 | finish integer,
8 | filename CHARACTER VARYING,
9 | expire integer,
10 | state integer -- 0 = created, 1 = in progress, 2 = completed, 3 = error
11 | );
12 | CREATE INDEX camera_records_status on camera_records(state);
13 | CREATE INDEX camera_records_expire on camera_records(expire);
14 |
--------------------------------------------------------------------------------
/server/data/pgsql/v1_providers.sql:
--------------------------------------------------------------------------------
1 | -- providers
2 | CREATE TABLE providers
3 | (
4 | provider_id serial primary key,
5 | id character varying not null,
6 | name character varying,
7 | base_url character varying,
8 | logo character varying,
9 | token_common character varying, -- for push and outgoing calls
10 | token_sms character varying,
11 | hidden integer
12 | );
13 | CREATE UNIQUE INDEX providers_id on providers (id);
14 | CREATE UNIQUE INDEX providers_name on providers (name);
15 |
--------------------------------------------------------------------------------
/server/data/pgsql/v1_tasks.sql:
--------------------------------------------------------------------------------
1 | -- tasks_changes
2 | CREATE TABLE tasks_changes
3 | (
4 | task_change_id serial primary key,
5 | object_type character varying,
6 | object_id integer
7 | );
8 | CREATE UNIQUE INDEX tasks_changes_uniq on tasks_changes(object_type, object_id);
9 |
--------------------------------------------------------------------------------
/server/data/pgsql/v20_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_statuses ADD IF NOT EXISTS final INTEGER DEFAULT 0;
--------------------------------------------------------------------------------
/server/data/pgsql/v21_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD IF NOT EXISTS sound INTEGER DEFAULT 0 NOT NULL;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v22_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD IF NOT EXISTS name CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v23_addresses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE addresses_houses ADD IF NOT EXISTS company_id INTEGER DEFAULT 0;
2 |
3 | CREATE INDEX IF NOT EXISTS addresses_houses_company_id ON addresses_houses (company_id);
--------------------------------------------------------------------------------
/server/data/pgsql/v24_comments.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN comments character varying;
2 |
3 | ALTER TABLE houses_domophones ADD COLUMN comments character varying;
4 | UPDATE houses_domophones set comments = comment;
5 | ALTER TABLE houses_domophones DROP COLUMN comment;
6 |
7 | ALTER TABLE companies ADD COLUMN comments character varying;
8 | UPDATE companies set comments = comment;
9 | ALTER TABLE companies DROP COLUMN comment;
10 |
--------------------------------------------------------------------------------
/server/data/pgsql/v25_houses.sql:
--------------------------------------------------------------------------------
1 | UPDATE houses_domophones SET model = 'dks.json' WHERE model LIKE 'dks%';
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v26_core.sql:
--------------------------------------------------------------------------------
1 | CREATE UNIQUE INDEX core_vars_var_uniq on core_vars(var_name);
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v27_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_cameras_houses ADD IF NOT EXISTS path CHARACTER VARYING;
2 | ALTER TABLE houses_cameras_flats ADD IF NOT EXISTS path CHARACTER VARYING;
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v29_ua.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_devices ADD IF NOT EXISTS ua CHARACTER VARYING;
2 | ALTER TABLE houses_subscribers_devices ADD IF NOT EXISTS ip CHARACTER VARYING;
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v30_houses.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX IF NOT EXISTS houses_rfids_rfid on houses_rfids(rfid);
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v31_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats_subscribers ADD IF NOT EXISTS voip_enabled integer default 1;
--------------------------------------------------------------------------------
/server/data/pgsql/v32_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD IF NOT EXISTS secret character varying;
2 | ALTER TABLE core_users ADD IF NOT EXISTS two_fa integer default 0;
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v33_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_mobile ADD IF NOT EXISTS subscriber_last character varying;
--------------------------------------------------------------------------------
/server/data/pgsql/v34_cameras.sql:
--------------------------------------------------------------------------------
1 | UPDATE cameras SET model = 'is.json' WHERE model = 'iscomx1plus.json';
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v35_indexes.sql:
--------------------------------------------------------------------------------
1 | -- changa indexes
2 | DROP INDEX houses_subscribers_devices_uniq_1;
--------------------------------------------------------------------------------
/server/data/pgsql/v36_tt.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS tt_favorite_filters
2 | (
3 | login CHARACTER VARYING,
4 | filter CHARACTER VARYING,
5 | right_side INTEGER DEFAULT 0,
6 | icon CHARACTER VARYING
7 | );
8 | CREATE UNIQUE INDEX IF NOT EXISTS tt_favorite_filters_uniq on tt_favorite_filters (login, filter);
--------------------------------------------------------------------------------
/server/data/pgsql/v37_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_favorite_filters ADD IF NOT EXISTS color CHARACTER VARYING
--------------------------------------------------------------------------------
/server/data/pgsql/v38_settings.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD IF NOT EXISTS settings CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v39_core.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE core_inbox
2 | (
3 | msg_id SERIAL PRIMARY KEY,
4 | msg_date INTEGER,
5 | msg_from CHARACTER VARYING,
6 | msg_to CHARACTER VARYING,
7 | msg_subject CHARACTER VARYING,
8 | msg_type CHARACTER VARYING,
9 | msg_body CHARACTER VARYING,
10 | msg_readed INTEGER
11 | );
12 | CREATE INDEX core_msg_to ON core_inbox(msg_to);
--------------------------------------------------------------------------------
/server/data/pgsql/v3_tasks.sql:
--------------------------------------------------------------------------------
1 | -- tasks_changes
2 | DROP INDEX tasks_changes_uniq;
3 | ALTER TABLE tasks_changes DROP COLUMN object_id;
4 | ALTER TABLE tasks_changes ADD IF NOT EXISTS object_id character varying;
5 | CREATE UNIQUE INDEX tasks_changes_uniq on tasks_changes(object_type, object_id);
6 |
--------------------------------------------------------------------------------
/server/data/pgsql/v40_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_inbox ADD IF NOT EXISTS msg_handler CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v42_core.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX core_msg_type ON core_inbox(msg_type);
2 | CREATE INDEX core_msg_date ON core_inbox(msg_date);
3 | CREATE INDEX core_msg_readed ON core_inbox(msg_readed);
--------------------------------------------------------------------------------
/server/data/pgsql/v43_addresses.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE addresses_favorites
2 | (
3 | login CHARACTER VARYING,
4 | object CHARACTER VARYING,
5 | id INTEGER,
6 | title CHARACTER VARYING,
7 | icon CHARACTER VARYING,
8 | color CHARACTER VARYING
9 | );
10 | CREATE INDEX addresses_favorites_login ON addresses_favorites(login);
11 | CREATE UNIQUE INDEX addresses_favorites_uniq ON addresses_favorites(login, object, id);
12 |
--------------------------------------------------------------------------------
/server/data/pgsql/v44_tt.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE tt_projects_custom_fields_nojournal
2 | (
3 | project_custom_field_id SERIAL PRIMARY KEY,
4 | project_id INTEGER,
5 | issue_custom_field_id INTEGER
6 | );
7 | CREATE UNIQUE INDEX tt_projects_custom_fields_nojournal_uniq ON tt_projects_custom_fields (project_id, issue_custom_field_id);
8 |
--------------------------------------------------------------------------------
/server/data/pgsql/v46_mult.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX IF NOT EXISTS houses_subscribers_devices_device_token ON houses_subscribers_devices (device_token);
--------------------------------------------------------------------------------
/server/data/pgsql/v47_inbox.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE inbox DROP COLUMN IF EXISTS house_subscriber_id;
--------------------------------------------------------------------------------
/server/data/pgsql/v48_mult.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_devices ADD IF NOT EXISTS push_disable INTEGER DEFAULT 0;
2 | ALTER TABLE houses_subscribers_devices ADD IF NOT EXISTS money_disable INTEGER DEFAULT 0;
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v49_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users DROP IF EXISTS two_fa;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v4_cameras.sql:
--------------------------------------------------------------------------------
1 | -- cameras
2 | CREATE INDEX IF NOT EXISTS cameras_common on cameras(common);
3 |
4 |
--------------------------------------------------------------------------------
/server/data/pgsql/v50_version.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_devices ADD IF NOT EXISTS version CHARACTER VARYING;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v52_indexes.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX IF NOT EXISTS core_users_primary_group ON core_users(primary_group);
2 | CREATE INDEX IF NOT EXISTS core_groups_admin on core_groups(admin);
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v53_avatar.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD IF NOT EXISTS avatar CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v54_households.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats_devices DROP CONSTRAINT IF EXISTS houses_flats_devices_pkey;
2 | ALTER TABLE houses_flats_devices DROP COLUMN IF EXISTS house_flat_device_id;
3 | ALTER TABLE houses_flats_devices ADD COLUMN IF NOT EXISTS houses_flat_device_id SERIAL NOT NULL;
4 | ALTER TABLE houses_flats_devices ADD CONSTRAINT houses_flats_devices_pkey PRIMARY KEY (houses_flat_device_id);
5 |
--------------------------------------------------------------------------------
/server/data/pgsql/v55_core.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE IF NOT EXISTS core_users_notifications_queue
2 | (
3 | notification_id SERIAL PRIMARY KEY,
4 | login CHARACTER VARYING,
5 | uid INTEGER,
6 | subject CHARACTER VARYING,
7 | message CHARACTER VARYING
8 | );
9 |
--------------------------------------------------------------------------------
/server/data/pgsql/v56_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras DROP IF EXISTS md_left;
2 | ALTER TABLE cameras DROP IF EXISTS md_top;
3 | ALTER TABLE cameras DROP IF EXISTS md_width;
4 | ALTER TABLE cameras DROP IF EXISTS md_height;
5 | ALTER TABLE cameras ADD IF NOT EXISTS md_area CHARACTER VARYING;
6 | ALTER TABLE cameras ADD IF NOT EXISTS rc_area CHARACTER VARYING;
7 |
--------------------------------------------------------------------------------
/server/data/pgsql/v57_domophones.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD IF NOT EXISTS display CHARACTER VARYING;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v58_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD IF NOT EXISTS frs_mode INTEGER DEFAULT 1; -- 0 - off, 1 - recognition, 2 - detection
2 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_1 INTEGER;
3 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_2 INTEGER;
4 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_3 INTEGER;
5 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_4 INTEGER;
6 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_5 INTEGER;
7 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_6 INTEGER;
8 | ALTER TABLE houses_entrances ADD IF NOT EXISTS alt_camera_id_7 INTEGER;
9 |
--------------------------------------------------------------------------------
/server/data/pgsql/v59_video_1.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD IF NOT EXISTS video character varying;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v59_video_2.php:
--------------------------------------------------------------------------------
1 | get("select house_domophone_id, video from houses_entrances");
8 |
9 | foreach ($videos as $video) {
10 | $db->modify("update houses_domophones set video = :video where house_domophone_id = " . $video["house_domophone_id"], [
11 | "video" => $video["video"],
12 | ]);
13 | $rows++;
14 | }
15 |
16 | echo "updated $rows rows\n";
17 |
18 | return true;
19 | } catch (\PDOException $e) {
20 | echo "Error executing query: " . $e->getMessage();
21 | return false;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server/data/pgsql/v59_video_3.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_entrances DROP COLUMN video;
--------------------------------------------------------------------------------
/server/data/pgsql/v5_companies.sql:
--------------------------------------------------------------------------------
1 | -- companies
2 | CREATE TABLE companies
3 | (
4 | company_id serial primary key,
5 | name character varying,
6 | uid character varying,
7 | contacts character varying,
8 | comment character varying
9 | );
10 | CREATE INDEX IF NOT EXISTS company_uid on companies(uid);
11 |
12 | ALTER TABLE addresses_houses ADD COLUMN company integer;
--------------------------------------------------------------------------------
/server/data/pgsql/v60_cars.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD IF NOT EXISTS cars CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v61_cars.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX IF NOT EXISTS houses_flats_cars ON houses_flats(cars);
2 | CREATE INDEX IF NOT EXISTS houses_flats_cars_gin ON houses_flats USING gin (cars gin_trgm_ops);
3 |
--------------------------------------------------------------------------------
/server/data/pgsql/v62_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD IF NOT EXISTS ext CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v64_bundle.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_devices ADD IF NOT EXISTS bundle CHARACTER VARYING DEFAULT 'default';
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v65_paranoid.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats_devices ADD IF NOT EXISTS paranoid INTEGER DEFAULT 0;
2 | CREATE INDEX IF NOT EXISTS houses_flats_devices_paranoid ON houses_flats_devices (paranoid);
3 | ALTER TABLE houses_rfids ADD IF NOT EXISTS watch INTEGER DEFAULT 0;
4 | CREATE INDEX IF NOT EXISTS houses_rfids_watch ON houses_rfids (watch);
5 |
--------------------------------------------------------------------------------
/server/data/pgsql/v66_custom_fields.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE custom_fields ADD IF NOT EXISTS magic_icon CHARACTER VARYING;
2 | ALTER TABLE custom_fields ADD IF NOT EXISTS magic_function CHARACTER VARYING;
3 |
4 | CREATE TABLE IF NOT EXISTS custom_fields_values
5 | (
6 | custom_fields_value_id SERIAL PRIMARY KEY,
7 | apply_to INTEGER,
8 | value CHARACTER VARYING
9 | );
10 |
--------------------------------------------------------------------------------
/server/data/pgsql/v67_subscribers_flats.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD IF NOT EXISTS subscribers_limit INTEGER DEFAULT -1;
2 |
--------------------------------------------------------------------------------
/server/data/pgsql/v69_domophones.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD IF NOT EXISTS ext CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v6_companies.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE companies ADD IF NOT EXISTS company_type integer;
--------------------------------------------------------------------------------
/server/data/pgsql/v70_custom_fields.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE custom_fields ADD IF NOT EXISTS magic_hint CHARACTER VARYING;
2 | ALTER TABLE custom_fields ADD IF NOT EXISTS add INTEGER DEFAULT 0;
3 | ALTER TABLE custom_fields ADD IF NOT EXISTS modify INTEGER DEFAULT 1;
4 |
--------------------------------------------------------------------------------
/server/data/pgsql/v71_custom_fields.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields ADD IF NOT EXISTS float INTEGER DEFAULT 0;
--------------------------------------------------------------------------------
/server/data/pgsql/v72_project_comments.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_projects ADD IF NOT EXISTS comments CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/pgsql/v73_favorite_filters.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_favorite_filters ADD IF NOT EXISTS project CHARACTER VARYING DEFAULT 'RTL';
--------------------------------------------------------------------------------
/server/data/pgsql/v74_favorite_filters.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_favorite_filters RENAME COLUMN right_side TO left_side;
--------------------------------------------------------------------------------
/server/data/pgsql/v75_readonly.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields ADD IF NOT EXISTS readonly INTEGER DEFAULT 0;
2 | UPDATE tt_issue_custom_fields SET readonly = 1 WHERE editor = 'text-ro';
3 | UPDATE tt_issue_custom_fields SET editor = 'text' where editor = 'text-ro';
4 |
--------------------------------------------------------------------------------
/server/data/pgsql/v7_address.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE addresses_houses ADD IF NOT EXISTS house_lat real;
2 | ALTER TABLE addresses_houses ADD IF NOT EXISTS house_lon real;
--------------------------------------------------------------------------------
/server/data/pgsql/v8_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users DROP COLUMN last_login;
--------------------------------------------------------------------------------
/server/data/pgsql/v9_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_projects ADD IF NOT EXISTS assigned integer DEFAULT 0;
--------------------------------------------------------------------------------
/server/data/schema.php:
--------------------------------------------------------------------------------
1 | exec("ALTER TABLE IF EXISTS public.$table SET SCHEMA $schema");
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/server/data/sqlite/v10_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD COLUMN contract text;
2 | CREATE INDEX houses_flats_contract on houses_flats(contract);
3 |
--------------------------------------------------------------------------------
/server/data/sqlite/v11_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields_options ADD COLUMN option_display text;
--------------------------------------------------------------------------------
/server/data/sqlite/v12_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD COLUMN primary_group integer;
2 | ALTER TABLE core_groups ADD COLUMN admin integer;
--------------------------------------------------------------------------------
/server/data/sqlite/v13_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN timezone text;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v14_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD COLUMN login text;
2 | ALTER TABLE houses_flats ADD COLUMN password text;
3 | CREATE UNIQUE INDEX houses_flats_login on houses_flats(login);
4 |
--------------------------------------------------------------------------------
/server/data/sqlite/v15_core.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE core_users_tokens(uid integer not null, token TEXT);
2 | CREATE INDEX core_users_tokens_uid on core_users_tokens(uid);
3 | CREATE UNIQUE INDEX core_users_tokens_uniq on core_users_tokens(uid, token);
4 |
5 | CREATE TABLE core_users_notifications(notification_id integer primary key autoincrement, uid integer, created integer, sended integer, delivered integer, readed integer, caption text, body text, data text);
6 | CREATE INDEX core_users_notifications_uid ON core_users_notifications(uid);
7 | CREATE INDEX core_users_notifications_sended ON core_users_notifications(sended);
8 |
--------------------------------------------------------------------------------
/server/data/sqlite/v16_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_entrances ADD COLUMN video text;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v17_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN sub_id text;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v17_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD COLUMN sub_id text;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v17_plog.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE plog_call_done ADD COLUMN sub_id text;
2 | ALTER TABLE plog_door_open ADD COLUMN sub_id text;
--------------------------------------------------------------------------------
/server/data/sqlite/v18_tt.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE tt_prints (
2 | tt_print_id INTEGER PRIMARY KEY AUTOINCREMENT,
3 | form_name TEXT NOT NULL,
4 | extension TEXT NOT NULL,
5 | description TEXT NOT NULL
6 | );
7 |
8 | CREATE UNIQUE INDEX tt_prints_uniq ON tt_prints (form_name);
--------------------------------------------------------------------------------
/server/data/sqlite/v19_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields ADD COLUMN catalog TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v1_dvr.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE camera_records
2 | (
3 | record_id integer primary key autoincrement,
4 | camera_id integer not null,
5 | subscriber_id integer not null,
6 | start integer,
7 | finish integer,
8 | filename text,
9 | expire integer,
10 | state integer -- 0 = created, 1 = in progress, 2 = completed, 3 = error
11 | );
12 | CREATE INDEX camera_records_status on camera_records(state);
13 | CREATE INDEX camera_records_expire on camera_records(expire);
14 |
--------------------------------------------------------------------------------
/server/data/sqlite/v1_providers.sql:
--------------------------------------------------------------------------------
1 | -- providers
2 | CREATE TABLE providers
3 | (
4 | provider_id integer primary key autoincrement,
5 | id text not null,
6 | name text,
7 | base_url text,
8 | logo text,
9 | token_common text, -- for push and outgoing calls
10 | token_sms text,
11 | hidden integer
12 | );
13 | CREATE UNIQUE INDEX providers_id on providers (id);
14 | CREATE UNIQUE INDEX providers_name on providers (name);
15 |
--------------------------------------------------------------------------------
/server/data/sqlite/v1_tasks.sql:
--------------------------------------------------------------------------------
1 | -- tasks_changes
2 | CREATE TABLE tasks_changes
3 | (
4 | task_change_id integer primary key autoincrement,
5 | object_type text,
6 | object_id integer
7 | );
8 | CREATE UNIQUE INDEX tasks_changes_uniq on tasks_changes(object_type, object_id);
9 |
--------------------------------------------------------------------------------
/server/data/sqlite/v20_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_statuses ADD COLUMN final INTEGER DEFAULT 0;
--------------------------------------------------------------------------------
/server/data/sqlite/v21_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN sound INTEGER DEFAULT 0 NOT NULL;
--------------------------------------------------------------------------------
/server/data/sqlite/v22_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD COLUMN name TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v23_addresses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE addresses_houses ADD COLUMN company_id INTEGER DEFAULT 0;
2 |
3 | CREATE INDEX addresses_houses_company_id ON addresses_houses (company_id);
--------------------------------------------------------------------------------
/server/data/sqlite/v24_comments.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN comments text;
2 |
3 | ALTER TABLE houses_domophones ADD COLUMN comments text;
4 | UPDATE houses_domophones set comments = comment;
5 | ALTER TABLE houses_domophones DROP COLUMN comment;
6 |
7 | ALTER TABLE companies ADD COLUMN comments text;
8 | UPDATE companies set comments = comment;
9 | ALTER TABLE companies DROP COLUMN comment;
10 |
--------------------------------------------------------------------------------
/server/data/sqlite/v25_houses.sql:
--------------------------------------------------------------------------------
1 | UPDATE houses_domophones SET model = 'dks.json' WHERE model LIKE 'dks%';
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v26_core.sql:
--------------------------------------------------------------------------------
1 | CREATE UNIQUE INDEX core_vars_var_uniq on core_vars(var_name);
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v27_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_cameras_houses ADD COLUMN path TEXT;
2 | ALTER TABLE houses_cameras_flats ADD COLUMN path TEXT;
3 |
--------------------------------------------------------------------------------
/server/data/sqlite/v29_ua.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_devices ADD COLUMN ua TEXT;
2 | ALTER TABLE houses_subscribers_devices ADD COLUMN ip TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v2_addresses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE addresses_regions ADD COLUMN lat real;
2 | ALTER TABLE addresses_regions ADD COLUMN lon real;
3 |
4 | ALTER TABLE addresses_areas ADD COLUMN lat real;
5 | ALTER TABLE addresses_areas ADD COLUMN lon real;
6 |
7 | ALTER TABLE addresses_cities ADD COLUMN lat real;
8 | ALTER TABLE addresses_cities ADD COLUMN lon real;
9 |
10 | ALTER TABLE addresses_settlements ADD COLUMN lat real;
11 | ALTER TABLE addresses_settlements ADD COLUMN lon real;
12 |
13 | ALTER TABLE addresses_streets ADD COLUMN lat real;
14 | ALTER TABLE addresses_streets ADD COLUMN lon real;
15 |
16 | ALTER TABLE addresses_houses ADD COLUMN lat real;
17 | ALTER TABLE addresses_houses ADD COLUMN lon real;
18 |
--------------------------------------------------------------------------------
/server/data/sqlite/v30_houses.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX houses_rfids_rfid on houses_rfids(rfid);
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v31_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats_subscribers ADD COLUMN voip_enabled integer default 1;
--------------------------------------------------------------------------------
/server/data/sqlite/v32_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD COLUMN secret text;
2 | ALTER TABLE core_users ADD COLUMN two_fa integer default 0;
3 |
--------------------------------------------------------------------------------
/server/data/sqlite/v33_houses.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_mobile ADD COLUMN subscriber_last text;
--------------------------------------------------------------------------------
/server/data/sqlite/v34_cameras.sql:
--------------------------------------------------------------------------------
1 | UPDATE cameras SET model = 'is.json' WHERE model = 'iscomx1plus.json';
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v35_indexes.sql:
--------------------------------------------------------------------------------
1 | -- changa indexes
2 | DROP INDEX houses_subscribers_devices_uniq_1;
--------------------------------------------------------------------------------
/server/data/sqlite/v36_tt.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE tt_favorite_filters
2 | (
3 | login TEXT,
4 | filter TEXT,
5 | right_side INTEGER DEFAULT 0,
6 | icon TEXT
7 | );
8 | CREATE UNIQUE INDEX tt_favorite_filters_uniq on tt_favorite_filters (login, filter);
--------------------------------------------------------------------------------
/server/data/sqlite/v37_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_favorite_filters ADD COLUMN color TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v38_settings.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users ADD COLUMN settings TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v39_core.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE core_inbox
2 | (
3 | msg_id INTEGER PRIMARY KEY AUTOINCREMENT,
4 | msg_date INTEGER,
5 | msg_from TEXT,
6 | msg_to TEXT,
7 | msg_subject TEXT,
8 | msg_type TEXT,
9 | msg_body TEXT,
10 | msg_readed INTEGER
11 | );
12 | CREATE INDEX core_msg_to ON core_inbox(msg_to);
--------------------------------------------------------------------------------
/server/data/sqlite/v3_tasks.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX tasks_changes_uniq;
2 | ALTER TABLE tasks_changes DROP COLUMN object_id;
3 | ALTER TABLE tasks_changes ADD COLUMN object_id text;
4 | CREATE UNIQUE INDEX tasks_changes_uniq on tasks_changes(object_type, object_id);
5 |
--------------------------------------------------------------------------------
/server/data/sqlite/v40_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_inbox ADD COLUMN msg_handler CHARACTER VARYING;
--------------------------------------------------------------------------------
/server/data/sqlite/v41_notes.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE notes
2 | (
3 | note_id INTEGER PRIMARY KEY AUTOINCREMENT,
4 | create_date INTEGER,
5 | owner TEXT,
6 | note_subject TEXT,
7 | note_body TEXT,
8 | checks INTEGER DEFAULT 0,
9 | category TEXT,
10 | remind INTEGER DEFAULT 0,
11 | icon TEXT,
12 | font TEXT,
13 | color TEXT,
14 | reminded INTEGER DEFAULT 0,
15 | position_left REAL,
16 | position_top REAL,
17 | position_order INTEGER
18 | );
19 | CREATE INDEX notes_owner ON notes(owner);
20 | CREATE INDEX notes_remind ON notes(remind);
21 | CREATE INDEX notes_reminded ON notes(reminded);
22 | CREATE INDEX notes_category ON notes(category);
--------------------------------------------------------------------------------
/server/data/sqlite/v42_core.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX core_msg_type ON core_inbox(msg_type);
2 | CREATE INDEX core_msg_date ON core_inbox(msg_date);
3 | CREATE INDEX core_msg_readed ON core_inbox(msg_readed);
--------------------------------------------------------------------------------
/server/data/sqlite/v43_addresses.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE addresses_favorites
2 | (
3 | login TEXT,
4 | object TEXT,
5 | id INTEGER,
6 | title TEXT,
7 | icon TEXT,
8 | color TEXT
9 | );
10 | CREATE INDEX addresses_favorites_login ON addresses_favorites(login);
11 | CREATE UNIQUE INDEX addresses_favorites_uniq ON addresses_favorites(login, object, id);
12 |
--------------------------------------------------------------------------------
/server/data/sqlite/v44_tt.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE tt_projects_custom_fields_nojournal
2 | (
3 | project_custom_field_id INTEGER PRIMARY KEY AUTOINCREMENT,
4 | project_id INTEGER,
5 | issue_custom_field_id INTEGER
6 | );
7 | CREATE UNIQUE INDEX tt_projects_custom_fields_nojournal_uniq ON tt_projects_custom_fields (project_id, issue_custom_field_id);
8 |
--------------------------------------------------------------------------------
/server/data/sqlite/v45_search.php:
--------------------------------------------------------------------------------
1 | devices
4 | CREATE TABLE houses_flats_devices
5 | (
6 | houses_flat_device_id INTEGER PRIMARY KEY AUTOINCREMENT,
7 | house_flat_id INTEGER NOT NULL,
8 | subscriber_device_id INTEGER NOT NULL,
9 | voip_enabled INTEGER
10 | );
11 | CREATE UNIQUE INDEX houses_flats_devices_uniq ON houses_flats_devices(house_flat_id, subscriber_device_id);
12 |
--------------------------------------------------------------------------------
/server/data/sqlite/v55_core.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE core_users_notifications_queue
2 | (
3 | notification_id INTEGER PRIMARY KEY AUTOINCREMENT,
4 | login TEXT,
5 | uid INTEGER,
6 | subject TEXT,
7 | message TEXT
8 | );
9 |
--------------------------------------------------------------------------------
/server/data/sqlite/v56_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras DROP COLUMN md_left;
2 | ALTER TABLE cameras DROP COLUMN md_top;
3 | ALTER TABLE cameras DROP COLUMN md_width;
4 | ALTER TABLE cameras DROP COLUMN md_height;
5 | ALTER TABLE cameras ADD COLUMN md_area CHARACTER VARYING;
6 | ALTER TABLE cameras ADD COLUMN rc_area CHARACTER VARYING;
7 |
--------------------------------------------------------------------------------
/server/data/sqlite/v57_domophones.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD COLUMN display TEXT;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v58_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN frs_mode INTEGER DEFAULT 1; -- 0 - off, 1 - recognition, 2 - detection
2 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_1 INTEGER;
3 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_2 INTEGER;
4 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_3 INTEGER;
5 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_4 INTEGER;
6 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_5 INTEGER;
7 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_6 INTEGER;
8 | ALTER TABLE houses_entrances ADD COLUMN alt_camera_id_7 INTEGER;
9 |
--------------------------------------------------------------------------------
/server/data/sqlite/v59_video_1.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD COLUMN video character varying;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v59_video_2.php:
--------------------------------------------------------------------------------
1 | get("select house_domophone_id, video from houses_entrances");
8 |
9 | foreach ($videos as $video) {
10 | $db->modify("update houses_domophones set video = :video where house_domophone_id = " . $video["house_domophone_id"], [
11 | "video" => $video["video"],
12 | ]);
13 | $rows++;
14 | }
15 |
16 | echo "updated $rows rows\n";
17 |
18 | return true;
19 | } catch (\PDOException $e) {
20 | echo "Error executing query: " . $e->getMessage();
21 | return false;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server/data/sqlite/v59_video_3.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_entrances DROP COLUMN video;
--------------------------------------------------------------------------------
/server/data/sqlite/v5_companies.sql:
--------------------------------------------------------------------------------
1 | -- companies
2 | CREATE TABLE companies
3 | (
4 | company_id integer primary key autoincrement,
5 | name text,
6 | uid text,
7 | contacts text,
8 | comment text
9 | );
10 | CREATE INDEX company_uid on companies(uid);
11 |
12 | ALTER TABLE addresses_houses ADD COLUMN company integer;
--------------------------------------------------------------------------------
/server/data/sqlite/v60_cars.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD COLUMN cars TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v61_cars.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX houses_flats_cars ON houses_flats(cars);
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v62_cameras.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE cameras ADD COLUMN ext TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v64_bundle.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_subscribers_devices ADD COLUMN bundle TEXT DEFAULT 'default';
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v65_paranoid.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats_devices ADD COLUMN paranoid INTEGER DEFAULT 0;
2 | CREATE INDEX houses_flats_devices_paranoid ON houses_flats_devices(paranoid);
3 | ALTER TABLE houses_rfids ADD COLUMN watch INTEGER DEFAULT 0;
4 | CREATE INDEX houses_rfids_watch ON houses_rfids (watch);
5 |
--------------------------------------------------------------------------------
/server/data/sqlite/v66_custom_fields.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE custom_fields ADD COLUMN magic_icon TEXT;
2 | ALTER TABLE custom_fields ADD COLUMN magic_function TEXT;
3 |
4 | CREATE TABLE custom_fields_values
5 | (
6 | custom_fields_value_id INTEGER PRIMARY KEY AUTOINCREMENT,
7 | apply_to INTEGER,
8 | value CHARACTER VARYING
9 | );
10 |
--------------------------------------------------------------------------------
/server/data/sqlite/v67_subscribers_flats.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_flats ADD COLUMN subscribers_limit INTEGER DEFAULT -1;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v68_custom_fields.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX custom_fields_apply_to ON custom_fields(apply_to);
2 | CREATE INDEX common_custom_fields_options_custom_field_id ON common_custom_fields_options(custom_field_id);
3 | CREATE INDEX custom_fields_values_apply_to ON custom_fields_values(apply_to);
4 | CREATE INDEX custom_fields_values_value ON custom_fields_values(value);
5 |
--------------------------------------------------------------------------------
/server/data/sqlite/v69_domophones.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE houses_domophones ADD COLUMN ext TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v6_companies.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE companies ADD COLUMN company_type integer;
--------------------------------------------------------------------------------
/server/data/sqlite/v70_custom_fields.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE custom_fields ADD COLUMN magic_hint TEXT;
2 |
--------------------------------------------------------------------------------
/server/data/sqlite/v71_custom_fields.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields ADD COLUMN float INTEGER DEFAULT 0;
--------------------------------------------------------------------------------
/server/data/sqlite/v72_project_comments.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_projects ADD COLUMN comments TEXT;
--------------------------------------------------------------------------------
/server/data/sqlite/v73_favorite_filters.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_favorite_filters ADD COLUMN project TEXT DEFAULT 'RTL';
--------------------------------------------------------------------------------
/server/data/sqlite/v74_favorite_filters.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_favorite_filters RENAME COLUMN right_side TO left_side;
--------------------------------------------------------------------------------
/server/data/sqlite/v75_readonly.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_issue_custom_fields ADD COLUMN readonly INTEGER DEFAULT 0;
2 | UPDATE tt_issue_custom_fields SET readonly = 1 WHERE editor = 'text-ro';
3 | UPDATE tt_issue_custom_fields SET editor = 'text' where editor = 'text-ro';
4 |
--------------------------------------------------------------------------------
/server/data/sqlite/v7_address.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE addresses_houses ADD COLUMN house_lat real;
2 | ALTER TABLE addresses_houses ADD COLUMN house_lon real;
--------------------------------------------------------------------------------
/server/data/sqlite/v8_core.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE core_users DROP COLUMN last_login;
--------------------------------------------------------------------------------
/server/data/sqlite/v9_tt.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE tt_projects ADD COLUMN assigned integer DEFAULT 0;
--------------------------------------------------------------------------------
/server/data/tt_mobile_template/tt_filter_all.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Все задачи",
3 | "comment": "Все заявки",
4 | "filter": {
5 | "issueId": {
6 | "$exists": true
7 | }
8 | },
9 | "fields": [
10 | "subject",
11 | "catalog",
12 | "author",
13 | "created",
14 | "assigned",
15 | "status"
16 | ],
17 | "fileName": "all"
18 | }
19 |
--------------------------------------------------------------------------------
/server/db/backup/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/db/backup/.placeholder
--------------------------------------------------------------------------------
/server/fixes/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/fixes/.placeholder
--------------------------------------------------------------------------------
/server/hw/Interfaces/DbConfigUpdaterInterface.php:
--------------------------------------------------------------------------------
1 | "
16 | send "tail -n 1 /etc/rsyslogd/custom.conf\r"
17 |
18 | expect "<~>"
19 | send "exit\r"
20 |
--------------------------------------------------------------------------------
/server/hw/ip/common/is/scripts/upload_syslog_conf:
--------------------------------------------------------------------------------
1 | #!/usr/bin/expect -f
2 |
3 | set timeout 5
4 |
5 | set server [lindex $argv 0]
6 | set login [lindex $argv 1]
7 | set password [lindex $argv 2]
8 | set config [lindex $argv 3]
9 |
10 | spawn telnet $server
11 |
12 | expect "ogin:" {send "$login\r"}
13 |
14 | expect "assword:" {send "$password\r"}
15 |
16 | expect "<~>"
17 | send "echo '$config' > /etc/rsyslogd/custom.conf && /etc/init.d/S01rsyslogd restart\r"
18 |
19 | expect "<~>"
20 | send "exit\r"
21 |
--------------------------------------------------------------------------------
/server/hw/ip/common/is/templates/custom.conf:
--------------------------------------------------------------------------------
1 | ### TEMPLATES ###
2 | template(name="LongTagForwardFormat" type="list") {
3 | constant(value="<")
4 | property(name="pri")
5 | constant(value=">")
6 | property(name="timestamp" dateFormat="rfc3339")
7 | constant(value=" ")
8 | property(name="hostname")
9 | constant(value=" ")
10 | property(name="syslogtag" position.from="1" position.to="32")
11 | property(name="msg" spifno1stsp="on" )
12 | property(name="msg")
13 | constant(value="\n")
14 | }
15 |
16 | template (name="ProxyForwardFormat" type="string"
17 | string="<%PRI%>1 %TIMESTAMP:::date-rfc3339% %FROMHOST-IP% %APP-NAME% %HOSTNAME% - -%msg%")
18 |
19 |
20 | ### RULES ###
21 |
--------------------------------------------------------------------------------
/server/hw/ip/domophone/akuvox/e12.php:
--------------------------------------------------------------------------------
1 | getCamera($camera_id);
14 | if (!$cam)
15 | response(404);
16 |
17 | $model = loadDevice('camera', $cam["model"], $cam["url"], $cam["credentials"]);
18 | if (!$model)
19 | response(503);
20 |
21 | header('Content-Type: image/jpeg');
22 | echo $model->getCamshot();
23 |
24 | exit;
25 |
--------------------------------------------------------------------------------
/server/md.php:
--------------------------------------------------------------------------------
1 | isMobile());
10 |
--------------------------------------------------------------------------------
/server/mobile/address/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/mobile/address/custom/.placeholder
--------------------------------------------------------------------------------
/server/mobile/address/offices.php:
--------------------------------------------------------------------------------
1 | 'Test', 'lat' => 50.730641, 'lon' => 43.452340], 'opening' => 'без выходных']);
21 |
--------------------------------------------------------------------------------
/server/mobile/address/plogCamshot.php:
--------------------------------------------------------------------------------
1 | fromGUIDv4($param);
5 | $img = $files->getFile($uuid);
6 |
7 | if ($img) {
8 | $content_type = "image/jpeg";
9 | $meta_data = $files->getFileMetadata($uuid);
10 | if (isset($meta_data->contentType)) {
11 | $content_type = $meta_data->contentType;
12 | }
13 | header("Content-Type: $content_type");
14 | echo(stream_get_contents($img['stream']));
15 | exit;
16 | }
17 |
--------------------------------------------------------------------------------
/server/mobile/address/resend.php:
--------------------------------------------------------------------------------
1 | get("shot_" . $hash);
6 |
7 | if ($img)
8 | {
9 | header('Content-Type: image/jpeg');
10 | echo $img;
11 | exit;
12 | }
--------------------------------------------------------------------------------
/server/mobile/call/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/mobile/call/custom/.placeholder
--------------------------------------------------------------------------------
/server/mobile/call/live.php:
--------------------------------------------------------------------------------
1 | get("live_" . $hash);
6 | $camera_params = @json_decode($json_camera, true);
7 |
8 | $camera = @loadDevice('camera', $camera_params["model"], $camera_params["url"], $camera_params["credentials"]);
9 |
10 | if (!$camera) {
11 | response(404);
12 | }
13 |
14 | header('Content-Type: image/jpeg');
15 | echo $camera->getCamshot();
16 |
17 | exit;
18 |
--------------------------------------------------------------------------------
/server/mobile/cctv/custom/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/mobile/cctv/custom/.placeholder
--------------------------------------------------------------------------------
/server/mobile/cctv/recDownload.php:
--------------------------------------------------------------------------------
1 | >>");
7 |
8 | const sourceIPAddress = req.connection.remoteAddress
9 | console.log(sourceIPAddress)
10 |
11 |
12 | }
13 |
14 | async getEventHandler(req, data) {
15 | console.log("getEventHandler data >>>");
16 |
17 | const sourceIPAddress = req.connection.remoteAddress
18 | console.log(sourceIPAddress)
19 | }
20 |
21 |
22 | }
23 |
24 | export { NonameWebHookService }
25 |
--------------------------------------------------------------------------------
/server/services/event/services/base/index.js:
--------------------------------------------------------------------------------
1 | export { SyslogService } from "./SyslogService.js";
2 | export { WebHookService } from "./WebHookService.js";
--------------------------------------------------------------------------------
/server/services/event/utils/getTimestamp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Converts a Date object to a Unix timestamp.
3 | * @param {Date} date - The date object to be converted.
4 | * @return {number} The Unix timestamp representing the given date.
5 | */
6 | const getTimestamp = (date) => {
7 | return Math.floor(date.getTime() / 1000);
8 | };
9 |
10 | export { getTimestamp };
11 |
--------------------------------------------------------------------------------
/server/services/event/utils/index.js:
--------------------------------------------------------------------------------
1 | export { default as API } from "./API.js"
2 | export { getTimestamp } from "./getTimestamp.js"
3 | export { parseSyslogMessage } from "./parseSyslogMessage.js"
4 | export { isIpAddress } from "./isIpAddress.js"
5 | export { mdTimer } from "./mdTimer.js"
--------------------------------------------------------------------------------
/server/services/event/utils/isIpAddress.js:
--------------------------------------------------------------------------------
1 | const isIpAddress = (str) => {
2 | // Regular expression to check if a string is an IP address
3 | const regexExp = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/gi;
4 | return regexExp.test(str);
5 | }
6 | export { isIpAddress };
--------------------------------------------------------------------------------
/server/services/intercom_provision/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "intercom_provision",
3 | "version": "1.0.0",
4 | "description": "client SIP intercom provision servergit add .gi ",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node index.js"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "type": "module",
13 | "dependencies": {
14 | "axios": "^1.6.7",
15 | "ejs": "^3.1.9",
16 | "express": "^4.18.2",
17 | "fs": "^0.0.1-security"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/server/services/intercom_provision/readme.md:
--------------------------------------------------------------------------------
1 | ### Draft
2 | Prototype provision server for client intercom (Akuvox SIP indoor intercom).
3 | SIP intercom get actual config by serial on startup from url http://rbt-example.com:9992/provision/{{SERIAL_NUMBER}}.cfg
4 |
5 |
6 | TODO:
7 | - implement api methods in SmartYard-Server
8 | ```
9 | `http://${API_ADDRESS}/internal/intercom/${serial}`
10 | ```
11 | - add table for register client SIP intercom "house_flats_intercoms"
12 |
13 | ```
14 | id, flat_id , inntercom_id AS serial,
15 | ```
--------------------------------------------------------------------------------
/server/services/mqtt/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mqtt-agent",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "agent.js",
6 | "type": "commonjs",
7 | "scripts": {
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "express": "^4.18.2",
15 | "mqtt": "^5.3.4",
16 | "redis": "^4.6.12"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server/services/push/.env_example:
--------------------------------------------------------------------------------
1 | # Web server settings
2 | APP_PORT=8080
3 | APP_HOST=127.0.0.1
4 |
5 | # Firebase Cloud Messaging (FCM) settings
6 | FCM_APP_PROJECT_NAME=
7 | FCM_APP_BUNDLE_ID=
8 | FCM_APP_USER_AGENT=
9 | FCM_APP_DATABASE_NAME=
10 | FCM_SERVICE_ACCOUNT=pushServiceAccountKey.json
11 |
12 | # APN VoIP certificate
13 | APN_CERT=certificate-and-privatekey.pem
14 |
15 | # Huawei mobile services (HMS) settings (optional)
16 | HUAWEI_CLIENT_ID=
17 | HUAWEI_CLIENT_SECRET=
18 | HUAWEI_PROJECT_ID=
19 |
20 | # Rustore push service settings
21 | RUSTORE_PROJECT_ID=
22 | RUSTORE_TOKEN=
23 |
--------------------------------------------------------------------------------
/server/services/push/assets/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/server/services/push/assets/.placeholder
--------------------------------------------------------------------------------
/server/services/push/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "push",
3 | "version": "1.0.0",
4 | "description": "push service for SmartYard-server",
5 | "main": "push.js",
6 | "scripts": {
7 | "start": "node push.js",
8 | "dev": "NODE_ENV=development nodemon push.js"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "dependencies": {
14 | "body-parser": "^1.20.2",
15 | "dotenv": "^16.4.5",
16 | "express": "^4.19.2",
17 | "firebase-admin": "^12.3.0",
18 | "node-libcurl": "^4.0.0"
19 | },
20 | "devDependencies": {
21 | "nodemon": "^3.1.4"
22 | },
23 | "engines": {
24 | "npm": ">=10.2.0",
25 | "node": ">=20.10.0"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/server/services/push/push.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=SmartYard-Server push service
3 | Documentation=https://github.com/rosteleset/SmartYard-Server/tree/main/install
4 | After=network.target
5 |
6 | [Service]
7 | Type=simple
8 | WorkingDirectory=/opt/rbt/server/services/push
9 | ExecStart=/usr/bin/node /opt/rbt/server/services/push/push.js %i
10 | RestartSec=10
11 | Restart=always
12 | User=rbt
13 | Group=rbt
14 | LimitCORE=infinity
15 | KillMode=process
16 | StandardOutput=append:/var/log/rbt_push_service/push_service%i.log
17 | StandardError=append:/var/log/rbt_push_service/push_service%i.error.log
18 | SyslogIdentifier=rbt_push_service
19 |
20 | [Install]
21 | WantedBy=multi-user.target
22 |
--------------------------------------------------------------------------------
/server/services/readme.md:
--------------------------------------------------------------------------------
1 | SmartYard-Server services
--------------------------------------------------------------------------------
/server/services/sys_exporter/.dockerignore:
--------------------------------------------------------------------------------
1 | docker
2 | drafts
3 | node_modules
4 | docker-compose.yml
5 | .example_env
6 | .env
7 | package-lock.json
--------------------------------------------------------------------------------
/server/services/sys_exporter/.env_example:
--------------------------------------------------------------------------------
1 | APP_NAME=SmartYard-Server/intercom
2 | APP_PORT=9191
3 | APP_HOST=127.0.0.1
4 | SERVICE_PREFIX=sys_intercom
5 | AUTH_ENABLED=false
6 | AUTH_USER=username
7 | AUTH_PASS=secure_password
8 |
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/index.js:
--------------------------------------------------------------------------------
1 | import 'dotenv/config'
2 | import express from 'express';
3 | import { APP_HOST, APP_PORT } from './constants.js'
4 | import routes from "./routes/routes.js";
5 |
6 | const app = express();
7 | app.use("/", routes)
8 | app.listen(APP_PORT, () => {
9 | console.log(`Exporter server is running on http://${APP_HOST}:${APP_PORT}`);
10 | });
11 |
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/metrics/index.js:
--------------------------------------------------------------------------------
1 | // device specific metrics
2 | export { getBewardMetrics } from './devices/beward.js'
3 | export { getQtechMetrics } from './devices/qtech.js'
4 | export { getAkuvoxMetrics } from './devices/akuvox.js'
5 | export { getRubetekMetrics } from './devices/rubetek.js'
6 |
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/metrics/registry.js:
--------------------------------------------------------------------------------
1 | import { Registry } from 'prom-client';
2 | import { APP_NAME } from "../constants.js";
3 | import { createMetrics } from "./metricsFactory.js";
4 |
5 | // Create a global registry for all metrics
6 | export const globalRegistry = new Registry();
7 |
8 | export const {
9 | sipStatusGauge: globalSipStatusGauge,
10 | uptimeGauge: globalUptimeGauge,
11 | } = createMetrics([globalRegistry], true);
12 |
13 | // Set default metrics
14 | globalRegistry.setDefaultLabels({
15 | app: APP_NAME
16 | });
17 |
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/middleware/auth.js:
--------------------------------------------------------------------------------
1 | import basicAuth from "express-basic-auth";
2 | import { AUTH_PASS, AUTH_USER } from "../constants.js";
3 |
4 | const logUnauthorized = (req) => {
5 | console.log(`Failed auth: ${req.ip}`)
6 | }
7 | const basicAuthMiddleware =
8 | basicAuth({
9 | users: {[AUTH_USER]: AUTH_PASS},
10 | challenge: true,
11 | unauthorizedResponse: (req) => {
12 | logUnauthorized(req);
13 | return 'Failed auth';
14 | }
15 | })
16 | export default basicAuthMiddleware
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/routes/metrics.js:
--------------------------------------------------------------------------------
1 | import express from "express";
2 | import { globalRegistry } from "../metrics/registry.js";
3 |
4 | const router = express.Router();
5 |
6 | router.get("/", async (req, res) => {
7 | res.set('Content-Type', globalRegistry.contentType);
8 | res.end(await globalRegistry.metrics());
9 | })
10 |
11 | export default router;
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/routes/routes.js:
--------------------------------------------------------------------------------
1 | import express from "express";
2 | import { AUTH_ENABLED } from "../constants.js";
3 | import basicAuthMiddleware from "../middleware/auth.js";
4 | import metricsRoute from "./metrics.js"
5 | import probeRoute from "./probe.js"
6 |
7 | const router = express.Router();
8 |
9 | // auth
10 | if (AUTH_ENABLED === true) {
11 | router.use(basicAuthMiddleware);
12 | }
13 |
14 | router.use('/metrics', metricsRoute); // Global metrics route
15 | router.use('/probe', probeRoute); // Probe request route
16 |
17 | export default router;
--------------------------------------------------------------------------------
/server/services/sys_exporter/app/utils/metrics.js:
--------------------------------------------------------------------------------
1 | import { AKUVOX, BEWARD_DKS, BEWARD_DS, QTECH } from "../constants.js";
2 | import { getAkuvoxMetrics, getBewardMetrics, getQtechMetrics } from "../metrics/index.js";
3 |
4 | const modelMetrics = {
5 | [BEWARD_DKS]: getBewardMetrics,
6 | [BEWARD_DS]: getBewardMetrics,
7 | [QTECH]: getQtechMetrics,
8 | [AKUVOX]: getAkuvoxMetrics,
9 | }
10 | export const getMetrics = async ({ url, username, password, model }) => {
11 | const fetchMetrics = modelMetrics[model];
12 | if (!fetchMetrics){
13 | throw new Error(`Unsupported model: ${model}`);
14 | }
15 | return await fetchMetrics(url, username, password);
16 | }
--------------------------------------------------------------------------------
/server/services/sys_exporter/docker/node/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:22 as main
2 | ENV TZ Europe/Moscow
3 | ENV NODE_PATH /home/node/app/node_modules
4 | WORKDIR /home/node/app
5 | COPY ./package*.json /home/node/app
6 | RUN npm i
7 | COPY ./ .
8 |
--------------------------------------------------------------------------------
/server/services/sys_exporter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sys_exporter",
3 | "version": "1.0.0",
4 | "description": "smart-yard prometheus exporter",
5 | "main": "index.js",
6 | "type": "module",
7 | "scripts": {
8 | "start": "node app",
9 | "dev": "npx nodemon app"
10 | },
11 | "keywords": [],
12 | "author": "",
13 | "license": "ISC",
14 | "dependencies": {
15 | "axios": "^1.7.2",
16 | "digest-fetch": "^3.1.1",
17 | "dotenv": "^16.4.5",
18 | "express": "^4.19.2",
19 | "express-basic-auth": "^1.2.1",
20 | "figlet": "^1.7.0",
21 | "gradient-string": "^3.0.0",
22 | "prom-client": "^15.1.3"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/server/services/sys_exporter/readme.md:
--------------------------------------------------------------------------------
1 | Prometheus exporter for monitoring ip intercom
2 |
3 | ## Install
4 | 1. Make `.env` file
5 | ```shell
6 | cp .env_example .env
7 | ```
8 | 2. Install dependencies
9 | ```shell
10 | npm i
11 | ```
12 | 3. Run service ```npm start```
13 |
14 | ---
15 | ## dev
16 | Start service in docker
17 | ```shell
18 | docker compose up -d
19 | ```
--------------------------------------------------------------------------------
/server/utils/array_key_first.php:
--------------------------------------------------------------------------------
1 | $unused) {
6 | return $key;
7 | }
8 | return NULL;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/server/utils/checkint.php:
--------------------------------------------------------------------------------
1 | $_) {
7 | $b = loadBackend($backend);
8 |
9 | if ($b) {
10 | $n = $b->cleanup();
11 |
12 | if ($n !== false && $n !== true) {
13 | echo "$backend: $n items cleaned\n";
14 | }
15 | } else {
16 | echo "$backend: not found\n";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/server/utils/clear_cache.php:
--------------------------------------------------------------------------------
1 | keys("CACHE:*");
12 | } else {
13 | if (checkInt($uid)) {
14 | $keys = $redis->keys("CACHE:FRONT:*:$uid");
15 | }
16 | }
17 |
18 | foreach ($keys as $key) {
19 | $redis->del($key);
20 | $n++;
21 | }
22 |
23 | return $n;
24 | }
--------------------------------------------------------------------------------
/server/utils/error.php:
--------------------------------------------------------------------------------
1 | set('Core.Encoding', 'UTF-8');
6 | $config->set('HTML.Doctype', 'HTML 4.01 Transitional');
7 | $config->set('Cache.DefinitionImpl', null);
8 |
9 | $purifier = new HTMLPurifier($config);
10 | return $purifier->purify($dirtyHtml);
11 | }
--------------------------------------------------------------------------------
/static/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/.placeholder
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesanspro.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesanspro.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesanspro.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesanspro.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesanspro.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesanspro.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproblack.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproblack.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproblack.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproblack.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproblack.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproblack.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproblackitalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproblackitalic.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproblackitalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproblackitalic.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproblackitalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproblackitalic.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprobold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprobold.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprobold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprobold.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprobold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprobold.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprobolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprobolditalic.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprobolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprobolditalic.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprobolditalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprobolditalic.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproextralight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproextralight.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproextralight.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproextralight.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproextralight.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproextralight.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproextralightitalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproextralightitalic.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproextralightitalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproextralightitalic.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproextralightitalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproextralightitalic.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproitalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproitalic.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproitalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproitalic.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansproitalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansproitalic.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprolight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprolight.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprolight.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprolight.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprolight.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprolight.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprolightitalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprolightitalic.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprolightitalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprolightitalic.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprolightitalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprolightitalic.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprosemibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprosemibold.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprosemibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprosemibold.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprosemibold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprosemibold.woff2
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprosemibolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprosemibolditalic.ttf
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprosemibolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprosemibolditalic.woff
--------------------------------------------------------------------------------
/static/fonts/sourcesanspro/sourcesansprosemibolditalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/fonts/sourcesanspro/sourcesansprosemibolditalic.woff2
--------------------------------------------------------------------------------
/static/icon/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/icon/avatar.png
--------------------------------------------------------------------------------
/static/portal/.placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rosteleset/SmartYard-Server/556cdef8417883e30c828e382d3ca1c981864971/static/portal/.placeholder
--------------------------------------------------------------------------------
/version:
--------------------------------------------------------------------------------
1 | 643ba18 (2025-05-30)
--------------------------------------------------------------------------------