This app provides monitoring and information features for the common freifunk user and the technical stuff of a freifunk community.
Code base is taken from a TUM Practical Course project and added here to see if Freifunk Altdorf can use it.
https://www.freifunk-altdorf.de
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
6 years ago
|
import React, { Component } from 'react';
|
||
|
import { Text } from 'react-native';
|
||
|
import styles from './../style';
|
||
|
import { YellowBox } from 'react-native';
|
||
|
YellowBox.ignoreWarnings(['Warning: Each child in an array or iterator should have a unique "key" prop.']); //Silence Warning
|
||
|
|
||
|
export default class NodeInformation extends Component {
|
||
|
|
||
|
constructor(props) {
|
||
|
super(props);
|
||
|
};
|
||
|
|
||
|
render() {
|
||
|
var dataATT = this.props.dataATT;
|
||
|
var ready = false;
|
||
|
// console.log('Child-Component Lat' , dataATT[0]);
|
||
|
var hn = 'praxis-dr-tschoep';
|
||
|
for (var k in dataATT) {
|
||
|
if (dataATT.hasOwnProperty(k)) {
|
||
|
if (dataATT[k].nodeinfo.hostname === hn) {
|
||
|
ready = true;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
textAnzeigen = () => {
|
||
|
if(ready === false) {
|
||
|
return 'Loading..';
|
||
|
}
|
||
|
else {
|
||
|
return 'Ready';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return ([
|
||
|
<Text style={{ paddingBottom: 10 }}>{textAnzeigen()}</Text>
|
||
|
]);
|
||
|
}
|
||
|
}
|