mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #~: fix webpack server kill service
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
parent
dfa9af60d0
commit
f10df39d15
@ -1,3 +1,18 @@
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
import path from 'path'
|
||||
import express from 'express'
|
||||
import webpack from 'webpack'
|
||||
@ -20,7 +35,8 @@ import {
|
||||
defaultHost,
|
||||
defaultPort,
|
||||
defaultWebpackMode,
|
||||
defaultApps
|
||||
defaultApps,
|
||||
defaultEvents
|
||||
} from './utils/constants/defaults'
|
||||
import {
|
||||
validateServerIsSecure,
|
||||
@ -177,8 +193,7 @@ function handleBreak (code) {
|
||||
})
|
||||
}
|
||||
}
|
||||
const eventProcess = ['SIGINT', 'SIGTERM']
|
||||
eventProcess.forEach((nameEvent = '') => {
|
||||
defaultEvents.forEach((nameEvent = '') => {
|
||||
if (nameEvent) {
|
||||
process.on(nameEvent, handleBreak)
|
||||
}
|
||||
|
@ -1,3 +1,18 @@
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const React = require('react')
|
||||
const { Router } = require('express')
|
||||
const { env } = require('process')
|
||||
|
@ -16,18 +16,18 @@
|
||||
const {
|
||||
from: { resource, postBody, query },
|
||||
httpMethod: { GET, POST, PUT, DELETE }
|
||||
} = require('../defaults');
|
||||
} = require('../defaults')
|
||||
|
||||
const VMGROUP_ALLOCATE = 'vmgroup.allocate';
|
||||
const VMGROUP_DELETE = 'vmgroup.delete';
|
||||
const VMGROUP_UPDATE = 'vmgroup.update';
|
||||
const VMGROUP_CHMOD = 'vmgroup.chmod';
|
||||
const VMGROUP_CHOWN = 'vmgroup.chown';
|
||||
const VMGROUP_RENAME = 'vmgroup.rename';
|
||||
const VMGROUP_INFO = 'vmgroup.info';
|
||||
const VMGROUP_LOCK = 'vmgroup.lock';
|
||||
const VMGROUP_UNLOCK = 'vmgroup.unlock';
|
||||
const VMGROUP_POOL_INFO = 'vmgrouppool.info';
|
||||
const VMGROUP_ALLOCATE = 'vmgroup.allocate'
|
||||
const VMGROUP_DELETE = 'vmgroup.delete'
|
||||
const VMGROUP_UPDATE = 'vmgroup.update'
|
||||
const VMGROUP_CHMOD = 'vmgroup.chmod'
|
||||
const VMGROUP_CHOWN = 'vmgroup.chown'
|
||||
const VMGROUP_RENAME = 'vmgroup.rename'
|
||||
const VMGROUP_INFO = 'vmgroup.info'
|
||||
const VMGROUP_LOCK = 'vmgroup.lock'
|
||||
const VMGROUP_UNLOCK = 'vmgroup.unlock'
|
||||
const VMGROUP_POOL_INFO = 'vmgrouppool.info'
|
||||
|
||||
const Actions = {
|
||||
VMGROUP_ALLOCATE,
|
||||
@ -40,7 +40,7 @@ const Actions = {
|
||||
VMGROUP_LOCK,
|
||||
VMGROUP_UNLOCK,
|
||||
VMGROUP_POOL_INFO
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Actions,
|
||||
@ -218,4 +218,4 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -16,25 +16,25 @@
|
||||
const {
|
||||
from: { resource, postBody, query },
|
||||
httpMethod: { GET, POST, PUT, DELETE }
|
||||
} = require('../defaults');
|
||||
} = require('../defaults')
|
||||
|
||||
const VN_ALLOCATE = 'vn.allocate';
|
||||
const VN_DELETE = 'vn.delete';
|
||||
const VN_AR_ADD = 'vn.add_ar';
|
||||
const VN_AR_RM = 'vn.rm_ar';
|
||||
const VN_AR_UPDATE = 'vn.update_ar';
|
||||
const VN_RESERVE = 'vn.reserve';
|
||||
const VN_AR_FREE = 'vn.free_ar';
|
||||
const VN_HOLD = 'vn.hold';
|
||||
const VN_RELEASE = 'vn.release';
|
||||
const VN_UPDATE = 'vn.update';
|
||||
const VN_CHMOD = 'vn.chmod';
|
||||
const VN_CHOWN = 'vn.chown';
|
||||
const VN_RENAME = 'vn.rename';
|
||||
const VN_INFO = 'vn.info';
|
||||
const VN_LOCK = 'vn.lock';
|
||||
const VN_UNLOCK = 'vn.unlock';
|
||||
const VN_POOL_INFO = 'vnpool.info';
|
||||
const VN_ALLOCATE = 'vn.allocate'
|
||||
const VN_DELETE = 'vn.delete'
|
||||
const VN_AR_ADD = 'vn.add_ar'
|
||||
const VN_AR_RM = 'vn.rm_ar'
|
||||
const VN_AR_UPDATE = 'vn.update_ar'
|
||||
const VN_RESERVE = 'vn.reserve'
|
||||
const VN_AR_FREE = 'vn.free_ar'
|
||||
const VN_HOLD = 'vn.hold'
|
||||
const VN_RELEASE = 'vn.release'
|
||||
const VN_UPDATE = 'vn.update'
|
||||
const VN_CHMOD = 'vn.chmod'
|
||||
const VN_CHOWN = 'vn.chown'
|
||||
const VN_RENAME = 'vn.rename'
|
||||
const VN_INFO = 'vn.info'
|
||||
const VN_LOCK = 'vn.lock'
|
||||
const VN_UNLOCK = 'vn.unlock'
|
||||
const VN_POOL_INFO = 'vnpool.info'
|
||||
|
||||
const Actions = {
|
||||
VN_ALLOCATE,
|
||||
@ -54,7 +54,7 @@ const Actions = {
|
||||
VN_LOCK,
|
||||
VN_UNLOCK,
|
||||
VN_POOL_INFO
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Actions,
|
||||
@ -334,4 +334,4 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -16,20 +16,20 @@
|
||||
const {
|
||||
from: { resource, postBody, query },
|
||||
httpMethod: { GET, POST, PUT, DELETE }
|
||||
} = require('../defaults');
|
||||
} = require('../defaults')
|
||||
|
||||
const VNTEMPLATE_ALLOCATE = 'vntemplate.allocate';
|
||||
const VNTEMPLATE_CLONE = 'vntemplate.clone';
|
||||
const VNTEMPLATE_DELETE = 'vntemplate.delete';
|
||||
const VNTEMPLATE_INSTANTIATE = 'vntemplate.instantiate';
|
||||
const VNTEMPLATE_UPDATE = 'vntemplate.update';
|
||||
const VNTEMPLATE_CHMOD = 'vntemplate.chmod';
|
||||
const VNTEMPLATE_CHOWN = 'vntemplate.chown';
|
||||
const VNTEMPLATE_RENAME = 'vntemplate.rename';
|
||||
const VNTEMPLATE_INFO = 'vntemplate.info';
|
||||
const VNTEMPLATE_LOCK = 'vntemplate.lock';
|
||||
const VNTEMPLATE_UNLOCK = 'vntemplate.unlock';
|
||||
const VNTEMPLATE_POOL_INFO = 'vntemplatepool.info';
|
||||
const VNTEMPLATE_ALLOCATE = 'vntemplate.allocate'
|
||||
const VNTEMPLATE_CLONE = 'vntemplate.clone'
|
||||
const VNTEMPLATE_DELETE = 'vntemplate.delete'
|
||||
const VNTEMPLATE_INSTANTIATE = 'vntemplate.instantiate'
|
||||
const VNTEMPLATE_UPDATE = 'vntemplate.update'
|
||||
const VNTEMPLATE_CHMOD = 'vntemplate.chmod'
|
||||
const VNTEMPLATE_CHOWN = 'vntemplate.chown'
|
||||
const VNTEMPLATE_RENAME = 'vntemplate.rename'
|
||||
const VNTEMPLATE_INFO = 'vntemplate.info'
|
||||
const VNTEMPLATE_LOCK = 'vntemplate.lock'
|
||||
const VNTEMPLATE_UNLOCK = 'vntemplate.unlock'
|
||||
const VNTEMPLATE_POOL_INFO = 'vntemplatepool.info'
|
||||
|
||||
const Actions = {
|
||||
VNTEMPLATE_ALLOCATE,
|
||||
@ -44,7 +44,7 @@ const Actions = {
|
||||
VNTEMPLATE_LOCK,
|
||||
VNTEMPLATE_UNLOCK,
|
||||
VNTEMPLATE_POOL_INFO
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Actions,
|
||||
@ -254,4 +254,4 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -124,6 +124,7 @@ const defaults = {
|
||||
defaultProtocolHotReload: 'http',
|
||||
defaultHost: '0.0.0.0',
|
||||
defaultPort: 2616,
|
||||
defaultEvents: ['SIGINT', 'SIGTERM'],
|
||||
availableLanguages: {
|
||||
bg_BG: 'Bulgarian (Bulgaria)',
|
||||
bg: 'Bulgarian',
|
||||
|
@ -1,3 +1,18 @@
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const TimeFixPlugin = require('time-fix-plugin')
|
||||
|
@ -1,3 +1,18 @@
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const CopyPlugin = require('copy-webpack-plugin')
|
||||
|
@ -1,3 +1,18 @@
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const nodeExternals = require('webpack-node-externals')
|
||||
@ -25,11 +40,6 @@ module.exports = {
|
||||
stats: {
|
||||
warnings: false
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
process: 'process/browser'
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new TimeFixPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
@ -37,9 +47,6 @@ module.exports = {
|
||||
NODE_ENV: JSON.stringify(defaultProductionWebpackMode)
|
||||
}
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser'
|
||||
}),
|
||||
new webpack.optimize.LimitChunkCountPlugin({
|
||||
maxChunks: 1
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user