Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
25dd4d0
[Update front-end] CRUD Camera, Update login, register page, fix home…
Kuro2403 Jan 28, 2024
e6c9d7b
update CameraAPI
thaihd-athena Jan 29, 2024
3787a00
Merge branch 'develop' of https://github.com/khanghv-the-programmer/p…
thaihd-athena Jan 29, 2024
44cc21b
Update list user, create user, connect AXIOS, update CRUD camera
Kuro2403 Jan 29, 2024
9997238
update api Camera api
TTD262 Jan 29, 2024
6e8dfd5
[Camera] Update code
khanghv-the-programmer Jan 29, 2024
c3323c3
Update create user, list user by axios
Kuro2403 Jan 29, 2024
5201863
get capture api from camera
thaihd-athena Jan 30, 2024
76bf6e2
update code api delete
TTD262 Jan 30, 2024
50dd652
[Camera] Add API for active camera
khanghv-the-programmer Jan 30, 2024
30bcbe6
update code api delete and update camera
TTD262 Jan 30, 2024
dedcb3c
last capture Camera
thaihd-athena Jan 30, 2024
cd89c38
update model edit camera
TTD262 Jan 30, 2024
2503e1e
delete camera failed, stream video missing
nguyendangson93 Jan 30, 2024
0902c17
update model edit camera
TTD262 Jan 30, 2024
47a16b5
a
nguyendangson93 Jan 30, 2024
8bc13a2
Merge remote-tracking branch 'origin/dangson' into develop
khanghv-the-programmer Feb 1, 2024
05282ec
[Common] Add comment
khanghv-the-programmer Feb 1, 2024
0bf697c
New Commit
khanghv-the-programmer Jun 19, 2024
824e84c
Merge pull request #11 from khanghv-the-programmer/khanghv-iot
khanghv-the-programmer Jun 19, 2024
8be7764
update model edit camera
TTD262 Jun 20, 2024
d9ea031
[CameraThread] Update for HTTP cameras
khanghv-the-programmer Jun 21, 2024
1a9a033
Merge pull request #12 from khanghv-the-programmer/khanghv-iot
khanghv-the-programmer Jun 21, 2024
0a2cb2c
List camera (show data method).
Kuro2403 Jun 21, 2024
e598753
update api delete user and api create camera and create api update me…
TTD262 Jun 21, 2024
44b2b11
update api update method
TTD262 Jun 21, 2024
84e3965
create api Report
TTD262 Jun 21, 2024
4fe3528
create api get picture
TTD262 Jun 21, 2024
72694a2
create api get picture
TTD262 Jun 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
node_modules
node_modules
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Python_assignment</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
144 changes: 144 additions & 0 deletions .rmv/config/db.mvbasic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/*
Database configuration

This is the example configuration file for the Rocket MV Basic for VS Code extension.
The configuration file should be at .rmv/config/db.mvbasic.json.

Configure the following items:
- db:{} This object defines the connection details to the U2 server.

- accounts: [] This array of objects defines paths on the local machine to other accounts.

- catalog: {} This object allows autocompletion for CALL statements and
enables "Peek" and "Go to Definition" to access the source code.

- includeMapping: [] This array allows autocompletion for INCLUDE files and
enables "Peek" and "Go to Definition" to access the source code for an INCLUDEd item.

*/
{
"version": "1.0",

// Define connection details to the U2 server.
// VS Code prompts for these values when left blank.
// For more information, please refer https://rocketsoftware.github.io/rocket-mvbasic/usage/Connection
"db": {

// Hostname or IP address of U2 server.
"host": "",
// "host": "localhost",
// "host": "my.u2.server.local",
// "host": "192.0.2.1",

// Username used to log in over Telnet or UniRPC. Use an escape character for domain log-in. (\\ instead of \)
"userName": "",
// "userName": "DOMAIN1\\myuser",
// "userName": "myuser",

// Password used to log in over Telnet or UniRPC. RECOMMENDED TO LEAVE THIS PASSWORD BLANK.
// VS Code will prompt for the password when connecting.
"password": "",

// U2 account to LOGIN to.
"account": "",
// "account": "XDEMO",
// "account": "MVTUTOR",

// Data source is either "UNIVERSE" or "UNIDATA".
// If this value is changed, VS Code MUST BE restarted for it to take effect.
"dataSource": "UNIVERSE",

// UniRPC TCP/IP port to connect to U2 server. 31438 is the default port of UniRPC.
// Match the port number here if the U2 server runs the UniRPC on another port.
"port": 31438
},

// The "accounts" array defines the local paths to the U2 server account directories.
// These accounts are referred to in the "catalog" and "includeMapping" items.
// The "db" section "account" does not need to be defined here since it would be the current directory.
// For more details, please refer https://rocketsoftware.github.io/rocket-mvbasic/usage/Accounts/
"accounts": [
{
// The account name. For example, "XDEMO" or "HS.SALES" or "MVTUTOR", etc.
// This is the "account" referred to in the "programDirs"."programMapping" and "includeMapping" arrays.
"name": "",

// The full path of the account's folder as referenced from this local machine.
// For example, "C:\\U2\\UV\\XDEMO" or "U:\\U2\\UV\\XDEMO" or "/mnt/u2server/U2/UV/XDEMO".
// NOTE : If this client is a windows box, you must specify two backslashes (\\) between directories.
"path": ""
}
],

// Map cataloged programs for autocompletion of CALL statements.
"catalog": {

// Enables the extension to scan all directories in the workspace (account).
// Affects performance when there are a large number of directories in the workspace.
// Best practice is to define specific directories in "programDirs" that are known to contain SUBROUTINE source code.
"isSearchAllDirs": false,

// This is the time interval (in seconds) when the extension will scan directory files in the account.
// The default for this setting is 5.
"readServerInterval": 5,

// The "programDirs" array defines the accounts and directories in which to search for source code for CATALOGed
// ("CALL " program) items. You can define multiple directories to search.
// The directories will be searched for source code in alphabetic order regardless of their order in the array.
// You can find examples of this setting at https://rocketsoftware.github.io/rocket-mvbasic/usage/Catalog/
"programDirs": [
{
// Account name. Account name should be defined in "accounts" array.
// This setting could be removed if cataloged programs are not in directories in other accounts.
"account": "",

// The name of source code directory which contains cataloged programs.
// When searching cataloged programs, this configured directory will be scanned.
"fileName": ""
}
],

// The "programMapping" array allows a one-to-one correlation for known SUBROUTINEs to be offered in the
// "CALL " auto-completion. If set in this section, those items defined as "catalogName" will appear in the
// pop-up auto-completion list and the source for "Peek" or "Go to Definition" can be explicitly defined here
// as "account", "fileName" and "program".
// You can find examples of these settings at https://rocketsoftware.github.io/rocket-mvbasic/usage/Catalog/
"programMapping": [
{
// The CATALOGed program name to be used in the CALL statement.
"catalogName": "",

// The Account name where the cataloged program source code exists. The Account name must appear in the
// "accounts" array with it's associated local path unless it is the current workspace account.
"account": "",

// The name of the actual program directory which contains the source code of cataloged program.
// NOTE: This may differ from the VOC entry for this U2 program file, since a Q or F point could
// exist that points to a different OS level directory.
"fileName": "",

// The item ID of the source code in the "fileName" directory defined above.
"program": ""
}
]
},

// The 'includeMapping" array allows the extension to populate the pop-up list for "INCLUDE file " and allows the
// "Peek" and "Go to Definition" to access the source code for the INCLUDEd item.
// Please refer more details at https://rocketsoftware.github.io/rocket-mvbasic/usage/Include/
"includeMapping": [
{
// The file name used in the "INCLUDE " statement. For example INCLUDE BP ABC would have "BP" as the
// "includeFile" name. This file name would be a VOC entry within the "account" and is not necessarily the
// actual OS directory name.
"includeFile": "",

// The account where the actual code directory exists. This "account" should be configured in "accounts" array.
"account": "",

// The actual OS directory within the account. This may vary from the VOC name in "includeFile" above.
// For example, UNIVERSE.INCLUDE in the VOC may refer to OS directory INCLUDE.
"fileName": ""
}
]
}
32 changes: 32 additions & 0 deletions .rmv/config/format.mvbasic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "1.0",
"formatting": {
"trimNewlines": false,
"trimFinalNewlines": false,
"trimTrailingWhitespace": true,
"insertFinalNewline": true,
"multiStatementsOneLine": true,
"alignInlineComments": 48,
"spacing.operator": 1,
"spacing.semicolon": 1,
"spacing.comma": 1,
"spacing.assignment": 1,
"spacing.parentheses": 0,
"spacing.squareBrackets": 0,
"spacing.curlyBrackets": 0,
"spacing.angleBrackets": 0,
"style.operator": "keep",
"style.keyword": "keep",
"style.commentMark": "keep",
"style.keywordCase": "keep",
"indent.base": 0,
"indent.block": true,
"indent.commentLine": true,
"indent.directive": false,
"indent.clause": false,
"clause.useBlock": false,
"clause.addBlankLines": false,
"clause.atNewline": false,
"routine.labelPattern": ""
}
}
36 changes: 36 additions & 0 deletions .rmv/config/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
property.ROOT_LEVEL=Info
property.CONSOLE_LEVEL=Warn
property.FILE_LEVEL=Trace
property.SERVER_NAME=rocket_mv_basic_language_server
property.LOG_HOME=.rmv/logs

