Skip to content

Commit

Permalink
Some bugs fix and version update
Browse files Browse the repository at this point in the history
  • Loading branch information
snetsystems committed Dec 17, 2021
1 parent 3c9e9fd commit 45edeef
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 28 deletions.
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"-u=oncue:<port>",
"-u=vsphere:on",
"-u=aws:on",
"-u=k8s:on",
"-u=ipmi-secret-key:<Seed key using for the encryption of ipmi password>",
"-c=./cloudhub-canned/",
"--protoboards-path=./cloudhub-protoboards/",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 1.1.1
VERSION = 1.2.0
ifeq ($(OS), Windows_NT)
GOBINDATA := $(shell go-bindata.exe --version 2>nil)
else
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You should use [Forked **Snetsystems/salt**](https://github.com/snetsystems/salt
- Optionable Addon features.
- **_VMWare_ Infrastructure** Viewer.
- via **_VSphere_** API and **_Salt_**
- **_K8s Infrastructure_** Diagram & Viewer. (Pending in dev-k8s branch)
- **_K8s Infrastructure_** Diagram & Viewer.
- via customized `Salt Kuberetes` Module.
- **_AWS_** Instances Monitoring.
- SWAN Router & SDPlex(Oncue) Features.
Expand All @@ -54,6 +54,7 @@ You should use [Forked **Snetsystems/salt**](https://github.com/snetsystems/salt
<img src="./docs/images/infrastructure.png"/>
<img src="./docs/images/topology_map.png"/>
<img src="./docs/images/VMWare.png"/>
<img src="./docs/images/k8s.png"/>
<img src="./docs/images/AWS_01.png"/>
<img src="./docs/images/AWS_02.png"/>
<img src="./docs/images/AWS_03.png"/>
Expand Down
8 changes: 4 additions & 4 deletions backend/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ type Server struct {
KapacitorUsername string `long:"kapacitor-username" description:"Username of your Kapacitor instance" env:"KAPACITOR_USERNAME"`
KapacitorPassword string `long:"kapacitor-password" description:"Password of your Kapacitor instance" env:"KAPACITOR_PASSWORD"`

AddonURLs map[string]string `short:"u" long:"addon-url" description:"Support addon is [salt, swan, oncue, ipmi-secret-key]. Actually, this is a key-value extensional options, Not only url But for everywhere to be used the key-value extensional options. Multiple URL can be added by using multiple of the same flag with different 'name:url' values, or as an environment variable with comma-separated 'name:url' values. E.g. via flags: '--addon-url=salt:{url} --addon-url=swan:{url} --addon-url=ipmi-secret-key:{seed key}'. E.g. via environment variable: 'export ADDON_URL=salt:{url},swan:{url}'" env:"ADDON_URL" env-delim:","`
AddonTokens map[string]string `short:"k" long:"addon-tokens" description:"Support addon is [salt, swan]. API tokens to be used to the client for a request to addon API servers. Multiple tokens can be added by using multiple of the same flag with different 'name:token' values, or as an environment variable with comma-separated 'name:token' values. E.g. via flags: '--addon-tokens=salt:{token} --addon-tokens=swan:{token}'. E.g. via environment variable: 'export ADDON_TOKENS=salt:{token},swan:{token}'" env:"ADDON_TOKENS" env-delim:","`
AddonURLs map[string]string `short:"u" long:"addon-url" description:"Support addon is [salt, aws, k8s, swan, oncue, ipmi-secret-key]. Actually, this is a key-value extensional options, Not only url But for everywhere to be used the key-value extensional options. Multiple values can be added by using multiple of the same flag with different 'name:{value}', or as an environment variable with comma-separated 'name:{value}'. E.g. via flags: '-u=salt:{url} -u=aws:on[off] -u=k8s:on[off] -u=swan:{url} -u=oncue:{port number} -u=ipmi-secret-key:{seed key}'. E.g. via environment variable: 'export ADDON_URL=salt:{url},swan:{url}'" env:"ADDON_URL" env-delim:","`
AddonTokens map[string]string `short:"k" long:"addon-tokens" description:"The token associated with addon [salt, swan]. E.g. via flags: '-k=salt:{token} -k=swan:{token}'. E.g. via environment variable: 'export ADDON_TOKENS=salt:{token},swan:{token}'" env:"ADDON_TOKENS" env-delim:","`

Develop bool `short:"d" long:"develop" description:"Run server in develop mode."`
BoltPath string `short:"b" long:"bolt-path" description:"Full path to boltDB file (e.g. './cloudhub-v1.db')" env:"BOLT_PATH" default:"cloudhub-v1.db"`
Expand Down Expand Up @@ -125,8 +125,8 @@ type Server struct {

LoginAuthType string `long:"login-auth-type" description:"Login auth type (mix, oauth, basic)" env:"LOGIN_AUTH_TYPE" default:"oauth"`

PasswordPolicy string `long:"password-policy" description:"Password validity rules" env:"PASSWORD_POLICY"`
PasswordPolicyMessage string `long:"password-policy-message" description:"Password validity rule description" env:"PASSWORD_POLICY_MESSAGE"`
PasswordPolicy string `long:"password-policy" description:"Regular expression to validate password strength" env:"PASSWORD_POLICY"`
PasswordPolicyMessage string `long:"password-policy-message" description:"The description about password-policy set" env:"PASSWORD_POLICY_MESSAGE"`

MailSubject string `long:"mail-subject" description:"Mail subject" env:"MAIL_SUBJECT"`
MailBodyMessage string `long:"mail-body-message" description:"Mail body message" env:"MAIL_BODY_MESSAGE"`
Expand Down
Binary file added docs/images/k8s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "1.1.1",
"version": "1.2.0",
"private": true,
"description": "This is CloudHub's User interface made in React & Typescript",
"author": "Jack Kim",
Expand Down Expand Up @@ -40,16 +40,16 @@
"@types/react-dnd-html5-backend": "^2.1.9",
"@types/react-dom": "^16.0.7",
"@types/react-onclickoutside": "^6.7.3",
"@types/react-resizable": "^1.7.3",
"@types/react-router": "^3.0.15",
"@types/react-router-redux": "4",
"@types/react-resizable": "^1.7.3",
"@types/react-virtualized": "^9.18.3",
"@types/redux": "^3.3.1",
"@types/redux-auth-wrapper": "^2.0.9",
"@types/text-encoding": "^0.0.32",
"@types/uuid": "^3.4.3",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"@types/redux": "^3.3.1",
"autoprefixer": "^6.3.1",
"babel-core": "^7.0.0-bridge",
"babel-eslint": "^10.0.1",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/hosts/components/KubernetesContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class KubernetesContents extends PureComponent<Props, State> {
className={'hosts-table--th align--start'}
style={{width: HeaderWidth, padding: '4px 8px'}}
>
Label
Name
</div>
<TableBodyRowItem
title={
Expand All @@ -215,7 +215,7 @@ class KubernetesContents extends PureComponent<Props, State> {
</div>
</>
</TableBody>
<div className={'kubernetes-detail-title'}>Raw Data</div>
<div className={'kubernetes-detail-title'}>Details</div>
{activeTab === 'Basic' ? (
<KubernetesBasicsTable />
) : (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hosts/components/KubernetesHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class KubernetesHeader extends PureComponent<Props> {
icon={IconFont.Filter}
onClick={handleClickFilter}
shape={ButtonShape.Square}
titleText="Filter alert text"
titleText="Apply Filter"
/>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/hosts/containers/InventoryTopology.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,10 @@ class InventoryTopology extends PureComponent<Props, State> {
const {
links: {addons},
} = this.props
const findItem = _.find(addons, addon => addon.name === template.provider)
const findItem = _.find(
addons,
addon => addon.name === template.provider && addon.url === 'on'
)
const isFind = !_.isEmpty(findItem)

if (isFind) {
Expand Down
19 changes: 13 additions & 6 deletions frontend/src/hosts/containers/KubernetesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3261,12 +3261,19 @@ class KubernetesPage extends PureComponent<Props, State> {
}

private handlePinNode = (data: any) => {
const pinNode = this.parentNavigation(data)
const target = d3.select(`[data-name=${pinNode[0]}]`)
const isNull = _.isNull(_.flatMapDeep(target._groups)[0])
const isPin = isNull || target.classed('kubernetes-pin')

this.setState({pinNode: isPin ? [] : pinNode})
if (
data.depth === 3 ||
(data.depth === 2 &&
(data.data.type === 'CR' || data.data.type === 'CRB'))
) {
const pinNode = this.parentNavigation(data)
const target = d3.select(`[data-name=${pinNode[0]}]`)
const isNull = _.isNull(_.flatMapDeep(target._groups)[0])
const isPin = isNull || target.classed('kubernetes-pin')
this.setState({pinNode: isPin ? [] : pinNode})
} else {
this.setState({pinNode: []})
}
}

private debouncedResizeTrigger = _.debounce(() => {
Expand Down
13 changes: 4 additions & 9 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3421,15 +3421,10 @@ caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30001048.tgz#4f431c688cb6bc0435994dcbb8e565d004869d43"
integrity sha512-HqYsBIZlVARU5GDXPziXSFwFVpGx9KqCznr62iaey7bT2sqpx7/jI4B3PvbKguKi8kGeEannJ7WEPB5H71rjFQ==

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043:
version "1.0.30001208"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz"
integrity sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==

caniuse-lite@^1.0.30001208:
version "1.0.30001214"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001214.tgz#70f153c78223515c6d37a9fde6cd69250da9d872"
integrity sha512-O2/SCpuaU3eASWVaesQirZv1MSjUNOvmugaD8zNSJqw6Vv5SGwoOpA9LJs3pNPfM745nxqPvfZY3MQKY4AKHYg==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001208:
version "1.0.30001286"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz"
integrity sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==

capture-exit@^2.0.0:
version "2.0.0"
Expand Down

0 comments on commit 45edeef

Please sign in to comment.