Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 8 additions & 4 deletions cubesql-webadmin.xojo_project
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ WebView=dlgRegisterServer;webapp/dialogs/dlgRegisterServer.xojo_code;&h000000000
WebView=dlgGetServerKey;webapp/dialogs/dlgGetServerKey.xojo_code;&h0000000076F627FF;&h0000000054A427FF;false
WebView=dlgDatabaseCreate;webapp/dialogs/dlgDatabaseCreate.xojo_code;&h0000000045C397FF;&h0000000054A427FF;false
WebView=dlgDatabaseUpload;webapp/dialogs/dlgDatabaseUpload.xojo_code;&h00000000375D2FFF;&h0000000054A427FF;false
WebView=dlgDatabaseSchedules;webapp/dialogs/dlgDatabaseSchedules.xojo_code;&h00000000514E3FFF;&h0000000054A427FF;false
WebView=dlgSchedule;webapp/dialogs/dlgSchedule.xojo_code;&h00000000476F1FFF;&h0000000054A427FF;false
WebView=dlgScheduleDatabases;webapp/dialogs/dlgScheduleDatabases.xojo_code;&h000000005565B7FF;&h0000000054A427FF;false
WebView=dlgUserCreate;webapp/dialogs/dlgUserCreate.xojo_code;&h0000000064C14FFF;&h0000000054A427FF;false
WebView=dlgUserGroups;webapp/dialogs/dlgUserGroups.xojo_code;&h00000000347EFFFF;&h0000000054A427FF;false
WebView=dlgPrivilegeGrant;webapp/dialogs/dlgPrivilegeGrant.xojo_code;&h000000004CD7F7FF;&h0000000054A427FF;false
Expand All @@ -29,7 +32,9 @@ WebContainer=cntStatus;webapp/containers/cntStatus.xojo_code;&h000000000A45BFFF;
Folder=server;webapp/containers/server;&h0000000045A527FF;&h000000005859EFFF;false
Folder=data;webapp/containers/data;&h00000000107E37FF;&h000000005859EFFF;false
WebContainer=cntDatabases;webapp/containers/data/cntDatabases.xojo_code;&h0000000040B4DFFF;&h00000000107E37FF;false
WebContainer=cntDatabasesEncryption;webapp/containers/data/cntDatabasesEncryption.xojo_code;&h0000000044B7E7FF;&h00000000107E37FF;false
WebContainer=cntBackups;webapp/containers/data/cntBackups.xojo_code;&h000000004237B7FF;&h00000000107E37FF;false
WebContainer=cntSchedules;webapp/containers/data/cntSchedules.xojo_code;&h000000002F98DFFF;&h00000000107E37FF;false
WebContainer=cntRegistrationAction;webapp/containers/server/cntRegistrationAction.xojo_code;&h000000000788EFFF;&h0000000045A527FF;false
Folder=security;webapp/containers/security;&h000000007FF17FFF;&h000000005859EFFF;false
Class=cntBase;webapp/containers/base/cntBase.xojo_code;&h0000000041D557FF;&h000000000B1567FF;false
Expand All @@ -52,16 +57,15 @@ Folder=information;webapp/containers/information;&h000000005EFC7FFF;&h0000000058
WebContainer=cntCommands;webapp/containers/information/cntCommands.xojo_code;&h000000002752C7FF;&h000000005EFC7FFF;false
WebContainer=cntClients;webapp/containers/information/cntClients.xojo_code;&h000000002140EFFF;&h000000005EFC7FFF;false
WebContainer=cntLog;webapp/containers/information/cntLog.xojo_code;&h000000002B1057FF;&h000000005EFC7FFF;false
WebContainer=cntDatabasesEncryption;webapp/containers/data/cntDatabasesEncryption.xojo_code;&h0000000044B7E7FF;&h00000000107E37FF;false
DefaultWindow=LoginPage
MajorVersion=0
MinorVersion=0
SubVersion=9
SubVersion=10
NonRelease=0
Release=0
InfoVersion=cubeSQL Web Admin
LongVersion=jo-tools.ch
ShortVersion=0.0.9
ShortVersion=0.0.10
WinCompanyName=jo-tools.ch
WinInternalName=cubesqlwebadmin
WinProductName=cubeSQL Web Admin
Expand Down Expand Up @@ -93,7 +97,7 @@ WebDebugPort=8080
WebLivePort=80
WebSecurePort=443
WebProtocol=1
WebHTMLHeader=<style>\n.listboxDbHeaderAlignment th:nth-child(1)\x2C\n.listboxDbHeaderAlignment th:nth-child(3)\x2C\n.listboxDbHeaderAlignment th:nth-child(5) {\n text-align: center;\n}\n\n.listboxGroupsHeaderAlignment th:nth-child(2) {\n text-align: center;\n}\n\n.listboxUsersHeaderAlignment th:nth-child(2) {\n text-align: center;\n}\n\n.listboxClientsHeaderAlignment th:nth-child(1) {\n text-align: center;\n}\n</style>
WebHTMLHeader=<style>\n.listboxDbHeaderAlignment th:nth-child(1)\x2C\n.listboxDbHeaderAlignment th:nth-child(3)\x2C\n.listboxDbHeaderAlignment th:nth-child(5) {\n text-align: center;\n}\n\n.listboxGroupsHeaderAlignment th:nth-child(2) {\n text-align: center;\n}\n\n.listboxUsersHeaderAlignment th:nth-child(2) {\n text-align: center;\n}\n\n.listboxClientsHeaderAlignment th:nth-child(1) {\n text-align: center;\n}\n\n.listboxSchedulesHeaderAlignment th:nth-child(3) {\n text-align: center;\n}\n</style>
WebHostingIdentifier=
WebHostingAppName=cubeSQLWebAdmin
WebHostingDomain=
Expand Down
6 changes: 3 additions & 3 deletions webapp/containers/data/cntBackups.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ End
col.FieldType = DatasourceColumn.FieldTypes.Text
col.Sortable = False
col.IsVirtual = True
col.IsSearchable = False
col.SortDirection = WebListBox.SortDirections.None
Me.Columns.Add(col)

