Skip to content

Commit b4df0a6

Browse files
author
Billy Ernest
committed
Made more updates per Tony's spread sheet.
1 parent a32d729 commit b4df0a6

File tree

6 files changed

+34
-21
lines changed

6 files changed

+34
-21
lines changed

SEBrowser/SEBrowser.csproj.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
1010
<IISExpressUseClassicPipelineMode />
1111
<UseGlobalApplicationHostFile />
12-
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
12+
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
1313
<ProjectView>ShowAllFiles</ProjectView>
1414
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
1515
</PropertyGroup>

SEBrowser/Scripts/SEBrowser.js

Lines changed: 18 additions & 12 deletions
Large diffs are not rendered by default.

SEBrowser/Scripts/TSX/Components/EventSearch/EventSearchAssetFaultSegments.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import SEBrowserService from './../../../TS/Services/SEBrowser';
2626

2727
export default class EventSearchFaultSegments extends React.Component<{ EventID: number }, {tableRows: Array<JSX.Element>, count: number }>{
2828
seBrowserService: SEBrowserService;
29+
handle: JQuery.jqXHR;
2930
constructor(props, context) {
3031
super(props, context);
3132

@@ -35,13 +36,16 @@ export default class EventSearchFaultSegments extends React.Component<{ EventID:
3536
tableRows: [],
3637
count: 0
3738
};
39+
40+
this.handle = null;
3841
}
3942

4043
componentDidMount() {
4144
if (this.props.EventID >= 0)
4245
this.createTableRows(this.props.EventID);
4346
}
4447
componentWillUnmount() {
48+
if (this.handle.abort != undefined) this.handle.abort();
4549
}
4650
componentWillReceiveProps(nextProps) {
4751
if (nextProps.EventID >= 0)
@@ -50,12 +54,13 @@ export default class EventSearchFaultSegments extends React.Component<{ EventID:
5054

5155

5256
createTableRows(eventID: number) {
53-
this.seBrowserService.getEventSearchAsssetFaultSegmentsData(eventID).done(data => {
57+
this.handle = this.seBrowserService.getEventSearchAsssetFaultSegmentsData(eventID).done(data => {
5458
var rows = data.map((d,i) =>
5559
<tr key={i}>
5660
<td>{d.SegmentType}</td>
5761
<td>{moment(d.StartTime).format('HH:mm:ss.SSS')}</td>
5862
<td>{moment(d.EndTime).format('HH:mm:ss.SSS')}</td>
63+
<td>{(moment(d.EndTime).diff(moment(d.StartTime))/16.66667).toFixed(1)}</td>
5964
</tr>)
6065

6166
this.setState({ tableRows: rows , count: rows.length});
@@ -70,7 +75,7 @@ export default class EventSearchFaultSegments extends React.Component<{ EventID:
7075
<div className="card-body">
7176
<table className="table">
7277
<thead>
73-
<tr><th>Evolution</th><th>Inception</th><th>End</th></tr>
78+
<tr><th>Evolution</th><th>Inception</th><th>End</th><th>Duration (c)</th></tr>
7479
</thead>
7580
<tbody>
7681
{this.state.tableRows}

SEBrowser/Scripts/TSX/Components/EventSearch/EventSearchFileInfo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ function EventSearchFileInfo(props: { EventID: number }) {
8181

8282
return (
8383
<div className="card">
84-
<div className="card-header">File Info:</div>
84+
<div className="card-header">File Info:
85+
<a className="pull-right" target="_blank" href={scInstance + `?name=ConfigurationHistory&MeterKey=${meterKey}&MeterConfigurationID=${meterConfigurationID}`}>Meter Configuration Via System Center</a>
86+
</div>
8587

8688
<div className="card-body">
87-
<table className="table"><thead><tr><td style={{ borderBottom: '2px solid #dee2e6' }}><a href={scInstance + `?name=ConfigurationHistory&MeterKey=${meterKey}&MeterConfigurationID=${meterConfigurationID}`}>Meter Configuration Via System Center</a></td></tr></thead></table>
88-
8989
<table className="table"><thead><tr><th>File:</th><td style={{borderBottom: '2px solid #dee2e6'}}>{fileName}</td></tr></thead></table>
9090
<h6>Mapped Channels</h6>
9191
<table className="table">

SEBrowser/Scripts/TSX/Components/EventSearch/LineParameters.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import React from 'react';
2525

2626
const LineParameters = (props: { EventID: number }) => {
2727
const [hidden, setHidden] = React.useState<boolean>(true);
28-
const [lineParameters, setLineParameters] = React.useState<{ Length?: number,X0?: number, X1?: number, R1?: number, R0?: number}>(null);
28+
const [lineParameters, setLineParameters] = React.useState<{ ID?: number, Length?: number,X0?: number, X1?: number, R1?: number, R0?: number}>(null);
2929
React.useEffect(() => {
3030
return GetData();
3131
}, [props.EventID]);
@@ -71,7 +71,9 @@ const LineParameters = (props: { EventID: number }) => {
7171
if (lineParameters == null) return null;
7272
return (
7373
<div className="card" hidden={hidden}>
74-
<div className="card-header">Line Parameters:</div>
74+
<div className="card-header">Line Parameters:
75+
<a className="pull-right" target="_blank" href={`${scInstance}?name=Asset&AssetID=${lineParameters.ID}`}>Line Configuration Via System Center</a>
76+
</div>
7577
<div className="card-body">
7678
<table className='table'>
7779
<thead>

SEBrowser/Scripts/TSX/Components/EventSearch/TVA/FaultInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const FaultInfo = (props: { EventID: number }) => {
7878
<div className="card-body">
7979
<table className='table'>
8080
<tbody>
81-
<tr><td>Fault Inception Time: </td><td>{faultInfo.FaultTime}</td></tr>
81+
<tr><td>Fault Inception Time: </td><td>{moment(faultInfo.FaultTime).format('YYYY-MM-DD HH:mm:ss.SSS')} (Central Time)</td></tr>
8282
<tr><td>Fault Duration: </td><td>{faultInfo.FaultDuration} cycles / {(faultInfo.FaultDuration == undefined ? '': (faultInfo.FaultDuration * 16.6).toFixed(2))} ms</td></tr>
8383
<tr><td>Fault Type: </td><td>{faultInfo.FaultType}</td></tr>
8484
<tr><td>Location: </td><td>{faultInfo.FaultDistance} miles from {faultInfo.StationName}({faultInfo.StationID}) on {faultInfo.LineName}({faultInfo.LineAssetKey})</td></tr>

0 commit comments

Comments
 (0)