This commit is contained in:
insanity 2017-11-13 17:46:25 +09:00
parent d241b62ecd
commit 78cd806c0f
3 changed files with 16 additions and 5 deletions

View File

@ -70,7 +70,7 @@ export interface RPCConfig {
url: string;
}
const rpcConfig: RPCConfig = {
url: 'ws://127.0.0.1:19090/web',
url: 'ws://192.168.1.209:19090/web',
};
// REST Server Configuration

View File

@ -11,6 +11,7 @@ import {
List, Button,
ListItemProps,
CheckboxProps,
Rating,
} from 'semantic-ui-react';
@ -136,8 +137,11 @@ export class SensorItemTree extends React.Component<SensorItemTreeProps, SensorI
(event: React.FormEvent<HTMLInputElement>, checkProps: CheckboxProps) => {
this.onItemCheckCBox(parentKey, checkProps, item);
}} />
{this.checkRecommend(item)}
</List.Header>
<List.Description style={{ marginLeft: '26px' }}>{this.getItemDesc(item)}</List.Description>
<List.Description style={{ marginLeft: '26px' }}>
{this.getItemDesc(item)}
</List.Description>
</List.Content>
</List.Item>
</List.List>,
@ -147,8 +151,15 @@ export class SensorItemTree extends React.Component<SensorItemTreeProps, SensorI
return elems;
}
private checkRecommend(item: MetaSensorDisplayItem): JSX.Element {
if (item.default) {
return <Rating icon='star' defaultRating={3} maxRating={3} clearable={false} disabled={true} style={{marginLeft:10}}/>;
}
return null;
}
private getItemDesc(item: MetaSensorDisplayItem): string {
if(item.default) {
if (item.default) {
return '(Recommend) ' + item.key;
}
return item.key;

View File

@ -115,8 +115,8 @@ export class SensorConfigTargetSelect extends React.Component<Props, State> {
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
<Table.Cell textAlign={'center'}>{infra.infraType.name}</Table.Cell>
<Table.Cell textAlign={'center'}>{infra.target.displayName}</Table.Cell>
<Table.Cell>TODO</Table.Cell>
<Table.Cell>{Utils.date2date(infra.target.createDate)}</Table.Cell>
<Table.Cell textAlign={'center'} collapsing>{infra.target.sensors.length}</Table.Cell>
<Table.Cell textAlign={'center'}>{Utils.date2date(infra.target.createDate)}</Table.Cell>
</Table.Row>,
);