Expand All @@ -712,7 +713,6 @@ End

If (filterDatabasename <> "") Then
Return Session.DB.SelectSQL("SHOW BACKUPS FOR DATABASE '" + filterDatabasename.EscapeSqlQuotes + "'")

End If

Return Nil
Expand Down Expand Up @@ -779,8 +779,8 @@ End

Var bFound As Boolean = False
For i As Integer = Me.Table.LastRowIndex DownTo 0
If (Me.Table.RowTagAt(i) IsA Dictionary) Then
Var rowTag As Dictionary = Me.Table.RowTagAt(i)
Var rowTag As Dictionary = Me.Table.RowTagAt(i)
If (rowTag IsA Dictionary) Then
If (rowTag.Lookup("timestamp", "-").StringValue <> sSelectAfterReload) Then Continue
Me.Table.SelectedRowIndex = i
bFound = True
Expand Down
85 changes: 77 additions & 8 deletions webapp/containers/data/cntDatabases.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Begin cntDatasourceBase cntDatabases
LockVertical = False
PanelIndex = "0"
Scope = 2
TabIndex = 8
TabIndex = 9
TabStop = True
Tooltip = ""
Top = 442
Expand Down Expand Up @@ -277,7 +277,7 @@ Begin cntDatasourceBase cntDatabases
Scope = 2
SVGColor = &c00000000
SVGData = ""
TabIndex = 9
TabIndex = 10
TabPanelIndex = 0
TabStop = True
Tooltip = ""
Expand Down Expand Up @@ -377,7 +377,7 @@ Begin cntDatasourceBase cntDatabases
LockVertical = False
PanelIndex = "0"
Scope = 2
TabIndex = 7
TabIndex = 8
TabStop = True
Tooltip = ""
Top = 442
Expand Down Expand Up @@ -405,6 +405,34 @@ Begin cntDatasourceBase cntDatabases
Tooltip = ""
_mPanelIndex = -1
End
Begin WebButton btnSchedules
AllowAutoDisable= False
Cancel = False
Caption = "Schedules"
ControlID = ""
Default = False
Enabled = False
Height = 38
Index = -2147483648
Indicator = 6
Left = 286
LockBottom = True
LockedInPosition= True
LockHorizontal = False
LockLeft = False
LockRight = True
LockTop = False
LockVertical = False
PanelIndex = "0"
Scope = 2
TabIndex = 7
TabStop = True
Tooltip = ""
Top = 442
Visible = False
Width = 120
_mPanelIndex = -1
End
End
#tag EndWebContainerControl

