This commit is contained in:
crusader 2018-09-27 18:44:56 +09:00
parent 89abe15b4b
commit e925485135
12 changed files with 45 additions and 35 deletions

View File

@ -10,6 +10,7 @@ const channel = getReleaseChannel();
const s = JSON.stringify; const s = JSON.stringify;
function getReplacements() { function getReplacements() {
console.log(`channel: ${channel}`);
return { return {
__DARWIN__: process.platform === 'darwin', __DARWIN__: process.platform === 'darwin',
__WIN32__: process.platform === 'win32', __WIN32__: process.platform === 'win32',

View File

@ -22,7 +22,7 @@ module.exports = function () {
let config = Object.assign({}); let config = Object.assign({});
config.target = 'electron-main'; config.target = 'electron-main';
config.mode = PROD ? 'production' : 'development'; config.mode = PROD ? 'production' : 'development';
config.devtool = PROD ? 'source-map' : 'cheap-module-source-map'; config.devtool = PROD ? false : 'cheap-module-source-map';
config.externals = [nodeExternals()]; config.externals = [nodeExternals()];
config.entry = { config.entry = {
'index': root('src', 'electron', 'main.ts') 'index': root('src', 'electron', 'main.ts')

View File

@ -13,12 +13,11 @@ const PROD = EVENT.includes('prod');
module.exports = function (config) { module.exports = function (config) {
config.target = 'electron-renderer'; config.target = 'electron-renderer';
// config.output = { config.output = {
// path: PROD ? root('build', 'dist') : root('build', 'dev'), path: PROD ? root('build', 'dist') : root('build', 'dev'),
// filename: '[name].js', filename: '[name].js',
// sourceMapFilename: '[file].map', crossOriginLoading: false,
// }; };
config.plugins.push( config.plugins.push(
new webpack.DefinePlugin( new webpack.DefinePlugin(

View File

@ -13,10 +13,10 @@
"start:hmr": "ng serve --configuration hmr", "start:hmr": "ng serve --configuration hmr",
"start:electron:hmr": "npm-run-all -p start:hmr wait-on:build:main:dev", "start:electron:hmr": "npm-run-all -p start:hmr wait-on:build:main:dev",
"build": "ng build", "build": "ng build",
"build:renderer:dev": "ng build", "build:renderer:dev": "cross-env NODE_ENV=development ng build --aot",
"build:renderer:prod": "ng build --aot", "build:renderer:prod": "cross-env NODE_ENV=production ng build --prod",
"build:main:dev": "webpack --config config/webpack.config.main.js --progress --profile", "build:main:dev": "cross-env NODE_ENV=development webpack --config config/webpack.config.main.js --progress --profile",
"build:main:prod": "webpack --config config/webpack.config.main.js --progress --profile", "build:main:prod": "cross-env NODE_ENV=production webpack --config config/webpack.config.main.js --progress --profile",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
@ -62,6 +62,7 @@
"awesome-typescript-loader": "^5.2.0", "awesome-typescript-loader": "^5.2.0",
"codelyzer": "~4.2.1", "codelyzer": "~4.2.1",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"cross-env": "^5.2.0",
"d3": "^5.7.0", "d3": "^5.7.0",
"devtron": "^1.4.0", "devtron": "^1.4.0",
"dexie": "^2.0.4", "dexie": "^2.0.4",

View File

@ -7,7 +7,7 @@
</svg> </svg>
</div> </div>
<div class="home-description"> <div class="home-description">
<img src="../../assets/image/logo/overFlow_CI_white_90.png"> <img src="assets/image/logo/overFlow_CI_white_90.png">
<h1>Network Scanner </h1> <h1>Network Scanner </h1>
<br> <br>
<b>를 이용해 주셔서 감사합니다.</b> <b>를 이용해 주셔서 감사합니다.</b>
@ -30,22 +30,22 @@
<g class="node-container" [ngClass]="node.group" [attr.nodeId]="node.id" [attr.transform]="'translate(' + node.x + ',' + node.y + ')'"> <g class="node-container" [ngClass]="node.group" [attr.nodeId]="node.id" [attr.transform]="'translate(' + node.x + ',' + node.y + ')'">
<g *ngIf="node.group === 'zone'"> <g *ngIf="node.group === 'zone'">
<image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2" <image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2"
xlink:href="../../assets/image/node/icon/icon_overflow.svg"></image> xlink:href="assets/image/node/icon/icon_overflow.svg"></image>
</g> </g>
<g *ngIf="node.group === 'zone'"> <g *ngIf="node.group === 'zone'">
<text class="textClass" [attr.y]="(node.r - 10) / 10 + 'em'" text-anchor="middle">{{node.target.network}}</text> <text class="textClass" [attr.y]="(node.r - 10) / 10 + 'em'" text-anchor="middle">{{node.target.network}}</text>
</g> </g>
<g *ngIf="node.group !== 'zone'"> <g *ngIf="node.group !== 'zone'">
<image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2" <image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2"
xlink:href="../../assets/image/node/icon/icon_background.svg"></image> xlink:href="assets/image/node/icon/icon_background.svg"></image>
</g> </g>
<g *ngIf="node.group === 'host'"> <g *ngIf="node.group === 'host'">
<image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2" <image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2"
attr.xlink:href="../../assets/image/node/icon/icon_{{node.target.hostType | lowercase}}.svg"></image> attr.xlink:href="assets/image/node/icon/icon_{{node.target.hostType | lowercase}}.svg"></image>
</g> </g>
<g *ngIf="node.group === 'host' && node.target.hostType === 'HOST' && node.target.osType !== 'UNKNOWN'"> <g *ngIf="node.group === 'host' && node.target.hostType === 'HOST' && node.target.osType !== 'UNKNOWN'">
<image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2" <image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2"
attr.xlink:href="../../assets/image/node/logo/logo_{{node.target.osType | lowercase}}.svg"></image> attr.xlink:href="assets/image/node/logo/logo_{{node.target.osType | lowercase}}.svg"></image>
</g> </g>
<!-- <g *ngIf="node.group === 'host' && node.target.hostType !== 'HOST' && node.target.hostVendor !== ''"> <!-- <g *ngIf="node.group === 'host' && node.target.hostType !== 'HOST' && node.target.hostVendor !== ''">
<text class="textClass" [attr.y]="(node.r - 30) / 10 + 'em'" text-anchor="middle">{{node.target.hostVendor}}</text> <text class="textClass" [attr.y]="(node.r - 30) / 10 + 'em'" text-anchor="middle">{{node.target.hostVendor}}</text>
@ -55,11 +55,11 @@
</g> </g>
<g *ngIf="node.group === 'service'"> <g *ngIf="node.group === 'service'">
<image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2" <image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2"
attr.xlink:href="../../assets/image/node/icon/icon_{{node.target.serviceType | lowercase}}.svg"></image> attr.xlink:href="assets/image/node/icon/icon_{{node.target.serviceType | lowercase}}.svg"></image>
</g> </g>
<g *ngIf="node.group === 'service' && node.target.key !== 'UNKNOWN'"> <g *ngIf="node.group === 'service' && node.target.key !== 'UNKNOWN'">
<image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2" <image [attr.x]="-node.r" [attr.y]="-node.r" [attr.width]="node.r * 2" [attr.height]="node.r * 2"
attr.xlink:href="../../assets/image/node/logo/logo_{{node.target.key | lowercase}}.svg"></image> attr.xlink:href="assets/image/node/logo/logo_{{node.target.key | lowercase}}.svg"></image>
</g> </g>
<g *ngIf="node.group === 'service'"> <g *ngIf="node.group === 'service'">
<text class="textClass" [attr.y]="(node.r - 10) / 10 + 'em'" text-anchor="middle">{{node.target.name}}</text> <text class="textClass" [attr.y]="(node.r - 10) / 10 + 'em'" text-anchor="middle">{{node.target.name}}</text>

View File

@ -1,18 +1,18 @@
<div class="ui-g-12"> <div class="ui-g-12">
<div class="ui-g detail-img"> <div class="ui-g detail-img">
<!-- <svg width="200" height="200" viewBox="20 40 140 100"> <!-- <svg width="200" height="200" viewBox="20 40 140 100">
<image x="-40" y="-20" width="260" height="260" preserveAspectRatio="xMidYMid slice" xlink:href="../../assets/image/node/logo/logo_tomcat.svg" /> <image x="-40" y="-20" width="260" height="260" preserveAspectRatio="xMidYMid slice" xlink:href="assets/image/node/logo/logo_tomcat.svg" />
</svg> --> </svg> -->
<div class="svg-div"> <div class="svg-div">
<!-- <svg width="140" height="140" viewBox="15 35 140 100"> <!-- <svg width="140" height="140" viewBox="15 35 140 100">
<image x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" attr.xlink:href="../../assets/image/node/icon/icon_{{host.hostType | lowercase}}.svg" /> <image x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" attr.xlink:href="assets/image/node/icon/icon_{{host.hostType | lowercase}}.svg" />
<image *ngIf="host.hostType === 'HOST'" x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" <image *ngIf="host.hostType === 'HOST'" x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice"
attr.xlink:href="../../assets/image/node/logo/logo_{{host.osType | lowercase}}.svg"></image> attr.xlink:href="assets/image/node/logo/logo_{{host.osType | lowercase}}.svg"></image>
</svg> --> </svg> -->
<svg width="140" height="140" viewBox="20 10 140 140"> <svg width="140" height="140" viewBox="20 10 140 140">
<image x="-10" y="-5" width="200" height="200" preserveAspectRatio="xMidYMid slice" attr.xlink:href="../../assets/image/node/icon/icon_{{host.hostType | lowercase}}.svg" /> <image x="-10" y="-5" width="200" height="200" preserveAspectRatio="xMidYMid slice" attr.xlink:href="assets/image/node/icon/icon_{{host.hostType | lowercase}}.svg" />
<image *ngIf="host.hostType === 'HOST' && host.osType !== 'UNKNOWN'" x="-10" y="-5" width="200" height="200" <image *ngIf="host.hostType === 'HOST' && host.osType !== 'UNKNOWN'" x="-10" y="-5" width="200" height="200"
preserveAspectRatio="xMidYMid slice" attr.xlink:href="../../assets/image/node/logo/logo_{{host.osType | lowercase}}.svg" /> preserveAspectRatio="xMidYMid slice" attr.xlink:href="assets/image/node/logo/logo_{{host.osType | lowercase}}.svg" />
</svg> </svg>
</div> </div>
<h3>{{host.name}} <span>{{host.address}}</span></h3> <h3>{{host.name}} <span>{{host.address}}</span></h3>

View File

@ -4,12 +4,12 @@
<svg svg aria-hidden="true" version="1.1" width="80" height="80"> <svg svg aria-hidden="true" version="1.1" width="80" height="80">
<g> <g>
<image _ngcontent-c11="" x="0" y="0" width="80" height="80" xmlns:xlink="http://www.w3.org/1999/xlink" <image _ngcontent-c11="" x="0" y="0" width="80" height="80" xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="../../assets/image/logo/overflow_500.svg"></image> xlink:href="assets/image/logo/overflow_500.svg"></image>
</g> </g>
</svg> </svg>
</div> </div>
<div class="ui-bi"> <div class="ui-bi">
<img src="../../assets/image/logo/overFlow_CI_blue_90.png"> <img src="assets/image/logo/overFlow_CI_blue_90.png">
<h1> <h1>
Network Scanner Network Scanner
</h1> </h1>

View File

@ -2,17 +2,17 @@
<div class="ui-g detail-img"> <div class="ui-g detail-img">
<!-- <svg width="200" height="200" viewBox="20 40 140 100"> <!-- <svg width="200" height="200" viewBox="20 40 140 100">
<image x="-40" y="-20" width="260" height="260" preserveAspectRatio="xMidYMid slice" xlink:href="../../assets/image/node/logo/logo_tomcat.svg" /> <image x="-40" y="-20" width="260" height="260" preserveAspectRatio="xMidYMid slice" xlink:href="assets/image/node/logo/logo_tomcat.svg" />
</svg> --> </svg> -->
<div class="svg-div"> <div class="svg-div">
<!-- <svg width="140" height="140" viewBox="15 35 140 100"> <!-- <svg width="140" height="140" viewBox="15 35 140 100">
<image x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" attr.xlink:href="../../assets/image/node/icon/icon_{{service.serviceType | lowercase}}.svg" /> <image x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" attr.xlink:href="assets/image/node/icon/icon_{{service.serviceType | lowercase}}.svg" />
<image x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" attr.xlink:href="../../assets/image/node/logo/logo_{{service.key | lowercase}}.svg" /> <image x="-50" y="-40" width="260" height="260" preserveAspectRatio="xMidYMid slice" attr.xlink:href="assets/image/node/logo/logo_{{service.key | lowercase}}.svg" />
</svg> --> </svg> -->
<svg width="140" height="140" viewBox="20 10 140 140"> <svg width="140" height="140" viewBox="20 10 140 140">
<image x="-10" y="-5" width="200" height="200" preserveAspectRatio="xMidYMid slice" attr.xlink:href="../../assets/image/node/icon/icon_{{service.serviceType | lowercase}}.svg" /> <image x="-10" y="-5" width="200" height="200" preserveAspectRatio="xMidYMid slice" attr.xlink:href="assets/image/node/icon/icon_{{service.serviceType | lowercase}}.svg" />
<image *ngIf="service.key !== 'UNKNOWN'" x="-10" y="-5" width="200" height="200" preserveAspectRatio="xMidYMid slice" <image *ngIf="service.key !== 'UNKNOWN'" x="-10" y="-5" width="200" height="200" preserveAspectRatio="xMidYMid slice"
attr.xlink:href="../../assets/image/node/logo/logo_{{service.key | lowercase}}.svg" /> attr.xlink:href="assets/image/node/logo/logo_{{service.key | lowercase}}.svg" />
</svg> </svg>
</div> </div>
<h3> <h3>

View File

@ -2,11 +2,11 @@
<div class="ui-g detail-img"> <div class="ui-g detail-img">
<!-- <svg width="200" height="200" viewBox="20 40 140 100"> <!-- <svg width="200" height="200" viewBox="20 40 140 100">
<image x="-40" y="-20" width="260" height="260" preserveAspectRatio="xMidYMid slice" xlink:href="../../assets/image/node/logo/logo_tomcat.svg" /> <image x="-40" y="-20" width="260" height="260" preserveAspectRatio="xMidYMid slice" xlink:href="assets/image/node/logo/logo_tomcat.svg" />
</svg> --> </svg> -->
<div class="svg-div"> <div class="svg-div">
<svg width="140" height="140" viewBox="0 0 140 140"> <svg width="140" height="140" viewBox="0 0 140 140">
<image x="0" y="0" width="140" height="140" preserveAspectRatio="xMidYMid slice" xlink:href="../../assets/image/node/icon/icon_overflow.svg" /> <image x="0" y="0" width="140" height="140" preserveAspectRatio="xMidYMid slice" xlink:href="assets/image/node/icon/icon_overflow.svg" />
</svg> </svg>
</div> </div>
<h3> <h3>

View File

@ -176,7 +176,9 @@ export class AppWindow {
registerWindowStateChangedEvents(this.window); registerWindowStateChangedEvents(this.window);
if (__DEV__) { console.log(`NODE_ENV: ${process.env.NODE_ENV}`);
if (process.env.NODE_ENV === 'development') {
const indexUrl = URL.format({ const indexUrl = URL.format({
pathname: path.join('//localhost:4200'), pathname: path.join('//localhost:4200'),
protocol: 'http:', protocol: 'http:',

View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>overFlow</title> <title>overFlow</title>
<base href="/"> <base href="./">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">

View File

@ -1944,6 +1944,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1" safe-buffer "^5.0.1"
sha.js "^2.4.8" sha.js "^2.4.8"
cross-env@^5.2.0:
version "5.2.0"
resolved "https://nexus.loafle.net/repository/npm-all/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
dependencies:
cross-spawn "^6.0.5"
is-windows "^1.0.0"
cross-spawn@^3.0.0: cross-spawn@^3.0.0:
version "3.0.1" version "3.0.1"
resolved "https://nexus.loafle.net/repository/npm-all/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" resolved "https://nexus.loafle.net/repository/npm-all/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
@ -4239,7 +4246,7 @@ is-utf8@^0.2.0:
version "0.2.1" version "0.2.1"
resolved "https://nexus.loafle.net/repository/npm-all/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" resolved "https://nexus.loafle.net/repository/npm-all/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
is-windows@^1.0.2: is-windows@^1.0.0, is-windows@^1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://nexus.loafle.net/repository/npm-all/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" resolved "https://nexus.loafle.net/repository/npm-all/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"