status=error
monitorInterval=5

rootLogger.level=${ROOT_LEVEL}
rootLogger.appenderRef.console.ref=ConsoleAll
rootLogger.appenderRef.file.ref=RollingFileAll

appender.console.type=Console
appender.console.name=ConsoleAll
appender.console.target=SYSTEM_ERR
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n
appender.console.filter.threshold.level=${CONSOLE_LEVEL}
appender.console.filter.threshold.type=ThresholdFilter

appender.file.type=RollingFile
appender.file.name=RollingFileAll
appender.file.filter.threshold.level=${FILE_LEVEL}
appender.file.filter.threshold.type=ThresholdFilter
appender.file.fileName=${LOG_HOME}/${SERVER_NAME}.log
appender.file.filePattern=${LOG_HOME}/backup/${SERVER_NAME}.%d{yyyy-MM-dd}-%i.log
appender.file.layout.type=PatternLayout
appender.file.layout.pattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n
appender.file.policies.type=Policies
appender.file.policies.time.type=TimeBasedTriggeringPolicy
appender.file.policies.time.interval=1
appender.file.policies.time.modulate=true
appender.file.policies.size.type=SizeBasedTriggeringPolicy
appender.file.policies.size.size=10M
appender.file.strategy.type=DefaultRolloverStrategy
3 changes: 3 additions & 0 deletions .rmv/documentation/UNIVERSE/custom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"[rocket-mvbasic]": {
"editor.codeLens": false
},
"files.associations": {
"**/.rmv/config/*.json": "jsonc"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.rmv/catalog/**": true,
"*/_*": false
}
}
11 changes: 11 additions & 0 deletions Services/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Services</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
6 changes: 4 additions & 2 deletions Services/API/Camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

@author: thaihd
"""
import sys
sys.path.append('D:\Python_assignment')
import sqlite3
from flask import Flask,request,jsonify
from sqlalchemy import create_engine
from Utilize.ReadConfigurationFile import read_config_from_file as config
from Services.Utilize.ReadConfigurationFile import read_config_from_file as config
import urllib
from Utilize import DBConnection
from Services.Utilize import DBConnection
CONN_URI = config.connection["postgres"]
PASSWORD = config.connection["postgres_password"]
DATABASE = config.connection["postgres_database"]
Expand Down
Loading