mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-20 22:18:43 +00:00
CE-1772: updates to alert widgets
This commit is contained in:
@ -40,9 +40,9 @@ import com.kingsrook.qqq.backend.core.model.metadata.dashboard.QWidgetMetaData;
|
||||
** - alertType - name of entry in AlertType enum (ERROR, WARNING, SUCCESS)
|
||||
** - alertHtml - html to display inside the alert (other than its icon)
|
||||
*******************************************************************************/
|
||||
public class ProcessAlertWidget extends AbstractWidgetRenderer implements MetaDataProducerInterface<QWidgetMetaData>
|
||||
public class AlertWidgetRenderer extends AbstractWidgetRenderer implements MetaDataProducerInterface<QWidgetMetaData>
|
||||
{
|
||||
public static final String NAME = "ProcessAlertWidget";
|
||||
public static final String NAME = "AlertWidgetRenderer";
|
||||
|
||||
|
||||
|
@ -22,6 +22,9 @@
|
||||
package com.kingsrook.qqq.backend.core.model.dashboard.widgets;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Model containing datastructure expected by frontend alert widget
|
||||
**
|
||||
@ -40,8 +43,10 @@ public class AlertData extends QWidgetData
|
||||
|
||||
|
||||
|
||||
private String html;
|
||||
private AlertType alertType;
|
||||
private String html;
|
||||
private AlertType alertType;
|
||||
private Boolean hideWidget = false;
|
||||
private List<String> bulletList;
|
||||
|
||||
|
||||
|
||||
@ -139,4 +144,66 @@ public class AlertData extends QWidgetData
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for hideWidget
|
||||
*******************************************************************************/
|
||||
public boolean getHideWidget()
|
||||
{
|
||||
return (this.hideWidget);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for hideWidget
|
||||
*******************************************************************************/
|
||||
public void setHideWidget(boolean hideWidget)
|
||||
{
|
||||
this.hideWidget = hideWidget;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for hideWidget
|
||||
*******************************************************************************/
|
||||
public AlertData withHideWidget(boolean hideWidget)
|
||||
{
|
||||
this.hideWidget = hideWidget;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for bulletList
|
||||
*******************************************************************************/
|
||||
public List<String> getBulletList()
|
||||
{
|
||||
return (this.bulletList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for bulletList
|
||||
*******************************************************************************/
|
||||
public void setBulletList(List<String> bulletList)
|
||||
{
|
||||
this.bulletList = bulletList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for bulletList
|
||||
*******************************************************************************/
|
||||
public AlertData withBulletList(List<String> bulletList)
|
||||
{
|
||||
this.bulletList = bulletList;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public class ChildRecordListData extends QWidgetData
|
||||
private QueryOutput queryOutput;
|
||||
private QTableMetaData childTableMetaData;
|
||||
|
||||
private String tableName;
|
||||
private String tablePath;
|
||||
private String viewAllLink;
|
||||
private Integer totalRows;
|
||||
@ -352,4 +353,46 @@ public class ChildRecordListData extends QWidgetData
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for tableName
|
||||
*******************************************************************************/
|
||||
public String getTableName()
|
||||
{
|
||||
return (this.tableName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for tableName
|
||||
*******************************************************************************/
|
||||
public void setTableName(String tableName)
|
||||
{
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for tableName
|
||||
*******************************************************************************/
|
||||
public ChildRecordListData withTableName(String tableName)
|
||||
{
|
||||
this.tableName = tableName;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for tablePath
|
||||
*******************************************************************************/
|
||||
public ChildRecordListData withTablePath(String tablePath)
|
||||
{
|
||||
this.tablePath = tablePath;
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import java.util.Map;
|
||||
** Base class for the data returned by rendering a Widget.
|
||||
**
|
||||
*******************************************************************************/
|
||||
public abstract class QWidgetData
|
||||
public abstract class QWidgetData implements Serializable
|
||||
{
|
||||
private String label;
|
||||
private String sublabel;
|
||||
|
@ -94,6 +94,29 @@ public class CountingHash<K extends Serializable> extends AbstractMap<K, Integer
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** increment the value for the specified key
|
||||
**
|
||||
*******************************************************************************/
|
||||
public Integer put(K key)
|
||||
{
|
||||
return (add(key));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Set the value for the specified key by the supplied value
|
||||
**
|
||||
*******************************************************************************/
|
||||
public Integer put(K key, Integer value)
|
||||
{
|
||||
this.map.put(key, value);
|
||||
return (value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
|
Reference in New Issue
Block a user