diff --git a/cubesql-webadmin.xojo_project b/cubesql-webadmin.xojo_project index daad5bd..ee078e0 100644 --- a/cubesql-webadmin.xojo_project +++ b/cubesql-webadmin.xojo_project @@ -5,6 +5,7 @@ OrigIDEVersion=20240100 Folder=resources;resources;&h0000000035B107FF;&h0000000000000000;false Folder=styles;styles;&h00000000139DBFFF;&h0000000000000000;false Class=CheckboxCellRenderer;styles/CheckboxCellRenderer.xojo_code;&h000000007F7FF7FF;&h00000000139DBFFF;false +Class=CopyContentCellRenderer;styles/CopyContentCellRenderer.xojo_code;&h00000000730747FF;&h00000000139DBFFF;false Folder=webapp;webapp;&h0000000018D38FFF;&h0000000000000000;false Folder=main;webapp/main;&h000000001D9447FF;&h0000000018D38FFF;false WebView=LoginPage;webapp/main/LoginPage.xojo_code;&h000000005492FFFF;&h000000001D9447FF;false @@ -51,6 +52,7 @@ Module=modCubeSQLAdmin;webapp/modCubeSQLAdmin.xojo_code;&h00000000097C9FFF;&h000 MultiImage=icon_128;resources/icon_128.xojo_image;&h000000007294E7FF;&h0000000035B107FF;false BuildSteps=Build Automation;Build Automation.xojo_code;&h000000001394FFFF;&h0000000000000000;false ColorAsset=colTextKey;styles/colTextKey.xojo_color;&h000000005870AFFF;&h00000000139DBFFF;false +ColorAsset=colWebListBoxSelectedRow;styles/colWebListBoxSelectedRow.xojo_color;&h0000000015B10FFF;&h00000000139DBFFF;false Module=modWebStyles;styles/modWebStyles.xojo_code;&h0000000002BE7FFF;&h00000000139DBFFF;false WebContainer=cntRegistration;webapp/containers/server/cntRegistration.xojo_code;&h000000002FA707FF;&h0000000045A527FF;false WebContainer=cntConsole;webapp/containers/server/cntConsole.xojo_code;&h000000004BD2DFFF;&h0000000045A527FF;false diff --git a/styles/CheckboxCellRenderer.xojo_code b/styles/CheckboxCellRenderer.xojo_code index 63f910c..8db5f2a 100644 --- a/styles/CheckboxCellRenderer.xojo_code +++ b/styles/CheckboxCellRenderer.xojo_code @@ -29,6 +29,7 @@ Inherits WebListboxCellRenderer code.Add " render(controlID, row, data, rowIndex, columnIndex, cell) {" // Remove the text that's already in the cell + code.Add " cell.innerText = '';" code.Add " cell.innerHTML = '';" // Make a bootstrap checkbox @@ -61,7 +62,6 @@ Inherits WebListboxCellRenderer Return String.FromArray(code, EndOfLine.Windows) - End Function #tag EndEvent diff --git a/styles/CopyContentCellRenderer.xojo_code b/styles/CopyContentCellRenderer.xojo_code new file mode 100644 index 0000000..75529f9 --- /dev/null +++ b/styles/CopyContentCellRenderer.xojo_code @@ -0,0 +1,134 @@ +#tag Class +Protected Class CopyContentCellRenderer +Inherits WebListBoxCellRenderer + #tag Event + Sub Deserialize(js As JSONItem) + CopyContent = js.Lookup("copycontent", "") + + End Sub + #tag EndEvent + + #tag Event + Function JavascriptClassCode(s As WebSession) As String + #Pragma unused s + + Var code() As String + + // All custom cells extend the XojoWeb.ListboxCellRenderer class + code.Add "class TextWithCopyButtonCell extends XojoWeb.ListboxCellRenderer {" + + // You must override the "render" method + // controlID (string): The identifier of the listbox control that the renderer is currently running under + // row (HTMLElement): The HTML DOM element of the entire row. This is provided so that you can make modifications to the entire row if necessary, like applying a style. + // data (object): The data that the Xojo portion of your control provided for this column + // rowIndex (number): The row number that is currently being rendered + // columnIndex (number): The column number that is currently being rendered + // cell (HTMLElement): The HTML DOM element of the cell that your renderer is responsible for. + code.Add " render(controlID, row, data, rowIndex, columnIndex, cell) {" + + // Remove the text that's already in the cell + code.Add " cell.innerText = '';" + code.Add " cell.innerHTML = '';" + + // Make a Container for both Text and Copy Button + code.Add " let container = document.createElement('div');" + code.Add " container.style = 'display: flex;';" + + // Div for Text + code.Add " let textContainer = document.createElement('div');" + code.Add " textContainer.innerText = data.copycontent;" + code.Add " textContainer.style = 'white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 5px;';" + + // Make a bootstrap Button + code.Add " let button = document.createElement('button');" + code.Add " button.className = 'btn btn-outline-secondary btn-sm';" + code.Add " button.innerText = 'Copy';" + code.Add " button.style= 'float: right; margin-left: auto;';" + + // Handle clicking on the button + code.Add " button.addEventListener('click', function(ev) {" + code.Add " ev.stopPropagation();" + code.Add " navigator.clipboard.writeText(data.copycontent);" + code.Add " return false;" + code.Add " });" + + // Add our new content + code.Add " container.appendChild(textContainer);" + code.Add " container.appendChild(button);" + code.Add " cell.appendChild(container);" + code.Add " }" + code.Add "}" + + Return String.FromArray(code, EndOfLine.Windows) + + End Function + #tag EndEvent + + #tag Event + Function Serialize() As JSONItem + Var result As New JSONItem + result.Value("copycontent") = CopyContent + Return result + End Function + #tag EndEvent + + + #tag Method, Flags = &h0 + Sub Constructor(Content As String) + // Calling the overridden superclass constructor. + Super.Constructor + + Me.CopyContent = Content.Trim + End Sub + #tag EndMethod + + + #tag Property, Flags = &h21 + Private CopyContent As String + #tag EndProperty + + + #tag ViewBehavior + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + InitialValue="" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + InitialValue="" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag EndViewBehavior +End Class +#tag EndClass diff --git a/styles/colWebListBoxSelectedRow.xojo_color b/styles/colWebListBoxSelectedRow.xojo_color new file mode 100644 index 0000000..575bbce --- /dev/null +++ b/styles/colWebListBoxSelectedRow.xojo_color @@ -0,0 +1,8 @@ +#tag ColorGroup + CodeName=colWebListBoxSelectedRow + #tag Color + Type=0 + Platform=3 + Light=004B9619 + #tag EndColor +#tag EndColorGroup diff --git a/webapp/containers/cntStatus.xojo_code b/webapp/containers/cntStatus.xojo_code index 617ddd4..d780d3a 100644 --- a/webapp/containers/cntStatus.xojo_code +++ b/webapp/containers/cntStatus.xojo_code @@ -51,7 +51,7 @@ Begin cntBase cntStatus RowSelectionType= 0 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True diff --git a/webapp/containers/data/cntBackups.xojo_code b/webapp/containers/data/cntBackups.xojo_code index 354c8e2..f94c761 100644 --- a/webapp/containers/data/cntBackups.xojo_code +++ b/webapp/containers/data/cntBackups.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntBackups RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -434,6 +434,25 @@ Begin cntDatasourceBase cntBackups Scope = 2 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -942,7 +961,7 @@ End End If If update.HasKey("Error") Then - ShowErrorDialog("Backup Database", "Could not backup database.", update.Lookup("Error", "").StringValue) + ShowErrorDialog(dlgMessage, "Backup Database", "Could not backup database.", update.Lookup("Error", "").StringValue) End If Next @@ -989,7 +1008,7 @@ End End If If update.HasKey("Error") Then - ShowErrorDialog("Delete Backup", "Could not delete backup.", update.Lookup("Error", "").StringValue) + ShowErrorDialog(dlgMessage, "Delete Backup", "Could not delete backup.", update.Lookup("Error", "").StringValue) End If Next @@ -1036,7 +1055,7 @@ End End If If update.HasKey("Error") Then - ShowErrorDialog("Restore Backup", "Could not restore backup.", update.Lookup("Error", "").StringValue) + ShowErrorDialog(dlgMessage, "Restore Backup", "Could not restore backup.", update.Lookup("Error", "").StringValue) End If Next @@ -1152,7 +1171,7 @@ End End If If update.HasKey("Error") Then - ShowErrorDialog("Download Backup", "Could not download backup.", update.Lookup("Error", "").StringValue) + ShowErrorDialog(dlgMessage, "Download Backup", "Could not download backup.", update.Lookup("Error", "").StringValue) End If Next diff --git a/webapp/containers/data/cntDatabases.xojo_code b/webapp/containers/data/cntDatabases.xojo_code index 6434a1a..ca7308d 100644 --- a/webapp/containers/data/cntDatabases.xojo_code +++ b/webapp/containers/data/cntDatabases.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntDatabases RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -433,6 +433,25 @@ Begin cntDatasourceBase cntDatabases Width = 120 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -465,7 +484,7 @@ End Session.DB.ExecuteSQL("ENCRYPT DATABASE '" + esActionDatabasename.EscapeSqlQuotes + "' WITH KEY '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Change Key for Database", "Could not set change key for database.", err) + ShowErrorDialog(dlgMessage, "Change Key for Database", "Could not set change key for database.", err) Return False End Try @@ -501,7 +520,7 @@ End Session.DB.ExecuteSQL(sqlCreateDb) Catch err As DatabaseException - ShowErrorDialog("Create Database", "Could not create database.", err) + ShowErrorDialog(dlgMessage, "Create Database", "Could not create database.", err) Return False End Try @@ -548,7 +567,7 @@ End Session.DB.ExecuteSQL("DECRYPT DATABASE '" + sDecryptDatabasename.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Decrypt Database", "Could not decrypt database.", err) + ShowErrorDialog(dlgMessage, "Decrypt Database", "Could not decrypt database.", err) Finally Me.RefreshInfos() @@ -617,7 +636,7 @@ End Session.DB.ExecuteSQL("DROP DATABASE '" + sDropDatabasename.EscapeSqlQuotes + "' IF EXISTS") Catch err As DatabaseException - ShowErrorDialog("Drop Database", "Could not drop database.", err) + ShowErrorDialog(dlgMessage, "Drop Database", "Could not drop database.", err) Finally Me.RefreshInfos() @@ -655,7 +674,7 @@ End Session.DB.ExecuteSQL("ENCRYPT DATABASE '" + esActionDatabasename.EscapeSqlQuotes + "' WITH KEY '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Encrypt Database", "Could not encrypt database.", err) + ShowErrorDialog(dlgMessage, "Encrypt Database", "Could not encrypt database.", err) Return False End Try @@ -712,7 +731,7 @@ End Session.DB.ExecuteSQL("RENAME DATABASE '" + esActionDatabasename.EscapeSqlQuotes + "' TO '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Rename Database", "Could not rename database.", err) + ShowErrorDialog(dlgMessage, "Rename Database", "Could not rename database.", err) Return False End Try @@ -775,7 +794,7 @@ End Session.DB.ExecuteSQL("SET KEY '" + Name.EscapeSqlQuotes + "' FOR DATABASE '" + esActionDatabasename.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Set Key for Database", "Could not set key for database.", err) + ShowErrorDialog(dlgMessage, "Set Key for Database", "Could not set key for database.", err) Return False End Try @@ -796,7 +815,7 @@ End Session.DB.ExecuteSQL("START DATABASE '" + databasename.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Start database", "Could not start database.", err) + ShowErrorDialog(dlgMessage, "Start database", "Could not start database.", err) Finally Me.RefreshInfos() @@ -815,7 +834,7 @@ End Session.DB.ExecuteSQL("STOP DATABASE '" + databasename.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Stop database", "Could not stop database.", err) + ShowErrorDialog(dlgMessage, "Stop database", "Could not stop database.", err) Finally Me.RefreshInfos() @@ -1011,7 +1030,7 @@ End Me.Columns.Add(col) col = New DatasourceColumn() - col.Width = "*" + col.Width = "50%" col.DatabaseColumnName = "databasename" col.Heading = "Databasename" col.FieldType = DatasourceColumn.FieldTypes.Text @@ -1320,11 +1339,11 @@ End End If If update.HasKey("Hint") Then - ShowInfoDialog("Upload Database", update.Lookup("Hint", "").StringValue.NthField("|", 1), update.Lookup("Hint", "").StringValue.NthField("|", 2)) + ShowInfoDialog(dlgMessage, "Upload Database", update.Lookup("Hint", "").StringValue.NthField("|", 1), update.Lookup("Hint", "").StringValue.NthField("|", 2)) End If If update.HasKey("Error") Then - ShowErrorDialog("Upload Database", "Could not upload database.", update.Lookup("Error", "").StringValue) + ShowErrorDialog(dlgMessage, "Upload Database", "Could not upload database.", update.Lookup("Error", "").StringValue) End If Next @@ -1460,7 +1479,7 @@ End End If If update.HasKey("Error") Then - ShowErrorDialog("Download Database", "Could not download database.", update.Lookup("Error", "").StringValue) + ShowErrorDialog(dlgMessage, "Download Database", "Could not download database.", update.Lookup("Error", "").StringValue) End If Next diff --git a/webapp/containers/data/cntSchedules.xojo_code b/webapp/containers/data/cntSchedules.xojo_code index a1558e0..b44a484 100644 --- a/webapp/containers/data/cntSchedules.xojo_code +++ b/webapp/containers/data/cntSchedules.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntSchedules RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -388,13 +388,32 @@ Begin cntDatasourceBase cntSchedules Begin WebThread thrDetails DebugIdentifier = "" Index = -2147483648 - LockedInPosition= False + LockedInPosition= True Priority = 5 Scope = 2 StackSize = 0 ThreadID = 0 ThreadState = 0 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -427,7 +446,7 @@ End Session.DB.ExecuteSQL(sqlCreateSchedule) Catch err As DatabaseException - ShowErrorDialog("Create Schedule", "Could not create schedule.", err) + ShowErrorDialog(dlgMessage, "Create Schedule", "Could not create schedule.", err) Return False End Try @@ -494,7 +513,7 @@ End Session.DB.ExecuteSQL("DROP SCHEDULE '" + sDropSchedule.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Drop Schedule", "Could not drop schedule.", err) + ShowErrorDialog(dlgMessage, "Drop Schedule", "Could not drop schedule.", err) Finally Me.RefreshInfos() @@ -538,7 +557,7 @@ End Session.DB.ExecuteSQL(sqlCreateSchedule) Catch err As DatabaseException - ShowErrorDialog("Create Schedule", "Could not create schedule.", err) + ShowErrorDialog(dlgMessage, "Create Schedule", "Could not create schedule.", err) Return False End Try @@ -577,7 +596,7 @@ End Session.DB.ExecuteSQL("RENAME SCHEDULE '" + esActionSchedule.EscapeSqlQuotes + "' TO '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Rename Schedule", "Could not rename schedule.", err) + ShowErrorDialog(dlgMessage, "Rename Schedule", "Could not rename schedule.", err) Return False End Try @@ -803,7 +822,11 @@ End Var col As DatasourceColumn col = New DatasourceColumn() - col.Width = "*" + If ebShowDetails Then + col.Width = "70%" + Else + col.Width = "100%" + End If col.DatabaseColumnName = "schedname" col.Heading = "Schedule" col.FieldType = DatasourceColumn.FieldTypes.Text diff --git a/webapp/containers/data/cntTablesIndexes.xojo_code b/webapp/containers/data/cntTablesIndexes.xojo_code index c5b930b..6174595 100644 --- a/webapp/containers/data/cntTablesIndexes.xojo_code +++ b/webapp/containers/data/cntTablesIndexes.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntTablesIndexes RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -214,7 +214,7 @@ Begin cntDatasourceBase cntTablesIndexes LockVertical = False PanelIndex = "0" Scope = 2 - TabIndex = 4 + TabIndex = 5 TabStop = True Tooltip = "" Top = 442 @@ -310,7 +310,7 @@ Begin cntDatasourceBase cntTablesIndexes Indicator = 0 Left = 502 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True @@ -318,7 +318,7 @@ Begin cntDatasourceBase cntTablesIndexes LockVertical = False PanelIndex = "0" Scope = 2 - TabIndex = 5 + TabIndex = 4 TabStop = True Tooltip = "" Top = 442 @@ -326,6 +326,25 @@ Begin cntDatasourceBase cntTablesIndexes Width = 120 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -373,7 +392,7 @@ End Session.DB.ExecuteSQL("COMMIT") Catch err As DatabaseException - ShowErrorDialog("Alter Table", "Could not alter table.", err) + ShowErrorDialog(dlgMessage, "Alter Table", "Could not alter table.", err) Return False End Try @@ -424,7 +443,7 @@ End Session.DB.ExecuteSQL("COMMIT") Catch err As DatabaseException - ShowErrorDialog("Create Index", "Could not create index.", err) + ShowErrorDialog(dlgMessage, "Create Index", "Could not create index.", err) Return False End Try @@ -465,7 +484,7 @@ End Session.DB.ExecuteSQL("COMMIT") Catch err As DatabaseException - ShowErrorDialog("Create Table", "Could not create table.", err) + ShowErrorDialog(dlgMessage, "Create Table", "Could not create table.", err) Return False End Try @@ -513,7 +532,7 @@ End Session.DB.ExecuteSQL("COMMIT") Catch err As DatabaseException - ShowErrorDialog("Drop " + dictDropItem.Lookup("type", "").StringValue.Titlecase, "Could not drop " + dictDropItem.Lookup("type", "").StringValue.Lowercase + ".", err) + ShowErrorDialog(dlgMessage, "Drop " + dictDropItem.Lookup("type", "").StringValue.Titlecase, "Could not drop " + dictDropItem.Lookup("type", "").StringValue.Lowercase + ".", err) Finally Me.RefreshInfos() @@ -664,7 +683,6 @@ End col.SortDirection = WebListBox.SortDirections.None Me.Columns.Add(col) - End Sub #tag EndMethod @@ -718,6 +736,9 @@ End Case "type" Return row.Lookup(col.DatabaseColumnName, "").StringValue.Titlecase + Case "sql" + Return New CopyContentCellRenderer(row.Lookup(col.DatabaseColumnName, "").StringValue) + Else Return Super.TableRowColumnData(col, row) diff --git a/webapp/containers/information/cntClients.xojo_code b/webapp/containers/information/cntClients.xojo_code index b27d97a..e80a6b2 100644 --- a/webapp/containers/information/cntClients.xojo_code +++ b/webapp/containers/information/cntClients.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntClients RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -73,14 +73,14 @@ Begin cntDatasourceBase cntClients Indicator = 1 Left = 502 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True LockTop = False LockVertical = False Scope = 2 - TabIndex = 3 + TabIndex = 1 TabStop = True Tooltip = "" Top = 442 @@ -100,7 +100,7 @@ Begin cntDatasourceBase cntClients Indicator = 4 Left = 610 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True @@ -108,7 +108,7 @@ Begin cntDatasourceBase cntClients LockVertical = False PanelIndex = "0" Scope = 2 - TabIndex = 4 + TabIndex = 2 TabStop = True Tooltip = "" Top = 442 @@ -123,7 +123,7 @@ Begin cntDatasourceBase cntClients Index = -2147483648 Indicator = 0 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -136,6 +136,25 @@ Begin cntDatasourceBase cntClients Tooltip = "" _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -173,7 +192,7 @@ End Session.DB.ExecuteSQL("CLOSE CONNECTION " + iDisconnectClientId.ToString) Catch err As DatabaseException - ShowErrorDialog("Disconnect Client", "Could not disconnect client.", err) + ShowErrorDialog(dlgMessage, "Disconnect Client", "Could not disconnect client.", err) Finally Me.RefreshInfos() diff --git a/webapp/containers/information/cntCommands.xojo_code b/webapp/containers/information/cntCommands.xojo_code index 5ce318f..52a6d0b 100644 --- a/webapp/containers/information/cntCommands.xojo_code +++ b/webapp/containers/information/cntCommands.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntCommands RowSelectionType= 0 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -84,7 +84,7 @@ End Var col As DatasourceColumn col = New DatasourceColumn() - col.Width = "*" + col.Width = "65%" col.DatabaseColumnName = "command" col.Heading = "Command" col.FieldType = DatasourceColumn.FieldTypes.Text @@ -93,7 +93,7 @@ End Me.Columns.Add(col) col = New DatasourceColumn() - col.Width = "20%" + col.Width = "15%" col.DatabaseColumnName = "context" col.Heading = "Context" col.FieldType = DatasourceColumn.FieldTypes.Text @@ -133,6 +133,21 @@ End End Function #tag EndMethod + #tag Method, Flags = &h1 + Protected Function TableRowColumnData(col As DatasourceColumn, row As Dictionary) As Variant + Select Case col.DatabaseColumnName + + Case "command" + Return New CopyContentCellRenderer(row.Lookup(col.DatabaseColumnName, "").StringValue) + + Else + Return Super.TableRowColumnData(col, row) + + End Select + + End Function + #tag EndMethod + #tag EndWindowCode diff --git a/webapp/containers/information/cntLog.xojo_code b/webapp/containers/information/cntLog.xojo_code index 22b2232..8d66e5c 100644 --- a/webapp/containers/information/cntLog.xojo_code +++ b/webapp/containers/information/cntLog.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntLog RowSelectionType= 0 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -157,7 +157,7 @@ Begin cntDatasourceBase cntLog Enabled = False Index = -2147483648 Location = 0 - LockedInPosition= False + LockedInPosition= True Period = 1 RunMode = 0 Scope = 2 diff --git a/webapp/containers/security/cntEnginePreferences.xojo_code b/webapp/containers/security/cntEnginePreferences.xojo_code index 55c54c9..a624506 100644 --- a/webapp/containers/security/cntEnginePreferences.xojo_code +++ b/webapp/containers/security/cntEnginePreferences.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntEnginePreferences RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -325,7 +325,7 @@ Begin cntDatasourceBase cntEnginePreferences Index = -2147483648 Indicator = 0 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -365,6 +365,25 @@ Begin cntDatasourceBase cntEnginePreferences Width = 100 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -418,7 +437,7 @@ End Session.DB.ExecuteSQL(sql) Catch err As DatabaseException - ShowErrorDialog("Drop Engine Preference", "Could not drop engine preference.", err) + ShowErrorDialog(dlgMessage, "Drop Engine Preference", "Could not drop engine preference.", err) Finally Me.RefreshInfos() @@ -474,7 +493,7 @@ End Session.DB.ExecuteSQL(sql) Catch err As DatabaseException - ShowErrorDialog("Set Engine Preference", "Could not set engine preference.", err) + ShowErrorDialog(dlgMessage, "Set Engine Preference", "Could not set engine preference.", err) Return False End Try @@ -700,7 +719,7 @@ End Me.Columns.Add(col) col = New DatasourceColumn() - col.Width = "*" + col.Width = "34%" col.DatabaseColumnName = "value" col.Heading = "Value" col.FieldType = DatasourceColumn.FieldTypes.Text diff --git a/webapp/containers/security/cntGroups.xojo_code b/webapp/containers/security/cntGroups.xojo_code index 1cd3078..e7738ed 100644 --- a/webapp/containers/security/cntGroups.xojo_code +++ b/webapp/containers/security/cntGroups.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntGroups RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -147,7 +147,7 @@ Begin cntDatasourceBase cntGroups Begin WebThread thrDetails DebugIdentifier = "" Index = -2147483648 - LockedInPosition= False + LockedInPosition= True Priority = 5 Scope = 2 StackSize = 0 @@ -161,7 +161,26 @@ Begin cntDatasourceBase cntGroups Index = -2147483648 Indicator = 0 LockBottom = False - LockedInPosition= False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -197,7 +216,7 @@ End Session.DB.ExecuteSQL("CREATE GROUP '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Create Group", "Could not create group.", err) + ShowErrorDialog(dlgMessage, "Create Group", "Could not create group.", err) Return False End Try @@ -240,7 +259,7 @@ End Session.DB.ExecuteSQL("DROP GROUP '" + sDropGroupname.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Drop Group", "Could not drop group.", err) + ShowErrorDialog(dlgMessage, "Drop Group", "Could not drop group.", err) Finally Me.RefreshInfos() @@ -277,7 +296,7 @@ End Session.DB.ExecuteSQL("RENAME GROUP '" + esActionGroupname.EscapeSqlQuotes + "' TO '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Rename Group", "Could not rename group.", err) + ShowErrorDialog(dlgMessage, "Rename Group", "Could not rename group.", err) Return False End Try @@ -414,7 +433,11 @@ End Var col As DatasourceColumn col = New DatasourceColumn() - col.Width = "*" + If ebShowDetails Then + col.Width = "40%" + Else + col.Width = "100%" + End If col.DatabaseColumnName = "groupname" col.Heading = "Groupname" col.FieldType = DatasourceColumn.FieldTypes.Text diff --git a/webapp/containers/security/cntPrivileges.xojo_code b/webapp/containers/security/cntPrivileges.xojo_code index 32dd2b0..13a5e16 100644 --- a/webapp/containers/security/cntPrivileges.xojo_code +++ b/webapp/containers/security/cntPrivileges.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntPrivileges RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -325,7 +325,26 @@ Begin cntDatasourceBase cntPrivileges Index = -2147483648 Indicator = 0 LockBottom = False - LockedInPosition= False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -368,7 +387,7 @@ End Session.DB.ExecuteSQL(sql) Catch err As DatabaseException - ShowErrorDialog("Grant Privilege", "Could not grant privilege.", err) + ShowErrorDialog(dlgMessage, "Grant Privilege", "Could not grant privilege.", err) Return False End Try @@ -455,7 +474,7 @@ End Session.DB.ExecuteSQL(sql) Catch err As DatabaseException - ShowErrorDialog("Revoke Privilege", "Could not revoke privilege.", err) + ShowErrorDialog(dlgMessage, "Revoke Privilege", "Could not revoke privilege.", err) Finally Me.RefreshInfos() @@ -664,7 +683,7 @@ End Var col As DatasourceColumn col = New DatasourceColumn() - col.Width = "*" + col.Width = "30%" col.DatabaseColumnName = "groupname" col.Heading = "Groupname" col.FieldType = DatasourceColumn.FieldTypes.Text diff --git a/webapp/containers/security/cntUsers.xojo_code b/webapp/containers/security/cntUsers.xojo_code index c15b2a1..60f5aa1 100644 --- a/webapp/containers/security/cntUsers.xojo_code +++ b/webapp/containers/security/cntUsers.xojo_code @@ -51,7 +51,7 @@ Begin cntDatasourceBase cntUsers RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -362,6 +362,25 @@ Begin cntDatasourceBase cntUsers _mPanelIndex = -1 End End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -390,7 +409,7 @@ End End If Catch err As DatabaseException - ShowErrorDialog("Create User", "Could not create user.", err) + ShowErrorDialog(dlgMessage, "Create User", "Could not create user.", err) Return False End Try @@ -449,7 +468,7 @@ End Session.DB.ExecuteSQL("DROP USER '" + sDropUsername.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Drop User", "Could not drop user.", err) + ShowErrorDialog(dlgMessage, "Drop User", "Could not drop user.", err) Finally Me.RefreshInfos() @@ -508,7 +527,7 @@ End Session.DB.ExecuteSQL("SET PASSWORD '" + Password.EscapeSqlQuotes + "' FOR USER '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Set User Password", "Could not set user password.", err) + ShowErrorDialog(dlgMessage, "Set User Password", "Could not set user password.", err) Return False End Try @@ -547,7 +566,7 @@ End Session.DB.ExecuteSQL("RENAME USER '" + esActionUsername + "' TO '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Rename User", "Could not rename user.", err) + ShowErrorDialog(dlgMessage, "Rename User", "Could not rename user.", err) Return False End Try @@ -741,7 +760,11 @@ End Var col As DatasourceColumn col = New DatasourceColumn() - col.Width = "*" + If ebShowDetails Then + col.Width = "40%" + Else + col.Width = "100%" + End If col.DatabaseColumnName = "username" col.Heading = "Username" col.FieldType = DatasourceColumn.FieldTypes.Text diff --git a/webapp/containers/server/cntConsole.xojo_code b/webapp/containers/server/cntConsole.xojo_code index 3d53381..23d66aa 100644 --- a/webapp/containers/server/cntConsole.xojo_code +++ b/webapp/containers/server/cntConsole.xojo_code @@ -51,7 +51,7 @@ Begin cntBase cntConsole RowSelectionType= 0 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True @@ -180,6 +180,25 @@ Begin cntBase cntConsole Width = 710 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -233,7 +252,7 @@ End Catch err As DatabaseException Var errorDialogTitle As String = If(isquery, "SELECT SQL", "EXECUTE SQL") - ShowErrorDialog(errorDialogTitle, "Could not execute " + errorDialogTitle + " command.", err) + ShowErrorDialog(dlgMessage, errorDialogTitle, "Could not execute " + errorDialogTitle + " command.", err) rs = Nil If isquery Then @@ -411,7 +430,7 @@ End Catch err As DatabaseException - ShowErrorDialog("Change database", "Could not change database.", err) + ShowErrorDialog(dlgMessage, "Change database", "Could not change database.", err) Finally Self.TableClear() diff --git a/webapp/containers/server/cntRegistration.xojo_code b/webapp/containers/server/cntRegistration.xojo_code index aa7c295..d225401 100644 --- a/webapp/containers/server/cntRegistration.xojo_code +++ b/webapp/containers/server/cntRegistration.xojo_code @@ -51,7 +51,7 @@ Begin cntBase cntRegistration RowSelectionType= 0 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 0 TabStop = True diff --git a/webapp/containers/server/cntRegistrationAction.xojo_code b/webapp/containers/server/cntRegistrationAction.xojo_code index bb8da04..303afa2 100644 --- a/webapp/containers/server/cntRegistrationAction.xojo_code +++ b/webapp/containers/server/cntRegistrationAction.xojo_code @@ -22,7 +22,6 @@ Begin WebContainer cntRegistrationAction Width = 750 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebButton btnGetServerKey AllowAutoDisable= False @@ -108,6 +107,25 @@ Begin WebContainer cntRegistrationAction Width = 200 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebContainerControl @@ -169,13 +187,13 @@ End End If Catch err As DatabaseException - ShowErrorDialog("Registration", "Could not register cubeSQL Server.", err) + ShowErrorDialog(dlgMessage, "Registration", "Could not register cubeSQL Server.", err) NeedsRefresh Return False End Try - ShowSuccessDialog("Registration", "Thanks for registering cubeSQL Server!", "") + ShowSuccessDialog(dlgMessage, "Registration", "Thanks for registering cubeSQL Server!", "") NeedsRefresh Return True @@ -225,7 +243,7 @@ End Session.DB.ExecuteSQL("SET PREFERENCE 'SERVER_NAME' TO '" + Name.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Set Server Name", "Could not ser server name.", err) + ShowErrorDialog(dlgMessage, "Set Server Name", "Could not ser server name.", err) NeedsRefresh Return False diff --git a/webapp/dialogs/dlgCommonName.xojo_code b/webapp/dialogs/dlgCommonName.xojo_code index 14a0bb8..8407f83 100644 --- a/webapp/dialogs/dlgCommonName.xojo_code +++ b/webapp/dialogs/dlgCommonName.xojo_code @@ -22,7 +22,6 @@ Begin dlgBase dlgCommonName Width = 600 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebLabel labTitle Bold = True diff --git a/webapp/dialogs/dlgDatabaseCreate.xojo_code b/webapp/dialogs/dlgDatabaseCreate.xojo_code index cadf584..25207f7 100644 --- a/webapp/dialogs/dlgDatabaseCreate.xojo_code +++ b/webapp/dialogs/dlgDatabaseCreate.xojo_code @@ -22,7 +22,6 @@ Begin dlgBase dlgDatabaseCreate Width = 600 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebLabel labTitle Bold = True diff --git a/webapp/dialogs/dlgDatabaseSchedules.xojo_code b/webapp/dialogs/dlgDatabaseSchedules.xojo_code index 46dc646..e8b686e 100644 --- a/webapp/dialogs/dlgDatabaseSchedules.xojo_code +++ b/webapp/dialogs/dlgDatabaseSchedules.xojo_code @@ -137,7 +137,7 @@ Begin dlgBase dlgDatabaseSchedules RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 1 TabStop = True @@ -204,6 +204,25 @@ Begin dlgBase dlgDatabaseSchedules Width = 100 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebPage @@ -366,7 +385,7 @@ End Session.DB.ExecuteSQL("ATTACH SCHEDULE '" + schedule.EscapeSqlQuotes + "' TO DATABASE '" + esDatabasename.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Attach Schedule to Database", "Could not attach schedule to database.", err) + ShowErrorDialog(dlgMessage, "Attach Schedule to Database", "Could not attach schedule to database.", err) Return End Try @@ -427,7 +446,7 @@ End Session.DB.ExecuteSQL("DETACH SCHEDULE '" + schedule.EscapeSqlQuotes + "' FROM DATABASE '" + esDatabasename.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Detach Schedule from Database", "Could not detach schedule from database.", err) + ShowErrorDialog(dlgMessage, "Detach Schedule from Database", "Could not detach schedule from database.", err) Return End Try diff --git a/webapp/dialogs/dlgEnginePreferenceSet.xojo_code b/webapp/dialogs/dlgEnginePreferenceSet.xojo_code index b19cf92..d25cc2e 100644 --- a/webapp/dialogs/dlgEnginePreferenceSet.xojo_code +++ b/webapp/dialogs/dlgEnginePreferenceSet.xojo_code @@ -22,7 +22,6 @@ Begin dlgBase dlgEnginePreferenceSet Width = 600 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebLabel labTitle Bold = True diff --git a/webapp/dialogs/dlgGetServerKey.xojo_code b/webapp/dialogs/dlgGetServerKey.xojo_code index 7b1eb5f..1ea8bab 100644 --- a/webapp/dialogs/dlgGetServerKey.xojo_code +++ b/webapp/dialogs/dlgGetServerKey.xojo_code @@ -92,7 +92,7 @@ Begin dlgBase dlgGetServerKey FontSize = 0.0 Height = 60 Index = -2147483648 - Indicator = "" + Indicator = 0 Italic = False Left = 40 LockBottom = False @@ -106,6 +106,7 @@ Begin dlgBase dlgGetServerKey Parent = "rctFormContent" Scope = 2 TabIndex = 0 + TabPanelIndex = 0 TabStop = True Text = "You can get a Freeware or Developer Key for cubeSQL Server from sqlabs:" TextAlignment = 0 @@ -126,7 +127,7 @@ Begin dlgBase dlgGetServerKey FontSize = 0.0 Height = 38 Index = -2147483648 - Indicator = "" + Indicator = 0 Italic = False Left = 40 LockBottom = False @@ -140,6 +141,7 @@ Begin dlgBase dlgGetServerKey Parent = "rctFormContent" Scope = 2 TabIndex = 1 + TabPanelIndex = 0 TabStop = True Target = 1 Text = "#constUrl_DeveloperKey" diff --git a/webapp/dialogs/dlgIndexCreate.xojo_code b/webapp/dialogs/dlgIndexCreate.xojo_code index e496efb..e030de7 100644 --- a/webapp/dialogs/dlgIndexCreate.xojo_code +++ b/webapp/dialogs/dlgIndexCreate.xojo_code @@ -253,7 +253,7 @@ Begin dlgBase dlgIndexCreate RowSelectionType= 0 Scope = 0 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 5 TabPanelIndex = 0 diff --git a/webapp/dialogs/dlgPrivilegeGrant.xojo_code b/webapp/dialogs/dlgPrivilegeGrant.xojo_code index bcf1295..db0c2df 100644 --- a/webapp/dialogs/dlgPrivilegeGrant.xojo_code +++ b/webapp/dialogs/dlgPrivilegeGrant.xojo_code @@ -22,7 +22,6 @@ Begin dlgBase dlgPrivilegeGrant Width = 600 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebLabel labTitle Bold = True diff --git a/webapp/dialogs/dlgScheduleDatabases.xojo_code b/webapp/dialogs/dlgScheduleDatabases.xojo_code index 426b8a7..130500f 100644 --- a/webapp/dialogs/dlgScheduleDatabases.xojo_code +++ b/webapp/dialogs/dlgScheduleDatabases.xojo_code @@ -22,7 +22,6 @@ Begin dlgBase dlgScheduleDatabases Width = 750 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebLabel labTitle Bold = True @@ -138,7 +137,7 @@ Begin dlgBase dlgScheduleDatabases RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 1 TabStop = True @@ -205,6 +204,25 @@ Begin dlgBase dlgScheduleDatabases Width = 100 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebPage @@ -367,7 +385,7 @@ End Session.DB.ExecuteSQL("ATTACH SCHEDULE '" + esSchedule.EscapeSqlQuotes + "' TO DATABASE '" + database.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Attach Database to Schedule", "Could not attach database to schedule.", err) + ShowErrorDialog(dlgMessage, "Attach Database to Schedule", "Could not attach database to schedule.", err) Return End Try @@ -428,7 +446,7 @@ End Session.DB.ExecuteSQL("DETACH SCHEDULE '" + esSchedule.EscapeSqlQuotes + "' FROM DATABASE '" + database.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Detach Database from Schedule", "Could not detach database from schedule.", err) + ShowErrorDialog(dlgMessage, "Detach Database from Schedule", "Could not detach database from schedule.", err) Return End Try diff --git a/webapp/dialogs/dlgTableEditor.xojo_code b/webapp/dialogs/dlgTableEditor.xojo_code index df717d5..4c5bb75 100644 --- a/webapp/dialogs/dlgTableEditor.xojo_code +++ b/webapp/dialogs/dlgTableEditor.xojo_code @@ -68,7 +68,7 @@ Begin dlgBase dlgTableEditor LayoutType = 0 Left = 20 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -172,7 +172,7 @@ Begin dlgBase dlgTableEditor LastRowIndex = 0 Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -185,9 +185,9 @@ Begin dlgBase dlgTableEditor RowSelectionType= 1 Scope = 0 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 - TabIndex = 5 + TabIndex = 2 TabPanelIndex = 0 TabStop = True Tooltip = "" @@ -208,7 +208,7 @@ Begin dlgBase dlgTableEditor Indicator = 0 Left = 660 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True @@ -217,7 +217,7 @@ Begin dlgBase dlgTableEditor PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 11 + TabIndex = 6 TabPanelIndex = 0 TabStop = True Tooltip = "" @@ -238,7 +238,7 @@ Begin dlgBase dlgTableEditor Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -248,7 +248,7 @@ Begin dlgBase dlgTableEditor PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 12 + TabIndex = 3 TabPanelIndex = 0 TabStop = True Text = "Field:" @@ -273,7 +273,7 @@ Begin dlgBase dlgTableEditor Indicator = 0 Left = 552 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True @@ -282,7 +282,7 @@ Begin dlgBase dlgTableEditor PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 13 + TabIndex = 5 TabPanelIndex = 0 TabStop = True Tooltip = "" @@ -303,7 +303,7 @@ Begin dlgBase dlgTableEditor Indicator = 0 Left = 444 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True @@ -312,7 +312,7 @@ Begin dlgBase dlgTableEditor PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 14 + TabIndex = 4 TabPanelIndex = 0 TabStop = True Tooltip = "" @@ -376,6 +376,25 @@ Begin dlgBase dlgTableEditor Width = 100 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebPage @@ -414,7 +433,7 @@ End Var sanityMessage As String = Me.SanityCheckField(dictField) If (sanityMessage <> "") Then - ShowWarningDialog("Add Field", "Can't add field.", sanityMessage) + ShowWarningDialog(dlgMessage, "Add Field", "Can't add field.", sanityMessage) Return False End If @@ -512,7 +531,7 @@ End Var sanityMessage As String = Me.SanityCheckField(modifiedField) If (sanityMessage <> "") Then - ShowWarningDialog("Edit Field", "Can't edit field.", sanityMessage) + ShowWarningDialog(dlgMessage, "Edit Field", "Can't edit field.", sanityMessage) Return False End If diff --git a/webapp/dialogs/dlgTableEditorField.xojo_code b/webapp/dialogs/dlgTableEditorField.xojo_code index 8b48bc2..00b8537 100644 --- a/webapp/dialogs/dlgTableEditorField.xojo_code +++ b/webapp/dialogs/dlgTableEditorField.xojo_code @@ -68,7 +68,7 @@ Begin dlgBase dlgTableEditorField LayoutType = 0 Left = 20 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -167,7 +167,7 @@ Begin dlgBase dlgTableEditorField LastRowIndex = 0 Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -179,7 +179,7 @@ Begin dlgBase dlgTableEditorField Scope = 2 SelectedRowIndex= -1 SelectedRowText = "" - TabIndex = 2 + TabIndex = 3 TabPanelIndex = 0 TabStop = True Tooltip = "" @@ -200,7 +200,7 @@ Begin dlgBase dlgTableEditorField Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -210,7 +210,7 @@ Begin dlgBase dlgTableEditorField PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 4 + TabIndex = 2 TabPanelIndex = 0 TabStop = True Text = "Type:" @@ -235,7 +235,7 @@ Begin dlgBase dlgTableEditorField Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -245,7 +245,7 @@ Begin dlgBase dlgTableEditorField PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 5 + TabIndex = 4 TabPanelIndex = 0 TabStop = True Text = "Default Value:" @@ -271,7 +271,7 @@ Begin dlgBase dlgTableEditorField Indicator = 0 Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -282,7 +282,7 @@ Begin dlgBase dlgTableEditorField Parent = "rctFormContent" ReadOnly = False Scope = 2 - TabIndex = 6 + TabIndex = 5 TabPanelIndex = 0 TabStop = True Text = "" @@ -304,7 +304,7 @@ Begin dlgBase dlgTableEditorField LastRowIndex = 0 Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -337,7 +337,7 @@ Begin dlgBase dlgTableEditorField Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -347,7 +347,7 @@ Begin dlgBase dlgTableEditorField PanelIndex = "0" Parent = "rctFormContent" Scope = 2 - TabIndex = 8 + TabIndex = 6 TabPanelIndex = 0 TabStop = True Text = "Constraint:" diff --git a/webapp/dialogs/dlgUnhandledException.xojo_code b/webapp/dialogs/dlgUnhandledException.xojo_code index fe7a8ce..c2d5cfa 100644 --- a/webapp/dialogs/dlgUnhandledException.xojo_code +++ b/webapp/dialogs/dlgUnhandledException.xojo_code @@ -92,7 +92,7 @@ Begin dlgBase dlgUnhandledException FontSize = 0.0 Height = 38 Index = -2147483648 - Indicator = "" + Indicator = 0 Italic = False Left = 40 LockBottom = False @@ -106,6 +106,7 @@ Begin dlgBase dlgUnhandledException Parent = "rctFormContent" Scope = 0 TabIndex = 0 + TabPanelIndex = 0 TabStop = True Text = "Oops - an unhandled SomeWeirdException occurred." TextAlignment = 0 @@ -125,7 +126,7 @@ Begin dlgBase dlgUnhandledException FontSize = 0.0 Height = 60 Index = -2147483648 - indicator = 0 + Indicator = 0 Italic = True Left = 40 LockBottom = False @@ -136,10 +137,11 @@ Begin dlgBase dlgUnhandledException LockTop = True LockVertical = False Multiline = True - PanelIndex = 0 + PanelIndex = "0" Parent = "rctFormContent" Scope = 0 TabIndex = 1 + TabPanelIndex = 0 TabStop = True Text = "The application will continue. In case of weird behavior try to Logout and Login again." TextAlignment = 0 @@ -159,7 +161,7 @@ Begin dlgBase dlgUnhandledException FontSize = 0.0 Height = 38 Index = -2147483648 - indicator = 0 + Indicator = 0 Italic = False Left = 40 LockBottom = False @@ -170,10 +172,11 @@ Begin dlgBase dlgUnhandledException LockTop = True LockVertical = False Multiline = False - PanelIndex = 0 + PanelIndex = "0" Parent = "rctFormContent" Scope = 0 TabIndex = 2 + TabPanelIndex = 0 TabStop = True Text = "Stack Trace" TextAlignment = 2 @@ -194,7 +197,7 @@ Begin dlgBase dlgUnhandledException Height = 250 Hint = "Stack Trace" Index = -2147483648 - Indicator = "" + Indicator = 0 Left = 40 LockBottom = True LockedInPosition= True @@ -208,6 +211,7 @@ Begin dlgBase dlgUnhandledException ReadOnly = True Scope = 0 TabIndex = 3 + TabPanelIndex = 0 TabStop = True Text = "" TextAlignment = 0 diff --git a/webapp/dialogs/dlgUserCreate.xojo_code b/webapp/dialogs/dlgUserCreate.xojo_code index d059f60..19c560b 100644 --- a/webapp/dialogs/dlgUserCreate.xojo_code +++ b/webapp/dialogs/dlgUserCreate.xojo_code @@ -22,7 +22,6 @@ Begin dlgBase dlgUserCreate Width = 600 _mDesignHeight = 0 _mDesignWidth = 0 - _mName = "" _mPanelIndex = -1 Begin WebLabel labTitle Bold = True @@ -36,7 +35,7 @@ Begin dlgBase dlgUserCreate Italic = False Left = 20 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -69,7 +68,7 @@ Begin dlgBase dlgUserCreate LayoutType = 0 Left = 20 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -98,7 +97,7 @@ Begin dlgBase dlgUserCreate Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -134,7 +133,7 @@ Begin dlgBase dlgUserCreate Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -171,7 +170,7 @@ Begin dlgBase dlgUserCreate InitialParent = "rctFormContent" Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -207,7 +206,7 @@ Begin dlgBase dlgUserCreate InitialParent = "rctFormContent" Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -242,7 +241,7 @@ Begin dlgBase dlgUserCreate Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -279,7 +278,7 @@ Begin dlgBase dlgUserCreate InitialParent = "rctFormContent" Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -313,7 +312,7 @@ Begin dlgBase dlgUserCreate Italic = False Left = 40 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -347,7 +346,7 @@ Begin dlgBase dlgUserCreate LastRowIndex = 0 Left = 188 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -381,7 +380,7 @@ Begin dlgBase dlgUserCreate Indicator = 1 Left = 480 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True @@ -408,7 +407,7 @@ Begin dlgBase dlgUserCreate Indicator = 0 Left = 372 LockBottom = True - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = False LockRight = True diff --git a/webapp/dialogs/dlgUserGroups.xojo_code b/webapp/dialogs/dlgUserGroups.xojo_code index 2a26007..41176ea 100644 --- a/webapp/dialogs/dlgUserGroups.xojo_code +++ b/webapp/dialogs/dlgUserGroups.xojo_code @@ -137,7 +137,7 @@ Begin dlgBase dlgUserGroups RowSelectionType= 1 Scope = 2 SearchCriteria = "" - SelectedRowColor= &c0d6efd + SelectedRowColor= colWebListBoxSelectedRow SelectedRowIndex= 0 TabIndex = 1 TabStop = True @@ -204,6 +204,25 @@ Begin dlgBase dlgUserGroups Width = 100 _mPanelIndex = -1 End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebPage @@ -367,7 +386,7 @@ End Session.DB.ExecuteSQL("ADD USER '" + esUsername.EscapeSqlQuotes + "' TO GROUP '" + group.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Add User to Group", "Could not add user to group.", err) + ShowErrorDialog(dlgMessage, "Add User to Group", "Could not add user to group.", err) Return End Try @@ -428,7 +447,7 @@ End Session.DB.ExecuteSQL("REMOVE USER '" + esUsername.EscapeSqlQuotes + "' FROM GROUP '" + group.EscapeSqlQuotes + "'") Catch err As DatabaseException - ShowErrorDialog("Remove User from Group", "Could not remove user from group.", err) + ShowErrorDialog(dlgMessage, "Remove User from Group", "Could not remove user from group.", err) Return End Try diff --git a/webapp/helpers/modDialogs.xojo_code b/webapp/helpers/modDialogs.xojo_code index a809484..16ba37b 100644 --- a/webapp/helpers/modDialogs.xojo_code +++ b/webapp/helpers/modDialogs.xojo_code @@ -1,45 +1,48 @@ #tag Module Protected Module modDialogs #tag Method, Flags = &h0 - Sub ShowErrorDialog(Title As String, Message As String, Error As DatabaseException) + Sub ShowErrorDialog(dialog As WebMessageDialog, Title As String, Message As String, Error As DatabaseException) Var errorExplanation As String = "Error" + If(Error.ErrorNumber > 0, " " + Error.ErrorNumber.ToString, "") + ": " + Error.Message - ShowErrorDialog(Title, Message, errorExplanation) - + ShowErrorDialog(dialog, Title, Message, errorExplanation) End Sub #tag EndMethod #tag Method, Flags = &h0 - Sub ShowErrorDialog(Title As String, Message As String, Explanation As String) - ShowWebMessageDialog(Title, Message, Explanation, WebMessageDialog.Indicators.Danger) + Sub ShowErrorDialog(dialog As WebMessageDialog, Title As String, Message As String, Explanation As String) + ShowWebMessageDialog(dialog, Title, Message, Explanation, WebMessageDialog.Indicators.Danger) End Sub #tag EndMethod #tag Method, Flags = &h0 - Sub ShowInfoDialog(Title As String, Message As String, Explanation As String) - ShowWebMessageDialog(Title, Message, Explanation, WebMessageDialog.Indicators.Info) + Sub ShowInfoDialog(dialog As WebMessageDialog, Title As String, Message As String, Explanation As String) + ShowWebMessageDialog(dialog, Title, Message, Explanation, WebMessageDialog.Indicators.Info) End Sub #tag EndMethod #tag Method, Flags = &h0 - Sub ShowSuccessDialog(Title As String, Message As String, Explanation As String) - ShowWebMessageDialog(Title, Message, Explanation, WebMessageDialog.Indicators.Success) + Sub ShowSuccessDialog(dialog As WebMessageDialog, Title As String, Message As String, Explanation As String) + ShowWebMessageDialog(dialog, Title, Message, Explanation, WebMessageDialog.Indicators.Success) End Sub #tag EndMethod #tag Method, Flags = &h0 - Sub ShowWarningDialog(Title As String, Message As String, Explanation As String) - ShowWebMessageDialog(Title, Message, Explanation, WebMessageDialog.Indicators.Warning) + Sub ShowWarningDialog(dialog As WebMessageDialog, Title As String, Message As String, Explanation As String) + ShowWebMessageDialog(dialog, Title, Message, Explanation, WebMessageDialog.Indicators.Warning) End Sub #tag EndMethod #tag Method, Flags = &h21 - Private Sub ShowWebMessageDialog(Title As String, Message As String, Explanation As String, Indicator As WebUIControl.Indicators) - Var dialog As New WebMessageDialog + Private Sub ShowWebMessageDialog(dialog As WebMessageDialog, Title As String, Message As String, Explanation As String, Indicator As WebUIControl.Indicators) + // Note: Instantiating a new WebMessageDialog in a Module results + // in a Memory Leak... + // Var dialog As New WebMessageDialog + + // Workaround: Place a WebMessageDialog on the Layout dialog.Title = Title dialog.Indicator = Indicator dialog.ActionButton.Caption = "OK" diff --git a/webapp/main/CubeSQLAdminPage.xojo_code b/webapp/main/CubeSQLAdminPage.xojo_code index 7bd8df0..16a6d80 100644 --- a/webapp/main/CubeSQLAdminPage.xojo_code +++ b/webapp/main/CubeSQLAdminPage.xojo_code @@ -120,7 +120,7 @@ Begin WebPage CubeSQLAdminPage Enabled = False Index = -2147483648 Location = 0 - LockedInPosition= False + LockedInPosition= True Period = 1 RunMode = 0 Scope = 2 @@ -261,7 +261,7 @@ End #tag Event Sub Opening() Me.Indicator = WebUIControl.Indicators.Dark - Me.Style.BackgroundColor = Color.RGB(0,51,102) + Me.Style.BackgroundColor = Color.RGB(0,50,100) Me.Style.ForegroundColor = Color.White Me.Title = "cubeSQL Admin" diff --git a/webapp/main/LoginPage.xojo_code b/webapp/main/LoginPage.xojo_code index a617b98..8e94ad3 100644 --- a/webapp/main/LoginPage.xojo_code +++ b/webapp/main/LoginPage.xojo_code @@ -19,7 +19,7 @@ Begin WebPage LoginPage LockRight = False LockTop = True LockVertical = False - MinimumHeight = 400 + MinimumHeight = 518 MinimumWidth = 600 TabIndex = 0 Title = "cubeSQL Admin - Login" @@ -43,7 +43,7 @@ Begin WebPage LoginPage LayoutType = 0 Left = 20 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = True LockLeft = False LockRight = False @@ -521,7 +521,7 @@ Begin WebPage LoginPage Indicator = 0 Left = 372 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = True @@ -555,7 +555,7 @@ Begin WebPage LoginPage Italic = False Left = 214 LockBottom = False - LockedInPosition= False + LockedInPosition= True LockHorizontal = False LockLeft = True LockRight = False @@ -579,6 +579,25 @@ Begin WebPage LoginPage _mPanelIndex = -1 End End + Begin WebMessageDialog dlgMessage + ControlID = "" + Enabled = True + Explanation = "" + Index = -2147483648 + Indicator = "" + LockBottom = False + LockedInPosition= True + LockHorizontal = False + LockLeft = True + LockRight = False + LockTop = True + LockVertical = False + Message = "" + Scope = 2 + Title = "" + Tooltip = "" + _mPanelIndex = -1 + End End #tag EndWebPage @@ -656,13 +675,13 @@ End End If Catch err As DatabaseException - ShowErrorDialog("Connect", "Could not connect to cubeSQL.", err) + ShowErrorDialog(dlgMessage, "Connect", "Could not connect to cubeSQL.", err) Return End Try If (Not Self.CheckAdmin(db)) Then - ShowWarningDialog("cubeSQL Admin Login", "Insufficient privileges.", "This application requires Admin privileges in order to function properly.") + ShowWarningDialog(dlgMessage, "cubeSQL Admin Login", "Insufficient privileges.", "This application requires Admin privileges in order to function properly.") Return End If @@ -903,6 +922,16 @@ End dictInfo.Value("cntCommands") = 0 dictInfo.Value("cntClients") = 0 dictInfo.Value("dlgDisconnect") = 0 + dictInfo.Value("cntTablesIndexes") = 0 + dictInfo.Value("dlgIndexCreate") = 0 + dictInfo.Value("dlgDatabaseSchedules") = 0 + dictInfo.Value("dlgTableEditor") = 0 + dictInfo.Value("dlgTableEditorField") = 0 + dictInfo.Value("dlgSchedule") = 0 + dictInfo.Value("dlgScheduleDatabases") = 0 + dictInfo.Value("cntSchedules") = 0 + dictInfo.Value("CheckboxCellRenderer") = 0 + dictInfo.Value("CopyContentCellRenderer") = 0 Var checkName As String