Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMaul committed Apr 26, 2019
0 parents commit 2226a41
Show file tree
Hide file tree
Showing 156 changed files with 8,205 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.4db*
*.4dd
*.4DIndy
*.Match
Logs
Project/DerivedData
*symbols.txt

Binary file added AdminWindow.4DIndx
Binary file not shown.
Binary file added AdminWindow.journal
Binary file not shown.
1 change: 1 addition & 0 deletions Preferences/Backup/Backup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><Preferences4D xmlns="http://www.4d.com/namespace/reserved/2004/backup"> <Backup> <DataBase> <DatabaseName> <ItemsCount>1</ItemsCount> <Item1>Macintosh HD:Users:thomas:Desktop:AdminWindow.4dbase:AdminWindow.4DD</Item1> </DatabaseName> <LastBackupPath> <ItemsCount>1</ItemsCount> <Item1>Macintosh HD:Users:thomas:Desktop:AdminWindow.4dbase:AdminWindow[0001].4BK</Item1> </LastBackupPath> <LastBackupLogPath> <ItemsCount>1</ItemsCount> <Item1>Macintosh HD:Users:thomas:Desktop:AdminWindow.4dbase:AdminWindow[0000].4BL</Item1> </LastBackupLogPath> <CurrentBackupSet> <ItemsCount>1</ItemsCount> <Item1>1</Item1> </CurrentBackupSet> <LastBackupDate> <ItemsCount>1</ItemsCount> <Item1>2019-03-05T00:00:00</Item1> </LastBackupDate> <LastBackupTime> <ItemsCount>1</ItemsCount> <Item1>0000-00-00T09:43:31</Item1> </LastBackupTime> </DataBase> <Settings> <Advanced> <BackupFailure> <TryBackupAtTheNextScheduledDate>False</TryBackupAtTheNextScheduledDate> <TryToBackupAfter>0000-00-00T00:00:00.561</TryToBackupAfter> <AbortIfBackupFail>False</AbortIfBackupFail> <RetryCountBeforeAbort>5</RetryCountBeforeAbort> </BackupFailure> <AutomaticRestore>True</AutomaticRestore> <AutomaticLogIntegration>True</AutomaticLogIntegration> <AutomaticRestart>True</AutomaticRestart> <BackupIfDataChange>False</BackupIfDataChange> <SetNumber> <Enable>True</Enable> <Value>3</Value> </SetNumber> <CompressionRate>Fast</CompressionRate> <Redundancy>None</Redundancy> <Interlacing>None</Interlacing> <FileSegmentation> <DefaultSize>0</DefaultSize> </FileSegmentation> <EraseOldBackupBefore>False</EraseOldBackupBefore> <CheckArchiveFileDuringBackup>True</CheckArchiveFileDuringBackup> <BackupJournalVerboseMode>True</BackupJournalVerboseMode> </Advanced> <General> <IncludeStructureFile>True</IncludeStructureFile> <IncludeDataFile>True</IncludeDataFile> <IncludeAltStructFile>False</IncludeAltStructFile> <DestinationFolder>./</DestinationFolder> <IncludesFiles> <ItemsCount>3</ItemsCount> <Item1>./AdminWindow.4DIndx</Item1> <Item2>./AdminWindow.4DSyncData</Item2> <Item3>./AdminWindow.4DSyncHeader</Item3> </IncludesFiles> </General> <Scheduler> <Frequency>Never</Frequency> <Hourly> <Every>12</Every> <StartingAt>0000-00-00T00:00:00.000</StartingAt> </Hourly> <Daily> <Every>1</Every> <Hour>0000-00-00T00:00:00.000</Hour> </Daily> <Weekly> <Every>1</Every> <Monday> <Save>False</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Monday> <Tuesday> <Save>False</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Tuesday> <Wednesday> <Save>False</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Wednesday> <Thursday> <Save>False</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Thursday> <Friday> <Save>False</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Friday> <Saturday> <Save>False</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Saturday> <Sunday> <Save>True</Save> <Hour>0000-00-00T00:00:00.000</Hour> </Sunday> </Weekly> <Monthly> <Every>1</Every> <Hour>0000-00-00T00:00:00.000</Hour> <Day>1</Day> </Monthly> </Scheduler> </Settings> </Backup></Preferences4D>
Expand Down
3 changes: 3 additions & 0 deletions Project/AdminWindow.4DProject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$comment": "The project file let you override the location for most folders"
}
13 changes: 13 additions & 0 deletions Project/Sources/Forms/AdminWindow/ObjectMethods/BtnPause.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
C_TEXT:C284($PauseString;$ResumeString;$current)

