Skip to content

Commit 4235889

Browse files
wshengqibadboy-huaqiao
authored andcommitted
refector rule engine for support kuiper
Signed-off-by: wshengqi <wshengqi@vmware.com>
1 parent b777da6 commit 4235889

File tree

10 files changed

+1353
-432
lines changed

10 files changed

+1353
-432
lines changed

cmd/edgex-ui-server/static/css/ruleengine.css

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* or implied. See the License for the specific language governing permissions and limitations under
1212
* the License.
1313
*
14-
* @author: Huaqiao Zhang, <huaqiaoz@vmware.com>
14+
* @author: Shengqi Wang, <wshengqi@vmware.com>
1515
* @version: 0.1.0
1616
*******************************************************************************/
1717
@charset "UTF-8";
@@ -29,13 +29,6 @@ div.info_header span {
2929
color: #339933;
3030
}
3131

32-
div#device_list {
33-
/* position: relative; */
34-
/* min-height: 50%; */
35-
/* margin-left: 60px; */
36-
37-
}
38-
3932
div.select_panle, div#action_device_list select, div#device_command_list select
4033
{
4134
width: 220px;
@@ -67,4 +60,58 @@ div#condition_device_list table tfoot nav {
6760
.condition_device_list td, .action_device_list td {
6861
padding: 5px;
6962
text-align: left;
63+
}
64+
65+
#ruleengine_addrules_paramsBox .page-header{
66+
margin: 15px 0 20px;
67+
}
68+
69+
#ruleengine_addrules_paramsBox legend{
70+
padding: 0;
71+
}
72+
73+
#ruleengine_addrules_paramsBox hr{
74+
border-top: 2px dashed #987cb9;
75+
}
76+
77+
#ruleengine_model,#ruleengine_addrules_model .modal-dialog{
78+
position:fixed;
79+
top:10%;
80+
right:0;
81+
left:0;
82+
bottom:10%;
83+
margin:auto;
84+
}
85+
86+
#ruleengine_model,#ruleengine_addrules_model .modal-content {
87+
position: absolute;
88+
top: 0;
89+
bottom: 0;
90+
width: 100%;
91+
}
92+
93+
#ruleengine_model,#ruleengine_addrules_model .modal-body {
94+
max-height:79%;
95+
overflow-y:auto;
96+
position: absolute;
97+
top: 55px;
98+
bottom: 65px;
99+
width: 100%;
100+
}
101+
102+
#ruleengine_model,#ruleengine_addrules_model .modal-header .close {margin-right: 15px;}
103+
#ruleengine_model,#ruleengine_addrules_model .modal-footer {
104+
position: absolute;
105+
width: 100%;
106+
bottom: 0;
107+
}
108+
109+
#ruleengine_model,#ruleengine_addrules_model #json-renderer {
110+
padding-left: 5%;
111+
}
112+
113+
.modal-backdrop {
114+
z-index: -1 !important;
115+
opacity: 0 !important;
116+
filter: alpha(opacity=0) !important;
70117
}

cmd/edgex-ui-server/static/data/menu.json

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,17 @@
44
"url": "/pages/devices/deviceService.html",
55
"icon":"fa fa-gears"
66
},{
7-
"title":"Scheduler",
8-
"url": "/pages/scheduler.html",
9-
"icon":"fa fa-clock-o fa-lg",
10-
"children":[]
11-
},{
12-
"title":"Notification",
13-
"url": "/pages/notification.html",
14-
"icon":"fa fa-envelope",
15-
"children":[]
16-
},{
17-
"title":"Multimedia",
18-
"url": "/pages/multimedia.html",
19-
"icon":"fa fa-camera",
7+
"title":"Scheduler",
8+
"url": "/pages/scheduler.html",
9+
"icon":"fa fa-clock-o fa-lg",
2010
"children":[]
2111
},{
22-
"title":"Export",
23-
"url": "/pages/export.html",
24-
"icon":"fa fa-cloud-upload",
12+
"title":"Notification",
13+
"url": "/pages/notification.html",
14+
"icon":"fa fa-envelope",
2515
"children":[]
26-
},{
16+
},
17+
{
2718
"title":"RuleEngine",
2819
"url": "/pages/ruleengine.html",
2920
"icon":"fa fa-wrench",
@@ -33,5 +24,5 @@
3324
"url": "/pages/appService.html",
3425
"icon":"fa fa-asterisk",
3526
"children":[]
36-
}
27+
}
3728
]

cmd/edgex-ui-server/static/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<link rel="stylesheet" href="/vendors/flatpickr/theme/confetti.css">
2929
<link rel="stylesheet" href="/vendors/bootstrap-table/bootstrap-table.min.css">
3030
<link rel="stylesheet" href="/vendors/bootstrap-select/css/bootstrap-select.min.css">
31+
<link rel="stylesheet" href="/vendors/json-viewer/css/jquery.json-viewer.css">
3132
<link href="/css/main.css" rel="stylesheet">
3233
<link href="/css/index.css" rel="stylesheet">
3334
<link href="/css/edgexfoundry.css" rel="stylesheet">
@@ -105,6 +106,7 @@ <h4></h4>
105106
<script src="/vendors/bootstrap-table/bootstrap-table.min.js"></script>
106107
<script src="/vendors/bootstrap-table/bootstrap-table-locale-all.min.js"></script>
107108
<script src="/vendors/bootstrap-select/js/bootstrap-select.min.js"></script>
109+
<script src="/vendors/json-viewer/js/jquery.json-viewer.js"></script>
108110
<script src="/js/edgexfoundry.js"></script>
109111
<script src="/js/common.js"></script>
110112
<script src="/js/main.js"></script>

cmd/edgex-ui-server/static/js/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ $(document).ready(function () {
194194
break;
195195
case 'RuleEngine':
196196
$.ajax({
197-
url: '/rule-engine/api/v1/ping',
197+
url: '/rule-engine',
198198
type: 'GET',
199199
success: function (data) {
200-
if (data == "pong") {
200+
if (data.trim() == "OK") {
201201
renderByCheckResult(thisTab, "healthy");
202202
} else {
203203
renderByCheckResult(thisTab, "unhealthy");

cmd/edgex-ui-server/static/js/pages/devices/deviceService.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,17 @@ orgEdgexFoundry.deviceService = (function(){
130130
}
131131
]
132132
},
133+
{
134+
'Protocol': 'HTTP',
135+
'Alias': 'HTTP',
136+
'Properties': [
137+
{
138+
'Key': 'Address',
139+
'Value': '192.168.1.1',
140+
'Hint': '(required)'
141+
}
142+
]
143+
},
133144
{
134145
'Protocol': 'other',
135146
'Alias': 'others',

0 commit comments

Comments
 (0)