efront 3.5.12 → 3.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/pivot/api.yml +1 -0
- package/apps/pivot/link/list.html +12 -0
- package/apps/pivot/link/list.js +25 -0
- package/apps/pivot/link/list.less +9 -0
- package/apps/pivot/main.less +1 -0
- package/apps/pivot/menu.yml +1 -1
- package/coms/basic/JSAM.js +8 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/apps/pivot/api.yml
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="clusters">
|
|
2
|
+
<a -repeat="(c,i) in clusters" @click="active(i)">
|
|
3
|
+
<span -text="c"></span>
|
|
4
|
+
</a>
|
|
5
|
+
</div>
|
|
6
|
+
<lattice -src="c in clients">
|
|
7
|
+
<padding>
|
|
8
|
+
<span -text=c.id></span>
|
|
9
|
+
<span class="time" -text=filterTime(c.optime)></span>
|
|
10
|
+
|
|
11
|
+
</padding>
|
|
12
|
+
</lattice>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function main() {
|
|
2
|
+
var page = div();
|
|
3
|
+
page.innerHTML = template;
|
|
4
|
+
renderWithDefaults(page, {
|
|
5
|
+
async load() {
|
|
6
|
+
var cs = this.clusters = data.from("cluster", { opt: "list" });
|
|
7
|
+
await cs.loading_promise;
|
|
8
|
+
this.active();
|
|
9
|
+
},
|
|
10
|
+
index: 0,
|
|
11
|
+
clusters: [],
|
|
12
|
+
filterTime(d) {
|
|
13
|
+
return ((new Date - d) / 1000 | 0) + "秒";
|
|
14
|
+
},
|
|
15
|
+
clients: [],
|
|
16
|
+
async active() {
|
|
17
|
+
var index = this.index;
|
|
18
|
+
var clusters = this.clusters;
|
|
19
|
+
if (index >= clusters.length) index = clusters.length - 1;
|
|
20
|
+
this.clients = data.lazyInstance("cluster", { opt: "list", id: clusters[index] });
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
page.$scope.load();
|
|
24
|
+
return page;
|
|
25
|
+
}
|
package/apps/pivot/main.less
CHANGED
package/apps/pivot/menu.yml
CHANGED
package/coms/basic/JSAM.js
CHANGED
|
@@ -40,6 +40,10 @@ function stringify(memery) {
|
|
|
40
40
|
if (memery instanceof Date) return date(memery);
|
|
41
41
|
if (memery instanceof RegExp) return regexp(memery);
|
|
42
42
|
if (!convertReg.test(typeof memery)) return string(memery);
|
|
43
|
+
m: if (typeof memery === 'function') {
|
|
44
|
+
for (var k in memery) break m;
|
|
45
|
+
return '';
|
|
46
|
+
}
|
|
43
47
|
var dist = [memery];
|
|
44
48
|
var rest = [memery];
|
|
45
49
|
var trimed = [memery instanceof Array ? [] : {}];
|
|
@@ -51,6 +55,10 @@ function stringify(memery) {
|
|
|
51
55
|
o[""] = arr;
|
|
52
56
|
for (var k in memery) {
|
|
53
57
|
var m = memery[k];
|
|
58
|
+
f: if (typeof m === 'function') {
|
|
59
|
+
for (var k in m) break f;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
54
62
|
if (inc === +k && k !== '') {
|
|
55
63
|
var kindex = "";
|
|
56
64
|
inc++;
|