Expand Down Expand Up @@ -479,7 +507,7 @@ End
End Try

'Success - no dialog
Self.RefreshInfos(Name)
Me.RefreshInfos(Name)
Return True

End Function
Expand Down Expand Up @@ -690,12 +718,35 @@ End
End Try

'Success - no dialog
Self.RefreshInfos(Name)
Me.RefreshInfos(Name)
Return True

End Function
#tag EndMethod

#tag Method, Flags = &h21
Private Sub ActionSchedules()
Var databasename As String = Me.GetSelectedDatabasename()
If (databasename = "") Then Return

esActionDatabasename = databasename

Var dlgSchedules As New dlgDatabaseSchedules
AddHandler dlgSchedules.NeedsRefresh, WeakAddressOf ActionSchedulesButtonPressed
dlgSchedules.Show(databasename)

End Sub
#tag EndMethod

#tag Method, Flags = &h21
Private Sub ActionSchedulesButtonPressed(obj As dlgDatabaseSchedules)
#Pragma unused obj

'no need to refresh this list

End Sub
#tag EndMethod

#tag Method, Flags = &h21
Private Sub ActionSetKey(obj As cntDatabasesEncryption)
Var databasename As String = Me.GetSelectedDatabasename()
Expand Down Expand Up @@ -815,6 +866,8 @@ End
Me.Table = lstInfos
Me.SearchAvailable = True

ebSchedulesAvailable = cntSchedules.GetSchedulesAvailable()

End Sub
#tag EndMethod

Expand Down Expand Up @@ -875,7 +928,7 @@ End

#tag Method, Flags = &h21
Private Sub RefreshButtons()
Var bDownload, bRename, bStart, bStop, bDrop, bEncryption As Boolean
Var bDownload, bRename, bStart, bStop, bDrop, bEncryption, bSchedules As Boolean

Var rowTag As Dictionary = Me.GetSelectedTableRowTag()
If (rowTag <> Nil) Then
Expand All @@ -886,6 +939,7 @@ End
bStop = (Not bStart)
bDrop = True
bEncryption = True
bSchedules = ebSchedulesAvailable

End If

Expand All @@ -895,6 +949,9 @@ End
If (btnStop.Enabled <> bStop) Then btnStop.Enabled = bStop
If (btnDrop.Enabled <> bDrop) Then btnDrop.Enabled = bDrop
If (btnEncryption.Enabled <> bEncryption) Then btnEncryption.Enabled = bEncryption
If (btnSchedules.Enabled <> bSchedules) Then btnSchedules.Enabled = bSchedules
If (btnSchedules.Visible <> ebSchedulesAvailable) Then btnSchedules.Visible = ebSchedulesAvailable

End Sub
#tag EndMethod

Expand Down Expand Up @@ -1063,8 +1120,8 @@ End

Var bFound As Boolean = False
For i As Integer = Me.Table.LastRowIndex DownTo 0
If (Me.Table.RowTagAt(i) IsA Dictionary) Then
Var rowTag As Dictionary = Me.Table.RowTagAt(i)
Var rowTag As Dictionary = Me.Table.RowTagAt(i)
If (rowTag IsA Dictionary) Then
If (rowTag.Lookup("databasename", "").StringValue <> sSelectAfterReload) Then Continue
Me.Table.SelectedRowIndex = i
bFound = True
Expand All @@ -1084,6 +1141,10 @@ End
Private Download As WebFile
#tag EndProperty

#tag Property, Flags = &h21
Private ebSchedulesAvailable As Boolean
#tag EndProperty

#tag Property, Flags = &h21
Private esActionDatabasename As String
#tag EndProperty
Expand Down Expand Up @@ -1419,6 +1480,14 @@ End
End Sub
#tag EndEvent
#tag EndEvents
#tag Events btnSchedules
#tag Event
Sub Pressed()
Self.ActionSchedules()

End Sub
#tag EndEvent
#tag EndEvents
#tag ViewBehavior
#tag ViewProperty
Name="Area"
Expand Down
Loading