-
Notifications
You must be signed in to change notification settings - Fork 192
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 #649 from WeBankPartners/dev
Dev merge to Master
- Loading branch information
Showing
167 changed files
with
14,251 additions
and
13,019 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,4 @@ npm-debug.log* | |
yarn-debug.log* | ||
yarn-error.log* | ||
/target/ | ||
*.yml |
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
33 changes: 33 additions & 0 deletions
33
cmdb-core/src/main/java/com/webank/cmdb/constant/AggregationFuction.java
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,33 @@ | ||
package com.webank.cmdb.constant; | ||
|
||
public enum AggregationFuction { | ||
None("none"), MAX("max"), MIN("min"), AVG("avg"), SUM("sum"), COUNT("count"); | ||
|
||
private String code; | ||
|
||
private AggregationFuction(String code) { | ||
this.code = code; | ||
} | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
|
||
/** | ||
* Get FilterOperator from code | ||
* | ||
* @param code The input FilterOperator code | ||
* @return The matching enum value. None if there is not matching enum value | ||
*/ | ||
static public AggregationFuction fromCode(String code) { | ||
for (AggregationFuction operator : values()) { | ||
if (None.equals(operator)) | ||
continue; | ||
|
||
if (operator.getCode().equals(code)) { | ||
return operator; | ||
} | ||
} | ||
return None; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
cmdb-core/src/main/java/com/webank/cmdb/constant/AuthenticationType.java
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,27 @@ | ||
package com.webank.cmdb.constant; | ||
|
||
public enum AuthenticationType { | ||
NONE("NONE"), lOCAL("LOCAL"), CAS("CAS"), PLATFORM_AUTH("PLATFORM-AUTH"); | ||
|
||
private String code; | ||
|
||
private AuthenticationType(String code) { | ||
this.code = code; | ||
} | ||
|
||
public String getCode() { | ||
return code; | ||
} | ||
|
||
static public AuthenticationType fromCode(String code) { | ||
for (AuthenticationType value : values()) { | ||
if (NONE.equals(value)) | ||
continue; | ||
|
||
if (value.getCode().equals(code)) { | ||
return value; | ||
} | ||
} | ||
return NONE; | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
cmdb-core/src/main/java/com/webank/cmdb/constant/FilterOperator.java
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
Oops, something went wrong.