Skip to content

Commit f777fa2

Browse files
committed
feat: modify setTableAndData with optional attribute
1 parent 202d470 commit f777fa2

File tree

7 files changed

+36
-35
lines changed

7 files changed

+36
-35
lines changed

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,6 @@ Please ensure you follow the coding standards used through-out the existing code
140140
- Indent with 4-spaces, no tabs.
141141
- Opening brace on same line as if/for/function and so on, closing brace on its own line.
142142

143-
## Some collaborations
144-
<div >
145-
<a href="https://wiki.seeedstudio.com/reTerminal-DM_intro_FUXA/" target="_blank" style="margin-right: 100px; line-height: 60px">
146-
<img src="https://frangoteam.org/assets/images/seeed-studio2.png" alt="" style="vertical-align: top"></a>
147-
</div>
148-
149143
## Let us know!
150144
We’d be really happy if you send us your own shapes in order to collect a library to share it with others. Just send an email to [email protected] and do let us know if you have any questions or suggestions regarding our work.
151145

client/dist/assets/i18n/en.json

+3
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,9 @@
12681268
"script.sys-fnc-getHistoricalTag-text": "$getHistoricalTags(TagIds array, from msec., to msec.)",
12691269
"script.sys-fnc-getHistoricalTag-tooltip":"get historical tags by milliseconds range: $getHistoricalTags([TagIds] as array, from as number, to as number)",
12701270
"script.sys-fnc-getHistoricalTag-params":"'Tag Ids array', 'From msec.', 'To msec.'",
1271+
"script.sys-fnc-sendMessage-text": "$sendMessage(address, subject, message)",
1272+
"script.sys-fnc-sendMessage-tooltip": "System function to send Message (Mail): $sendMessage(address as string, subject as string, message as string)",
1273+
"script.sys-fnc-sendMessage-params": "'address', 'subject', 'message'",
12711274

12721275
"script.template-chart-data-text": "Customized chart data",
12731276
"script.template-chart-data-tooltip": "Code template of customized chart data to return",

client/dist/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
</div>
4646
</div>
4747
</app-root>
48-
<script src="runtime.8ef63094e52a66ba.js" type="module"></script><script src="polyfills.df504f67f09f2fbb.js" type="module"></script><script src="scripts.a58f5e48421f8dfe.js" defer></script><script src="main.0c0c5e165c7d6799.js" type="module"></script>
48+
<script src="runtime.8ef63094e52a66ba.js" type="module"></script><script src="polyfills.df504f67f09f2fbb.js" type="module"></script><script src="scripts.a58f5e48421f8dfe.js" defer></script><script src="main.640abe7ec5bdb5c0.js" type="module"></script>
4949

5050
</body></html>

client/dist/main.0c0c5e165c7d6799.js client/dist/main.640abe7ec5bdb5c0.js

+11-11
Large diffs are not rendered by default.

client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fuxa",
3-
"version": "1.2.1-2041",
3+
"version": "1.2.1-2043",
44
"keywords": [],
55
"author": "frangoteam <[email protected]>",
66
"description": "Web-based Process Visualization (SCADA/HMI/Dashboard) software",

client/src/app/gauges/controls/html-table/data-table/data-table.component.ts

+19-15
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export class DataTableComponent implements OnInit, AfterViewInit, OnDestroy {
374374
}
375375
}
376376

377-
private addRowDataToTable(dt: number, tagId: string, value: any) {
377+
addRowDataToTable(dt: number, tagId: string, value: any) {
378378
let row = {};
379379
let timestapColumnId = null;
380380
let valueColumnId = null;
@@ -438,18 +438,22 @@ export class DataTableComponent implements OnInit, AfterViewInit, OnDestroy {
438438

439439
setTableAndData(tableData: TableData) {
440440
this.setOfSourceTableData = true;
441-
this.displayedColumns = tableData.columns.map(cln => cln.id);
442-
this.columnsStyle = tableData.columns;
443-
tableData.columns.forEach(clnData => {
444-
let column = clnData;
445-
column.fontSize = tableData.header?.fontSize;
446-
column.color = column.color || tableData.header?.color;
447-
column.background = column.background || tableData.header?.background;
448-
column.width = column.width || 100;
449-
column.align = column.align || TableCellAlignType.left;
450-
this.columnsStyle[column.id] = column;
451-
});
452-
this.dataSource = new MatTableDataSource(tableData.rows);
441+
if (tableData.columns) {
442+
this.displayedColumns = tableData.columns.map(cln => cln.id);
443+
this.columnsStyle = tableData.columns;
444+
tableData.columns.forEach(clnData => {
445+
let column = clnData;
446+
column.fontSize = tableData.header?.fontSize;
447+
column.color = column.color || tableData.header?.color;
448+
column.background = column.background || tableData.header?.background;
449+
column.width = column.width || 100;
450+
column.align = column.align || TableCellAlignType.left;
451+
this.columnsStyle[column.id] = column;
452+
});
453+
}
454+
if (tableData.rows) {
455+
this.dataSource = new MatTableDataSource(tableData.rows);
456+
}
453457
this.bindTableControls();
454458
}
455459

@@ -698,8 +702,8 @@ interface TableData {
698702
gridColor?: string;
699703
header?: TableDataHeaderStyle;
700704
rowStyle?: TableDataRowStyle;
701-
columns: TableDataColumnData[];
702-
rows: TableDataRow[];
705+
columns?: TableDataColumnData[];
706+
rows?: TableDataRow[];
703707
}
704708

705709
interface TableDataPaginatorOptions {

server/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fuxa-server",
3-
"version": "1.2.1-2041",
3+
"version": "1.2.1-2043",
44
"description": "Web-based Process Visualization (SCADA/HMI/Dashboard) software",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)