Skip to content

Commit

Permalink
feat: modify setTableAndData with optional attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
unocelli committed Nov 18, 2024
1 parent 202d470 commit f777fa2
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 35 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ Please ensure you follow the coding standards used through-out the existing code
- Indent with 4-spaces, no tabs.
- Opening brace on same line as if/for/function and so on, closing brace on its own line.

## Some collaborations
<div >
<a href="https://wiki.seeedstudio.com/reTerminal-DM_intro_FUXA/" target="_blank" style="margin-right: 100px; line-height: 60px">
<img src="https://frangoteam.org/assets/images/seeed-studio2.png" alt="" style="vertical-align: top"></a>
</div>

## Let us know!
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.

Expand Down
3 changes: 3 additions & 0 deletions client/dist/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,9 @@
"script.sys-fnc-getHistoricalTag-text": "$getHistoricalTags(TagIds array, from msec., to msec.)",
"script.sys-fnc-getHistoricalTag-tooltip":"get historical tags by milliseconds range: $getHistoricalTags([TagIds] as array, from as number, to as number)",
"script.sys-fnc-getHistoricalTag-params":"'Tag Ids array', 'From msec.', 'To msec.'",
"script.sys-fnc-sendMessage-text": "$sendMessage(address, subject, message)",
"script.sys-fnc-sendMessage-tooltip": "System function to send Message (Mail): $sendMessage(address as string, subject as string, message as string)",
"script.sys-fnc-sendMessage-params": "'address', 'subject', 'message'",

"script.template-chart-data-text": "Customized chart data",
"script.template-chart-data-tooltip": "Code template of customized chart data to return",
Expand Down
2 changes: 1 addition & 1 deletion client/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
</div>
</div>
</app-root>
<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>
<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>

</body></html>

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fuxa",
"version": "1.2.1-2041",
"version": "1.2.1-2043",
"keywords": [],
"author": "frangoteam <[email protected]>",
"description": "Web-based Process Visualization (SCADA/HMI/Dashboard) software",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export class DataTableComponent implements OnInit, AfterViewInit, OnDestroy {
}
}

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

setTableAndData(tableData: TableData) {
this.setOfSourceTableData = true;
this.displayedColumns = tableData.columns.map(cln => cln.id);
this.columnsStyle = tableData.columns;
tableData.columns.forEach(clnData => {
let column = clnData;
column.fontSize = tableData.header?.fontSize;
column.color = column.color || tableData.header?.color;
column.background = column.background || tableData.header?.background;
column.width = column.width || 100;
column.align = column.align || TableCellAlignType.left;
this.columnsStyle[column.id] = column;
});
this.dataSource = new MatTableDataSource(tableData.rows);
if (tableData.columns) {
this.displayedColumns = tableData.columns.map(cln => cln.id);
this.columnsStyle = tableData.columns;
tableData.columns.forEach(clnData => {
let column = clnData;
column.fontSize = tableData.header?.fontSize;
column.color = column.color || tableData.header?.color;
column.background = column.background || tableData.header?.background;
column.width = column.width || 100;
column.align = column.align || TableCellAlignType.left;
this.columnsStyle[column.id] = column;
});
}
if (tableData.rows) {
this.dataSource = new MatTableDataSource(tableData.rows);
}
this.bindTableControls();
}

Expand Down Expand Up @@ -698,8 +702,8 @@ interface TableData {
gridColor?: string;
header?: TableDataHeaderStyle;
rowStyle?: TableDataRowStyle;
columns: TableDataColumnData[];
rows: TableDataRow[];
columns?: TableDataColumnData[];
rows?: TableDataRow[];
}

interface TableDataPaginatorOptions {
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fuxa-server",
"version": "1.2.1-2041",
"version": "1.2.1-2043",
"description": "Web-based Process Visualization (SCADA/HMI/Dashboard) software",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit f777fa2

Please sign in to comment.