custom-task
methodadmin-LTE
project by changing the table parametersViewing and editing global arrays, executing queries, including JDBC / ODBC, generating results in XLS, XLSX, JSON formats, sending results by e-mail in the form of XLS files. Execution of queries and IRIS commands in the interface for any namespace. Summary analysis and error viewing for all namespaces.
Added fileserver module for report execution results.
Implemented file deletion mode in the fileserver module.
Formation of results in XLS, XLSX formats has been implemented.
In the interface, the mode of exporting globals in the JSON format has been added.
Module for exporting IRIS requests to excel file using python openpyxl library.
Informing support projects using telegram messenger bots. Notification via telegram
Web application photo album, music player and personal e-book library.
Application of products forming a database of exchange rates of the Central Bank of the Russian Federation.
An example of a backup task with preliminary deletion of old files.
If the current ZPM instance is not installed, then in one line you can install the latest version of ZPM even with a proxy.
s r=##class(%Net.HttpRequest).%New(),proxy=$System.Util.GetEnviron("https_proxy") Do ##class(%Net.URLParser).Parse(proxy,.pr) s:$G(pr("host"))'="" r.ProxyHTTPS=1,r.ProxyTunnel=1,r.ProxyPort=pr("port"),r.ProxyServer=pr("host") s:$G(pr("username"))'=""&&($G(pr("password"))'="") r.ProxyAuthorization="Basic "_$system.Encryption.Base64Encode(pr("username")_":"_pr("password")) set r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
If ZPM is installed, then ZAPM can be set with the command
zpm:USER>install apptools-admin
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
$ git clone https://github.com/SergeyMi37/apptools-admin.git
Open the terminal in this directory and run:
$ docker-compose build
$ docker-compose up -d
Open IRIS terminal:
$ docker-compose exec iris iris session iris
USER>
USER>zpm
zpm:USER>install apptools-admin
Load http://your-host:your-port/apptools/apptools.core.LogInfo.cls?WHAT=%3F
viewing global and direct and reverse with a possible filter by links and node data. Edit global nodes. Export a selection of nodes and global data to an XLS file and send the archive to an email.
execution of queries and SQL statements with the ability to connect via JDBC / ODBC. Export the results to an XLS file and send the archive to an email.
code execution by XECUTE command in the interface panel.
saving commands and queries in the program history with the ability to run them again.
All executed commands are remembered in history for the opportunity to repeat again. Frequently executed commands can be saved as favorites.
In this solution, I use REST-API adapted from the Webterminal and metrics ^mgstat
Load http://your-host:your-port/apptools/apptools.Form.Exp.cls?panel=AccordionExp - Navigation by namespaces, class, and class instance. Create, edit, and delete class instances in the on-screen form interface.
Load http://your-host:your-port/apptools/apptools.Tabs.PanelUikitPermissMatrx.cls?autoload=Matrix
- Group assignment of roles to users by selecting them by filter in the screen panel
Load http://your-host:your-port/apptools/apptools/apptools.Tabs.PanelSample.cls
- jQuery-Ui.js based application template.
Load http://your-host:your-port/apptools/apptools.Tabs.TabsPanelUikit.cls
- UiKit.js based application template
## Charts admins
Load http://your-host:your-port/apptools/apptools.Chart.Chart.cls?panel=class(apptools.Chart.ChartPanel).ChartAlert - output of the DBMS events using the iris.log protocol (cconsole.log)
Load http://your-host:your-port/apptools/apptools.Chart.Chart.cls?panel=class(apptools.Chart.ChartPanel).ChartAlert - output of the growth dynamics of DBMS database files using the messages.log protocol (cconsole.log)
``` IRISAPP>do ##class(apptools.core.sys).SaveQuery("%SYSTEM.License:Counts", "^test",123)
IRISAPP>zw ^test ^test("%SYSTEM.License:Counts",123,0,1)="InstanceLicenseUse" ^test("%SYSTEM.License:Counts",123,0,2)="License Units" ^test("%SYSTEM.License:Counts",123,1,1)="Total Authorized LU" ^test("%SYSTEM.License:Counts",123,1,2)=5 ...
IRISAPP>zn "%sys"
%SYS>do ##class(apptools.core.sys).SaveQuery("SYS.Database:FreeSpace")
%SYS>zw ^%App.Task
^%apptools.Task("SYS.Database:FreeSpace","2020-03-22 09:36:49",0,1)="DatabaseName"
^%apptools.Task("SYS.Database:FreeSpace","2020-03-22 09:36:49",0,2)="Directory"
^%apptools.Task("SYS.Database:FreeSpace","2020-03-22 09:36:49",0,3)="MaxSize"
^%apptools.Task("SYS.Database:FreeSpace","2020-03-22 09:36:49",0,4)="Size"
^%apptools.Task("SYS.Database:FreeSpace","2020-03-22 09:36:49",0,5)="ExpansionSize"
...
%SYS>do ##class(apptools.core.sys).SaveSQL("select NameLowerCase,Description,Name FROM Security.Roles where Name['DB'", "^logMSW2")
%SYS>zw ^logMSW2
^logMSW2(-3,"sql")=$lb("select NameLowerCase,Description,Name FROM Security.Roles where Name'DB'")
^logMSW2(-3,"timestamp")=$lb("2020-03-22 09:49:50","2020-03-22 09:49:50",0)
^logMSW2(-1,"Description")=2
^logMSW2(-1,"Name")=3
^logMSW2(-1,"NameLowerCase")=1
^logMSW2(0)=$lb("NameLowerCase","Description","Name")
^logMSW2(1)=$lb("%all","Роль Суперпользователя","%All")
^logMSW2(2)=$lb("%db_%default","Доступ на чтение/запись для ресурса","%DB_%DEFAULT")
...
If you determine JDBC-DSN, then you can connect to an external database
// do ##class(apptools.core.sys).SqlToDSN("SELECT * FROM xxmv.xx_t359_pzn","JDBC-DSN","^tmpMSWq"))
```
Function to call from a regular tasks ``` %SYS>do ##class(apptools.core.sys).RunCmd("sudo du -sm /usr/irissys/mgr/*| sort -nr",$na(^%App.Cmd("mgr",$zd($h,3))),1,"/tmp/")
%SYS>zw ^%App.Cmd ^%App.Cmd("mgr","2020-03-22","2020-03-22_17:27:03",1)="388"$c(9)"/usr/irissys/mgr/irislib" ^%App.Cmd("mgr","2020-03-22","2020-03-22_17:27:03",2)="176"$c(9)"/usr/irissys/mgr/enslib" ^%App.Cmd("mgr","2020-03-22","2020-03-22_17:27:03",3)="100"$c(9)"/usr/irissys/mgr/IRIS.WIJ" ^%App.Cmd("mgr","2020-03-22","2020-03-22_17:27:03",4)="97"$c(9)"/usr/irissys/mgr/journal" ^%App.Cmd("mgr","2020-03-22","2020-03-22_17:27:03",5)="90"$c(9)"/usr/irissys/mgr/IRIS.DAT" ...
// do ##class(apptools.core.sys).RunTask("snmpwalk -v 1 server.ru -c public 1.3.6.1.4.1.16563.1.1.1.1.10","^%App.TaskLic","%SYSTEM.License:Counts","/tmp/")
```
``` %SYS>do ##class(apptools.core.files).OneDayJournalCount("/usr/irissys/mgr/journal/"_$tr($zd($h,3),"-"),"^tmpJRN")
/usr/irissys/mgr/journal/20200322.001 Processed /usr/irissys/mgr/journal/20200322.001% 2 written in ^tmpJRN
/usr/irissys/mgr/journal/20200322.002 Processed /usr/irissys/mgr/journal/20200322.002% 2 written in ^tmpJRN
/usr/irissys/mgr/journal/20200322.003
%SYS>zw ^tmpJRN ^tmpJRN="" ^tmpJRN("IRIS",20200322,16,"/opt/irisapp/data/","KILL","^ROUTINE","Counts")=1 ^tmpJRN("IRIS",20200322,16,"/opt/irisapp/data/","KILL","^ROUTINE","NewValue")=0 ^tmpJRN("IRIS",20200322,16,"/opt/irisapp/data/","KILL","^ROUTINE","OldValue")=0
Export to report CSV file
%SYS>do ##class(apptools.core.files).Export2CSV("/tmp/JrnCount*.csv","^tmpJRN")
Written to the file /tmp/JrnCount20200322173446.csv ```
zn "user"
USER>do ##class(apptools.python.xlsx).sql2xlsx("select * from apptools_core.Log order by id desc","n,,,,,n,,,,d","/tmp/sample-py.xlsx")
Initialize interoperability and create a new test product (thanks Dias) in IRISAPP. ``` IRISAPP>do ##class(apptools.core.Production).CreateProduction("IRISAPP", "Test.TestProd", "Ens.MonitorService,Ens.Alerting.AlertManager,Ens.Activity.Operation.REST")
IRISAPP>do ##class(Ens.Director).StartProduction("Test.TestProd") ```
Initialize interoperability and create a new test product in USER. ``` zn "user" USER>do ##class(apptools.core.Production).CreateProduction("USER", "Test.TestProd2", "Ens.MonitorService,Ens.Alerting.AlertManager,Ens.Activity.Operation.REST")
IRISAPP>do ##class(Ens.Director).StartProduction("Test.TestProd2") ``` When you administer more than 2 products, the scheduled server restart turns into a monotonous routine operation of manually stopping each product. To automate this, a set of utilities is used.
Preserve statuse and stop products in all namespace.
IRISAPP>do ##class(apptools.core.Production).SaveAndStop()
All products are stopped, you can restart the server.
After starting the DBMS, you can start all the products that were launched before.
IRISAPP>do ##class(apptools.core.Production).StartAll()
Get a class description, optionally with a superclass ``` IRISAPP>do ##class(apptools.core.LogInfoPane).GetClassDef("Test.TestProd2","",.def,1)
IRISAPP>zw def def("ClassName","Ens.Production")="" def("ClassName","Ens.Production","super") = "%RegisteredObject,Ens.Settings" def("ClassName","Ens.Settings")="" def("ClassName","Test.TestProd2") = "" def("ClassName","Test.TestProd2","super") = "Ens.Production" def("Methods","ApplySettings","Description") = "Apply multiple settings to a" ... ```
Create html format documentation in the form of tables for all products, including BS. BP BO and all classes that they meet
IRISAPP>do ##class(apptools.core.Production).GenDoc("/usr/irissys/csp/user/gen-doc.html")
All other features of the interface part of the software solution can be found in the document or in an article of a Russian resource
custom-task
methodadmin-LTE
project by changing the table parametersadd contextsearch sample
fixed xlxs method
fixed fileserver
fix type TimeStamp (XMLTIMEZONE = "IGNORE")
add demo
Added fileserver module for report execution results.
Implemented file deletion mode in the fileserver module.
Formation of results in XLS, XLSX formats has been implemented.
In the interface, the mode of exporting globals in the JSON format has been added.
fixed GetListModules
fixed jdbc module
added support jdbc gateway export/import module
upd gataway link
added bump module
fixed module export to xlsx
Added fileserver and export modules to xlsx
add support zpm resourses
fixed chart in LTE
fixed ChartPanel
update module.xml
updated dockerfile
A service has been added to the project to support informing via telegram messenger and email about the status of products and systems
The module for converting query results to a xlsx file based on the python openpyxl library is included
added permiss project
fixed mistake
update description
update description
Added favotite link
Added the platform for the rapid creation of a prototype of any solution.
For example, Photo Album, Music Player, and Personal Books Library all come together in a user-friendly treasure chest design.
update description
changed properties application
update release
add zapp shell support
added iris.script
Added the ability to run a favorite command by name node.
Fix chart base growth.
add screenshots
add discription
add images
Add UI link in VScode menu
fixed DockerFile
docker repair
add modules ShowGlobals, FindAndDrawAllQueue
renamed include file
changed the release number
zpm moule correction
add extensions
update description
fix version
add global translate
fix zpm
fix zpm
The hotfix documentation
add documentation
Initial Release