-
-
- Create Alert
-
-
-
-
-
-
- | Title |
- Table |
- Threshold |
- Interval |
- Is Active |
- |
-
-
-
- {data && data.map((item, key) => {
- return (
-
- | {item.title} |
- {item.from_table} |
- {item.threshold} |
- {item.interval_time} |
-
-
- {
- (item.isActive === '1') ?
- :
-
- }
-
- |
-
-
-
-
-
- {(item.isActive === '1') ?
- :
- }
-
-
- |
-
- )
- })}
- {data.length < 1 &&
- |
-
- No Alert found
-
- |
-
}
-
-
-
+
+
+
{
+ this.setState({ isShowAlertDetailForm: true });
+ }}
+ />
+ {
+ this.setState({ toastContent: {} });
+ }}
+ />
+ {alertList && alertList.length > 0 ? (
+
+ ) : (
+ No alert found
+ )}
+ {
+ this.setState({
+ deleteAlertIndex: null,
+ });
+ }}
+ saveButtonAction={() => this.onConfirmDeleteAlert()}
+ />
+ = 0}
+ alertList={alertList}
+ editAlertIndex={editAlertIndex}
+ tableList={tableList}
+ onSubmitAlertData={(toastContent) => {
+ this.getData();
+ this.setState({
+ isShowAlertDetailForm: false,
+ editAlertIndex: null,
+ toastContent,
+ });
+ }}
+ onHidden={() => {
+ this.setState({
+ isShowAlertDetailForm: false,
+ editAlertIndex: null,
+ });
+ }}
+ />
- >
- )
+
+ );
}
}
-ReactDOM.render(
, document.querySelector('#root'));
-
+ReactDOM.render(
, document.querySelector("#root"));
diff --git a/assets/js/utils.js b/assets/js/utils.js
index 0ccfc49d..d01146c5 100644
--- a/assets/js/utils.js
+++ b/assets/js/utils.js
@@ -3,7 +3,8 @@ import moment from "moment";
export const PAGE_NAME = {
dashboard: 'Dashboard',
table: 'Table',
- user: 'Users'
+ user: 'Users',
+ alert: 'Alert'
};
export const TOAST_STATUS = {
diff --git a/assets/styles/_logexplorer.scss b/assets/styles/_logexplorer.scss
index 86c3cd46..349e0f7b 100644
--- a/assets/styles/_logexplorer.scss
+++ b/assets/styles/_logexplorer.scss
@@ -3,6 +3,12 @@
background: transparent linear-gradient(241deg, var(--bs-primary) 0%, #FFFFFF 100%) 0% 0% no-repeat padding-box;
}
+.content-wrapper {
+ background-color: #F8F9FA;
+ max-height: 100vh;
+ overflow: auto;
+}
+
.wrapper {
width: calc(100% - 254px);
min-height: 100vh;
diff --git a/templates/alert/form.html.twig b/templates/alert/form.html.twig
deleted file mode 100644
index 61838895..00000000
--- a/templates/alert/form.html.twig
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends 'base.html.twig' %}
-
-{% block title %}{% if alert is defined %}Update{% else %}Create{% endif %} alert{% endblock %}
-
-{% block stylesheets %}
- {{ encore_entry_link_tags('alerts_form') }}
-{% endblock %}
-
-{% block body %}
-
-{% endblock %}
-
-{% block javascripts %}
- {{ encore_entry_script_tags('alerts_form') }}
-{% endblock %}
-
diff --git a/webpack.config.js b/webpack.config.js
index a5866ebb..0deeab99 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -68,7 +68,6 @@ Encore
.addEntry('widget_form', './assets/js/pages/widget/form.js')
.addEntry('dashboard-page', './assets/js/pages/index/dashboard.js')
.addEntry('alerts_list', './assets/js/pages/alerts/list.js')
- .addEntry('alerts_form', './assets/js/pages/alerts/form.js')
.addEntry('export_list', './assets/js/pages/export/list.js')
// .addEntry('page1', './assets/page1.js')
// .addEntry('page2', './assets/page2.js')