$PauseString:=Get localized string:C991("MONI_RTM_Pause")
$ResumeString:=Get localized string:C991("MONI_RTM_Resume")

$current:=OBJECT Get title:C1068(*;"BtnPause")
If ($current=$PauseString)
OBJECT SET TITLE:C194(*;"BtnPause";$ResumeString)
SET TIMER:C645(0)
Else
OBJECT SET TITLE:C194(*;"BtnPause";$PauseString)
SET TIMER:C645(60)
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
C_TEXT:C284($text)
$text:=JSON Stringify:C1217(Form:C1466.RTM;*)
SET TEXT TO PASTEBOARD:C523($text)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPEN SETTINGS WINDOW:C903("/Backup/Scheduler")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Monitor_runOnServer ("Backup")
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Monitor_runOnServer ("DebugLog")
Monitor_InitValues ("maintenance";"update")
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Monitor_runOnServer ("DiagnosticLog")
Monitor_InitValues ("maintenance";"update")
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_OBJECT:C1216($reportobject)
C_TEXT:C284($path)
$reportobject:=Monitor_InitValues_Server ("CompactLog")
If ($reportobject#Null:C1517)
$path:=Temporary folder:C486+"report.xml"
TEXT TO DOCUMENT:C1237($path;$reportobject.document)
OPEN URL:C673($path)
Else
// nothing
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_OBJECT:C1216($reportobject)
C_TEXT:C284($path)
$reportobject:=Monitor_InitValues_Server ("DebugLog")
If ($reportobject#Null:C1517)
$path:=Temporary folder:C486+"report.txt"
TEXT TO DOCUMENT:C1237($path;$reportobject.document)
OPEN URL:C673($path)
Else
// nothing
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_OBJECT:C1216($reportobject)
C_TEXT:C284($path)
$reportobject:=Monitor_InitValues_Server ("DiagnosticLog")
If ($reportobject#Null:C1517)
$path:=Temporary folder:C486+"report.txt"
TEXT TO DOCUMENT:C1237($path;$reportobject.document)
OPEN URL:C673($path)
Else
// nothing
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_OBJECT:C1216($reportobject)
C_TEXT:C284($path)
$reportobject:=Monitor_InitValues_Server ("RequestLog")
If ($reportobject#Null:C1517)
$path:=Temporary folder:C486+"report.txt"
TEXT TO DOCUMENT:C1237($path;$reportobject.document)
OPEN URL:C673($path)
Else
// nothing
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_OBJECT:C1216($reportobject)
C_TEXT:C284($path)
$reportobject:=Monitor_InitValues_Server ("VerifyLog")
If ($reportobject#Null:C1517)
$path:=Temporary folder:C486+"report.xml"
TEXT TO DOCUMENT:C1237($path;$reportobject.document)
OPEN URL:C673($path)
Else
// nothing
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
If (Form:C1466.web.started)
Monitor_runOnServer ("StopHTTPServer")
OBJECT SET TITLE:C194(*;"Moni_UIAction_HTTP_StartStop";Get localized string:C991("MONI_HTTP_StartHTTPServer"))
Else
Monitor_runOnServer ("StartHTTPServer")
OBJECT SET TITLE:C194(*;"Moni_UIAction_HTTP_StartStop";Get localized string:C991("MONI_HTTP_StopHTTPServer"))
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
C_LONGINT:C283($n)
C_TEXT:C284($Confirm)
C_OBJECT:C1216($element)

$n:=Form:C1466.processSelection.length

If ($n>1)
$Confirm:=Get localized string:C991("MONI_PROCESS_KillNprocesses")
$Confirm:=Replace string:C233($Confirm;"<1>";String:C10($n))
Else
$Confirm:=Get localized string:C991("MONI_PROCESS_Kill1process")
End if
CONFIRM:C162($Confirm)

If (OK=1)
For each ($element;Form:C1466.processSelection)
If ($element.ID#0)
Monitor_HandleProcess_Server ($element.ID;"abort")
End if
End for each
Monitor_InitValues ("process";"update")
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_LONGINT:C283($n)
C_TEXT:C284($Confirm)
C_OBJECT:C1216($element)

For each ($element;Form:C1466.processSelection)
If ($element.ID#0)
Monitor_HandleProcess_Server ($element.ID;"Pause")
End if
End for each
Monitor_InitValues ("process";"update")
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
C_LONGINT:C283($n)
C_TEXT:C284($Confirm)
C_OBJECT:C1216($element)

For each ($element;Form:C1466.processSelection)
If ($element.ID#0)
Monitor_HandleProcess_Server ($element.ID;"Resume")
End if
End for each
Monitor_InitValues ("process";"update")
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Monitor_runOnServer ("RequestLog")
Monitor_InitValues ("maintenance";"update")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Monitor_runOnServer ("Restart")
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
If (Form:C1466.application.newConnectionsAllowed)
Monitor_runOnServer ("DisallowAppServerConnect")
OBJECT SET TITLE:C194(*;"Moni_UIAction_S4D_Publish";Get localized string:C991("MONI_S4D_StartPublish"))
Else
Monitor_runOnServer ("AllowAppServerConnect")
OBJECT SET TITLE:C194(*;"Moni_UIAction_S4D_Publish";Get localized string:C991("MONI_S4D_StopPublish"))
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
If (Form:C1466.web.started)
Monitor_runOnServer ("StopHTTPServer")
OBJECT SET TITLE:C194(*;"Moni_UIAction_SOAP_StartStop";Get localized string:C991("MONI_HTTP_AcceptSOAPRequests"))
Else
Monitor_runOnServer ("StartHTTPServer")
OBJECT SET TITLE:C194(*;"Moni_UIAction_SOAP_StartStop";Get localized string:C991("MONI_HTTP_RejectSOAPRequests"))
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(1)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(8)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(2)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(3)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(9)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(4)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(5)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(10)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FORM GOTO PAGE:C247(7)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
C_TEXT:C284($Confirm)
C_OBJECT:C1216($element)

If (Form:C1466.userSelection.length>0)
If (Form:C1466.userSelection.length>1)
$Confirm:=Get localized string:C991("MONI_USERS_DropNusers")
$Confirm:=Replace string:C233($Confirm;"<1>";String:C10(Form:C1466.userSelection.length))
Else
$Confirm:=Get localized string:C991("MONI_USERS_Drop1user")
End if
CONFIRM:C162($Confirm)
If (OK=1)
For each ($element;Form:C1466.userSelection)
Monitor_DropUser_Server ($element.ID)
End for each
End if
Monitor_InitValues ("user";"update")
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
C_TEXT:C284($MONI_Users_SendMessageInfos;$message;$send;$cancel)
C_OBJECT:C1216($element)


If (Form:C1466.userSelection.length=0)
//impossible car bouton désactivé
//ALERT("Please, select users first")
Else
If (Form:C1466.userSelection.length<=1)
$MONI_Users_SendMessageInfos:=Get localized string:C991("MONI_USERS_ThisMessageOneUser")
Else
$MONI_Users_SendMessageInfos:=Get localized string:C991("MONI_USERS_ThisMessageNUsers") //"This message will be sent to <1> Users.")
$MONI_Users_SendMessageInfos:=Replace string:C233($MONI_Users_SendMessageInfos;"<1>";String:C10(Form:C1466.userSelection.length))
End if
$cancel:=Get localized string:C991("MONI_USERS_Cancel")
$send:=Get localized string:C991("MONI_USERS_Send") //"Send"  

$message:=Request:C163($MONI_Users_SendMessageInfos;"";$Send;$cancel)

If (ok=1)

For each ($element;Form:C1466.userSelection)
Monitor_SendMessage_Server ($message;$element.ID)
End for each

End if
End if


Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Case of
: (Form event:C388=On Clicked:K2:4)


ALERT:C41("MISSING")

End case
25 changes: 25 additions & 0 deletions Project/Sources/Forms/AdminWindow/ObjectMethods/Schaltfläche.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
C_OBJECT:C1216($application;$system;$license;$version;$users;$maintenance;$server;$web)
C_COLLECTION:C1488($result)
C_TEXT:C284($text)

$application:=Monitor_InitValues_Server ("application")
$system:=Monitor_InitValues_Server ("system")
$license:=Monitor_InitValues_Server ("license")
$version:=Monitor_InitValues_Server ("version")
$users:=Monitor_InitValues_Server ("userAndProcess")
$maintenance:=Monitor_InitValues_Server ("maintenance")
$server:=Monitor_InitValues_Server ("applicationServer")
$web:=Monitor_InitValues_Server ("web")

$result:=New collection:C1472(New object:C1471("Application";$application))
$result.push(New object:C1471("System";$system))
$result.push(New object:C1471("License";$license))
$result.push(New object:C1471("Version";$version))
$result.push(New object:C1471("Users";$users))
$result.push(New object:C1471("Maintenance";$maintenance))
$result.push(New object:C1471("ApplicationServer";$server))
$result.push(New object:C1471("HTTP";$web))
$result.push(New object:C1471("RTM";Form:C1466.RTM))

$text:=JSON Stringify:C1217($result;*)
SET TEXT TO PASTEBOARD:C523($text)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//Searchpicker sample code

C_POINTER:C301($ptr)
C_TEXT:C284($ObjectName;$search;$title)

Case of

: (Form event:C388=On Load:K2:1)

// Init the var itself
// this can be done anywhere else in your code
$ptr:=OBJECT Get pointer:C1124(Object current:K67:2)


$ObjectName:=OBJECT Get name:C1087(Object current:K67:2)
$title:=Get localized string:C991("MONI_PROCESS_PlaceHolder")
SearchPicker SET HELP TEXT ($ObjectName;$title)


: (Form event:C388=On Data Change:K2:15)
$ptr:=OBJECT Get pointer:C1124(Object current:K67:2)

$search:=$ptr->
If ($search#"")
$search:="@"+$search+"@"
Form:C1466.process:=Form:C1466.processAll.query("name = :1 or sessionName = :1";$search)
Else
Form:C1466.process:=Form:C1466.processAll
End if
End case
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//Searchpicker sample code

C_POINTER:C301($ptr)
C_TEXT:C284($ObjectName;$title;$search)

Case of

: (Form event:C388=On Load:K2:1)

// Init the var itself
// this can be done anywhere else in your code
$ptr:=OBJECT Get pointer:C1124(Object current:K67:2)

$ObjectName:=OBJECT Get name:C1087(Object current:K67:2)
$title:=Get localized string:C991("MONI_USERS_PlaceHolder")
SearchPicker SET HELP TEXT ($ObjectName;$title)


: (Form event:C388=On Data Change:K2:15)
$ptr:=OBJECT Get pointer:C1124(Object current:K67:2)

$search:=$ptr-> // vsearch //Form.userSearch
If ($search#"")
$search:="@"+$search+"@"
Form:C1466.user:=Form:C1466.userAll.query("machineName = :1 or systemUserName = :1 or userName = :1";$search)
Else
Form:C1466.user:=Form:C1466.userAll
End if
End case
Loading

0 comments on commit 2226a41

Please sign in to comment.