Move component labels to containers
This commit is contained in:
1 parent
30dbf0cf40
commit
7194fcab44
5 files changed
+46
-12
No files matched your search
@@ -103,14 +103,11 @@ const component = {
|
||||
return m("tr", attrs, m("td.left", k), m("td.right", val));
|
||||
});
|
||||
|
||||
return [
|
||||
m("h2", "Device parameters"),
|
||||
m(
|
||||
".all-parameters",
|
||||
search,
|
||||
m(".parameter-list", m("table", m("tbody", rows)))
|
||||
)
|
||||
];
|
||||
return m(
|
||||
".all-parameters",
|
||||
search,
|
||||
m(".parameter-list", m("table", m("tbody", rows)))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2,10 +2,21 @@
|
||||
|
||||
import m from "mithril";
|
||||
import * as components from "../components";
|
||||
import * as store from "../store";
|
||||
import Filter from "../../common/filter";
|
||||
import * as funcCache from "../../common/func-cache";
|
||||
|
||||
const component = {
|
||||
view: vnode => {
|
||||
if (vnode.attrs.filter) {
|
||||
const filter = store.unpackFilter(
|
||||
funcCache.get(Filter.parse, vnode.attrs.filter)
|
||||
);
|
||||
if (!filter.test(vnode.attrs.device)) return;
|
||||
}
|
||||
|
||||
let children = Object.values(vnode.attrs.components).map(c => {
|
||||
if (typeof c !== "object") return `${c}`;
|
||||
const attrs = Object.assign({}, vnode.attrs, c);
|
||||
return m(components.get(attrs.type), attrs);
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ const component = {
|
||||
m("tr.empty", m("td", { colspan: headers.length }, "No faults"))
|
||||
);
|
||||
|
||||
return [m("h2", "Faults"), m("table.table", thead, tbody)];
|
||||
return m("table.table", thead, tbody);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+9
-1
@@ -473,7 +473,6 @@ span.na {
|
||||
}
|
||||
|
||||
.all-parameters {
|
||||
clear: both;
|
||||
font-family: monospace;
|
||||
& > input {
|
||||
font-family: monospace;
|
||||
@@ -511,6 +510,15 @@ span.na {
|
||||
}
|
||||
}
|
||||
|
||||
.container-right {
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.container-full-width {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.device-actions {
|
||||
margin-top: 10px;
|
||||
& > button {
|
||||
|
||||
Reference in new issue
Block a user