forked from dromara/Jpom
-
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.
- Loading branch information
Showing
17 changed files
with
674 additions
and
496 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
34 changes: 0 additions & 34 deletions
34
modules/agent/src/main/java/io/jpom/model/system/WorkspaceEnvVarModel.java
This file was deleted.
Oops, something went wrong.
79 changes: 65 additions & 14 deletions
79
modules/agent/src/main/java/io/jpom/model/system/WorkspaceModel.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 |
---|---|---|
@@ -1,29 +1,80 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2019 Code Technology Studio | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
* this software and associated documentation files (the "Software"), to deal in | ||
* the Software without restriction, including without limitation the rights to | ||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
* the Software, and to permit persons to whom the Software is furnished to do so, | ||
* subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
package io.jpom.model.system; | ||
|
||
import io.jpom.model.BaseJsonModel; | ||
import io.jpom.model.BaseModel; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.util.List; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* @author lidaofu | ||
* @since 2022/3/8 | ||
*/ | ||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
public class WorkspaceModel extends BaseModel { | ||
|
||
private String workspaceId; | ||
private Map<String, WorkspaceEnvVarModel> varData; | ||
|
||
private List<WorkspaceEnvVarModel> list; | ||
|
||
public String getWorkspaceId() { | ||
return workspaceId; | ||
/** | ||
* 更新变量 | ||
* | ||
* @param name 变量名称 | ||
* @param workspaceEnvVarModel 变量信息 | ||
*/ | ||
public void put(String name, WorkspaceEnvVarModel workspaceEnvVarModel) { | ||
if (varData == null) { | ||
varData = new HashMap<>(2); | ||
} | ||
varData.put(name, workspaceEnvVarModel); | ||
} | ||
|
||
public void setWorkspaceId(String workspaceId) { | ||
this.workspaceId = workspaceId; | ||
/** | ||
* 删除 变量 | ||
* | ||
* @param name 名称 | ||
*/ | ||
public void remove(String name) { | ||
if (varData == null) { | ||
return; | ||
} | ||
varData.remove(name); | ||
} | ||
|
||
public List<WorkspaceEnvVarModel> getList() { | ||
return list; | ||
} | ||
/** | ||
* @author lidaofu | ||
* @since 2022/3/8 | ||
*/ | ||
@Data | ||
public static class WorkspaceEnvVarModel { | ||
|
||
private String name; | ||
|
||
private String value; | ||
|
||
public void setList(List<WorkspaceEnvVarModel> list) { | ||
this.list = list; | ||
private String description; | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
modules/common/src/main/java/io/jpom/controller/RobotsController.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
Oops, something went wrong.