页面还差 Timed Task

This commit is contained in:
zogodo
2020-02-22 14:12:24 +08:00
parent d53cebadc9
commit 47ce240fdc
5 changed files with 493 additions and 354 deletions

View File

@@ -707,3 +707,24 @@ _:-ms-input-placeholder, :root .demo-graph {
.station-radio {
margin-left: 20px;
}
table {
width: 100%;
}
.mdl-data-table th {
font-weight: bold;
}
.mdl-data-table td, .mdl-data-table th {
text-align: center;
}
.sys-log {
height: 400px;
overflow: scroll;
}
.demo-card-event > .mdl-card__actions {
display: flex;
box-sizing:border-box;
align-items: center;
}
.mdl-button {
padding: 2px 6px 0 6px;
}

View File

@@ -226,84 +226,56 @@
<div class="page page3 mdl-cell demo-card-event mdl-card mdl-shadow--2dp">
<table class="mdl-data-table mdl-js-data-table">
<thead>
<tr>
<th class="mdl-data-table__cell--non-numeric">Name</th>
<th class="mdl-data-table__cell--non-numeric">Nickname</th>
<th>Age</th>
<th class="mdl-data-table__cell--non-numeric">Living?</th>
</tr>
</thead>
<tbody>
<tr>
<td class="mdl-data-table__cell--non-numeric">John Lennon</td>
<td class="mdl-data-table__cell--non-numeric">The smart one</td>
<td>40</td>
<td class="mdl-data-table__cell--non-numeric">No</td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">Paul McCartney</td>
<td class="mdl-data-table__cell--non-numeric">The cute one</td>
<td>73</td>
<td class="mdl-data-table__cell--non-numeric">Yes</td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">George Harrison</td>
<td class="mdl-data-table__cell--non-numeric">The shy one</td>
<td>58</td>
<td class="mdl-data-table__cell--non-numeric">No</td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">Ringo Starr</td>
<td class="mdl-data-table__cell--non-numeric">The funny one</td>
<td>74</td>
<td class="mdl-data-table__cell--non-numeric">Yes</td>
</tr>
</tbody>
<tr>
<th>Index</th>
<th>Time</th>
<th>Socket</th>
<th>On</th>
<th>Option</th>
</tr>
<tr>
<td>1</td>
<td>2020-02-15<br>07:11:08</td>
<td>1</td>
<td>0</td>
<td><a>Delete</a></td>
</tr>
<tr>
<td colspan="5">No Timed Task</td>
</tr>
</table>
</div>
<div class="page page4 mdl-cell demo-card-event mdl-card mdl-shadow--2dp">
<table class="mdl-data-table mdl-js-data-table">
<thead>
<tr>
<th class="mdl-data-table__cell--non-numeric">Name</th>
<th class="mdl-data-table__cell--non-numeric">Nickname</th>
<th>Age</th>
<th class="mdl-data-table__cell--non-numeric">Living?</th>
</tr>
</thead>
<tbody>
<tr>
<td class="mdl-data-table__cell--non-numeric">John Lennon</td>
<td class="mdl-data-table__cell--non-numeric">The smart one</td>
<td>40</td>
<td class="mdl-data-table__cell--non-numeric">No</td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">Paul McCartney</td>
<td class="mdl-data-table__cell--non-numeric">The cute one</td>
<td>73</td>
<td class="mdl-data-table__cell--non-numeric">Yes</td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">George Harrison</td>
<td class="mdl-data-table__cell--non-numeric">The shy one</td>
<td>58</td>
<td class="mdl-data-table__cell--non-numeric">No</td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric">Ringo Starr</td>
<td class="mdl-data-table__cell--non-numeric">The funny one</td>
<td>74</td>
<td class="mdl-data-table__cell--non-numeric">Yes</td>
</tr>
</tbody>
<tr>
<th>Version</th>
<th>v1.0.33</th>
</tr>
<tr>
<td>IP</td>
<td>192.168.33.222</td>
</tr>
<tr>
<td>Mask</td>
<td>255.255.255.0</td>
</tr>
<tr>
<td>Gateway</td>
<td>192.168.33.1</td>
</tr>
<tr>
<td>Uptime</td>
<td>10:13:43</td>
</tr>
</table>
<div class="mdl-card__actions mdl-card--border">
<div class="mdl-layout-spacer"></div>
<i class="material-icons">event</i>
<i>2020-02-22</i>
<!-- <span>2020-02-22</span> -->
<a class="mdl-button">
2020-02-22
</a>
</div>
</div>
@@ -336,29 +308,49 @@
<div class="mdl-card__title mdl-card--expand">
<h2 class="mdl-card__title-text">System Log</h2>
</div>
<div class="mdl-card__supporting-text">
[1970-01-01 08:00:00][TC1 main.c:47] start version[v1.0.32]
[1970-01-01 08:00:01][TC1 main.c:64] str_mac[D0BAE464077B]
[1970-01-01 08:00:01][TC1 main.c:95] user:
[1970-01-01 08:00:01][TC1 main.c:96] device name:zTC1-077B
[1970-01-01 08:00:01][TC1 main.c:97] mqtt_ip:192.168.33.219
[1970-01-01 08:00:01][TC1 main.c:98] mqtt_port:1883
[1970-01-01 08:00:01][TC1 main.c:99] mqtt_user:
[1970-01-01 08:00:01][TC1 main.c:100] mqtt_password:
[1970-01-01 08:00:01][TC1 main.c:101] version:6
[1970-01-01 08:00:01][WIFI user_wifi.c:135] WifiConnect wifi_ssid[TL-5408] wifi_key[stu@5408]
[1970-01-01 08:00:02][MQTT user_mqtt_client.c:104] MQTT client version: [0.1.8]
[1970-01-01 08:00:02][POWER user_power.c:75] PowerInit
[1970-01-01 08:00:02][HTTP app_httpd.c:423] initializing web-services
[1970-01-01 08:00:02][MQTT user_mqtt_client.c:191] MQTT client thread started...
[1970-01-01 08:00:03][WIFI user_wifi.c:20] got IP:192.168.33.222
[2020-02-22 02:01:39][RTC user_rtc.c:95] sntp success!
[2020-02-22 02:03:03][HTTP app_httpd.c:124] HttpGetAssets url[/assets/css_pack.css] file_name[/assets/css_pack.css]
[2020-02-22 02:03:03][HTTP app_httpd.c:124] HttpGetAssets url[/assets/js_pack.js] file_name[/assets/js_pack.js]
<div class="sys-log mdl-card__supporting-text">
<pre>
[1970-01-01 08:00:00][TC1 main.c:47] start version[v1.0.32]
[1970-01-01 08:00:01][TC1 main.c:64] str_mac[D0BAE464077B]
[1970-01-01 08:00:01][TC1 main.c:95] user:
[1970-01-01 08:00:01][TC1 main.c:96] device name:zTC1-077B
[1970-01-01 08:00:01][TC1 main.c:97] mqtt_ip:192.168.33.219
[1970-01-01 08:00:01][TC1 main.c:98] mqtt_port:1883
[1970-01-01 08:00:01][TC1 main.c:99] mqtt_user:
[1970-01-01 08:00:01][TC1 main.c:100] mqtt_password:
[1970-01-01 08:00:01][TC1 main.c:101] version:6
[1970-01-01 08:00:01][WIFI user_wifi.c:135] WifiConnect wifi_ssid[TL-5408] wifi_key[stu@5408]
[1970-01-01 08:00:02][MQTT user_mqtt_client.c:104] MQTT client version: [0.1.8]
[1970-01-01 08:00:02][POWER user_power.c:75] PowerInit
[1970-01-01 08:00:02][HTTP app_httpd.c:423] initializing web-services
[1970-01-01 08:00:02][MQTT user_mqtt_client.c:191] MQTT client thread started...
[1970-01-01 08:00:03][WIFI user_wifi.c:20] got IP:192.168.33.222
[2020-02-22 02:01:39][RTC user_rtc.c:95] sntp success!
[2020-02-22 02:03:03][HTTP app_httpd.c:124] HttpGetAssets url[/assets/css_pack.css] file_name[/assets/css_pack.css]
[2020-02-22 02:03:03][HTTP app_httpd.c:124] HttpGetAssets url[/assets/js_pack.js] file_name[/assets/js_pack.js]
[1970-01-01 08:00:00][TC1 main.c:47] start version[v1.0.32]
[1970-01-01 08:00:01][TC1 main.c:64] str_mac[D0BAE464077B]
[1970-01-01 08:00:01][TC1 main.c:95] user:
[1970-01-01 08:00:01][TC1 main.c:96] device name:zTC1-077B
[1970-01-01 08:00:01][TC1 main.c:97] mqtt_ip:192.168.33.219
[1970-01-01 08:00:01][TC1 main.c:98] mqtt_port:1883
[1970-01-01 08:00:01][TC1 main.c:99] mqtt_user:
[1970-01-01 08:00:01][TC1 main.c:100] mqtt_password:
[1970-01-01 08:00:01][TC1 main.c:101] version:6
[1970-01-01 08:00:01][WIFI user_wifi.c:135] WifiConnect wifi_ssid[TL-5408] wifi_key[stu@5408]
[1970-01-01 08:00:02][MQTT user_mqtt_client.c:104] MQTT client version: [0.1.8]
[1970-01-01 08:00:02][POWER user_power.c:75] PowerInit
[1970-01-01 08:00:02][HTTP app_httpd.c:423] initializing web-services
[1970-01-01 08:00:02][MQTT user_mqtt_client.c:191] MQTT client thread started...
[1970-01-01 08:00:03][WIFI user_wifi.c:20] got IP:192.168.33.222
[2020-02-22 02:01:39][RTC user_rtc.c:95] sntp success!
[2020-02-22 02:03:03][HTTP app_httpd.c:124] HttpGetAssets url[/assets/css_pack.css] file_name[/assets/css_pack.css]
[2020-02-22 02:03:03][HTTP app_httpd.c:124] HttpGetAssets url[/assets/js_pack.js] file_name[/assets/js_pack.js]
</pre>
</div>
<div class="mdl-card__actions mdl-card--border">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
View Updates
Refresh
</a>
</div>
</div>
@@ -401,7 +393,7 @@
$(".mdl-navigation__link").removeClass("mdl-nav-active");
$(".mdl-navigation__link:eq("+(id-1)+")").addClass("mdl-nav-active");
}
ShowPage(4);
ShowPage(6);
function AjaxErr(re) {
//alert(re.status);

View File

@@ -0,0 +1,56 @@
<html class="mdl-js"><head>
<title>Pure Test</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
<script defer="" src="https://code.getmdl.io/1.3.0/material.min.js"></script>
</head>
<body>
<!-- Event card -->
<style>
.demo-card-event.mdl-card {
width: 256px;
height: 256px;
background: #3E4EB8;
}
.demo-card-event > .mdl-card__actions {
/*border-color: rgba(255, 255, 255, 0.2);*/
}
.demo-card-event > .mdl-card__title {
/*align-items: flex-start;*/
}
.demo-card-event > .mdl-card__title > h4 {
/*margin-top: 0;*/
}
.demo-card-event > .mdl-card__actions {
display: flex;
/*box-sizing:border-box;*/
align-items: center;
}
.demo-card-event > .mdl-card__actions > .material-icons {
padding-right: 10px;
}
.demo-card-event > .mdl-card__title,
.demo-card-event > .mdl-card__actions,
.demo-card-event > .mdl-card__actions > .mdl-button {
color: #fff;
}
</style>
<div class="demo-card-event mdl-card mdl-shadow--2dp">
<div class="mdl-card__title mdl-card--expand">
<h4>
Featured event:<br>
May 24, 2016<br>
7-11pm
</h4>
</div>
<div class="mdl-card__actions mdl-card--border">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" data-upgraded=",MaterialButton,MaterialRipple">
Add to Calendar
<span class="mdl-button__ripple-container"><span class="mdl-ripple"></span></span></a>
<div class="mdl-layout-spacer"></div>
<i class="material-icons">event</i>
</div>
</div>
</body></html>

View File

@@ -224,3 +224,24 @@ _:-ms-input-placeholder, :root .demo-graph {
.station-radio {
margin-left: 20px;
}
table {
width: 100%;
}
.mdl-data-table th {
font-weight: bold;
}
.mdl-data-table td, .mdl-data-table th {
text-align: center;
}
.sys-log {
height: 400px;
overflow: scroll;
}
.demo-card-event > .mdl-card__actions {
display: flex;
box-sizing:border-box;
align-items: center;
}
element.style {
padding: 2px 6px 0 6px;
}