SPRINT-12: added rawHTML widget type

This commit is contained in:
Tim Chamberlain
2022-09-26 10:18:25 -05:00
parent ac82928dd7
commit 3402a20b04
2 changed files with 134 additions and 1 deletions

View File

@ -0,0 +1,133 @@
/*
* QQQ - Low-code Application Framework for Engineers.
* Copyright (C) 2021-2022. Kingsrook, LLC
* 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
* contact@kingsrook.com
* https://github.com/Kingsrook/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.kingsrook.qqq.backend.core.model.dashboard.widgets;
/*******************************************************************************
** Model containing datastructure expected by frontend bar raw html widget
**
*******************************************************************************/
public class RawHTML implements QWidget
{
private String title;
private String html;
/*******************************************************************************
**
*******************************************************************************/
public RawHTML()
{
}
/*******************************************************************************
**
*******************************************************************************/
public RawHTML(String title, String html)
{
setTitle(title);
setHtml(html);
}
/*******************************************************************************
** Getter for title
**
*******************************************************************************/
public String getTitle()
{
return title;
}
/*******************************************************************************
** Setter for title
**
*******************************************************************************/
public void setTitle(String title)
{
this.title = title;
}
/*******************************************************************************
** Fluent setter for title
**
*******************************************************************************/
public RawHTML withTitle(String title)
{
this.title = title;
return (this);
}
/*******************************************************************************
** Getter for type
**
*******************************************************************************/
public String getType()
{
return "html";
}
/*******************************************************************************
** Getter for html
**
*******************************************************************************/
public String getHtml()
{
return html;
}
/*******************************************************************************
** Setter for html
**
*******************************************************************************/
public void setHtml(String html)
{
this.html = html;
}
/*******************************************************************************
** Fluent setter for html
**
*******************************************************************************/
public RawHTML withHtml(String html)
{
this.html = html;
return (this);
}
}

View File

@ -311,7 +311,7 @@ public class QueryManager
ResultSetMetaData metaData = resultSet.getMetaData();
for(int i = 1; i <= metaData.getColumnCount(); i++)
{
row.put(metaData.getColumnName(i), getObject(resultSet, i));
row.put(metaData.getColumnLabel(i), getObject(resultSet, i));
}
}