forked from microsoft/nni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from Microsoft/master
merge master
- Loading branch information
Showing
14 changed files
with
118 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import * as React from 'react'; | ||
import LogPathChild from './LogPathChild'; | ||
|
||
interface LogpathProps { | ||
logStr: string; | ||
} | ||
|
||
class LogPath extends React.Component<LogpathProps, {}> { | ||
|
||
constructor(props: LogpathProps) { | ||
super(props); | ||
|
||
} | ||
|
||
render() { | ||
const { logStr } = this.props; | ||
const isTwopath = logStr.indexOf(',') !== -1 | ||
? | ||
true | ||
: | ||
false; | ||
return ( | ||
<div> | ||
{ | ||
isTwopath | ||
? | ||
<div> | ||
<LogPathChild | ||
eachLogpath={logStr.split(',')[0]} | ||
logName="LogPath:" | ||
/> | ||
<LogPathChild | ||
eachLogpath={logStr.split(',')[1]} | ||
logName="hdfsLogPath:" | ||
/> | ||
</div> | ||
: | ||
<LogPathChild | ||
eachLogpath={logStr} | ||
logName="LogPath:" | ||
/> | ||
} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default LogPath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import * as React from 'react'; | ||
|
||
interface LogpathChildProps { | ||
eachLogpath: string; | ||
logName: string; | ||
} | ||
|
||
class LogPathChild extends React.Component<LogpathChildProps, {}> { | ||
|
||
constructor(props: LogpathChildProps) { | ||
super(props); | ||
|
||
} | ||
|
||
render() { | ||
const { eachLogpath, logName } = this.props; | ||
const isLink = /^http/gi.test(eachLogpath); | ||
|
||
return ( | ||
<div> | ||
{ | ||
isLink | ||
? | ||
<div className="logpath"> | ||
<span className="logName">{logName}</span> | ||
<a className="logContent logHref" href={eachLogpath} target="_blank">{eachLogpath}</a> | ||
</div> | ||
: | ||
<div className="logpath"> | ||
<span className="logName">{logName}</span> | ||
<span className="logContent">{eachLogpath}</span> | ||
</div> | ||
} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default LogPathChild; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters