-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #259 from dRAGon-Okinawa/staging
UI for Silo Management (#258)
- Loading branch information
Showing
55 changed files
with
1,251 additions
and
599 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
gradle | ||
.gradle | ||
bin | ||
.vscode | ||
.DS_Store | ||
*.class | ||
.pnpm-store | ||
.env.local | ||
.env.local | ||
.vscode/settings.json |
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,21 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "Run Current File", | ||
"request": "launch", | ||
"mainClass": "${file}" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "Launch dRAGon Application", | ||
"request": "launch", | ||
"mainClass": "ai.dragon.DragonApplication", | ||
"projectName": "backend" | ||
} | ||
] | ||
} |
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,67 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Start Backend", | ||
"type": "shell", | ||
"command": "gradle bootRun -x :frontend:pnpmBuild -x :backend:copyWebApp", | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "new", | ||
"group": "groupA" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Continuous Backend Build", | ||
"type": "shell", | ||
"command": "gradle backend:bootJar -continuous -xtest -x :frontend:pnpmBuild -x :backend:copyWebApp", | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "new", | ||
"group": "groupA" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Start Frontend", | ||
"type": "shell", | ||
"command": "pnpm dev", | ||
"options": { | ||
"cwd": "${workspaceFolder}/frontend" | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "always", | ||
"focus": false, | ||
"panel": "new", | ||
"group": "groupA" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Launch dRAGon Development Mode", | ||
"dependsOn": [ | ||
"Start Backend", | ||
"Continuous Backend Build", | ||
"Start Frontend" | ||
], | ||
"dependsOrder": "parallel", | ||
"group": { | ||
"kind": "none", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ai.dragon.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.lang.NonNull; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class WebConfig implements WebMvcConfigurer { | ||
@Override | ||
public void addCorsMappings(@NonNull CorsRegistry registry) { | ||
// Allow CORS requests : | ||
registry | ||
.addMapping("/**") | ||
.allowedOrigins("*") | ||
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS") | ||
.allowedHeaders("*"); | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
backend/src/main/java/ai/dragon/dto/api/DataTableApiResponse.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,24 @@ | ||
package ai.dragon.dto.api; | ||
|
||
import ai.dragon.dto.api.backend.PagerTableApiData; | ||
import ai.dragon.repository.util.Pager; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Builder | ||
@Data | ||
public class DataTableApiResponse implements GenericApiResponse { | ||
@Builder.Default | ||
private TableApiData data = null; | ||
|
||
@Builder.Default | ||
private String code = "0000"; | ||
|
||
@Builder.Default | ||
private String msg = "OK"; | ||
|
||
public static DataTableApiResponse fromPager(Pager<?> pager) { | ||
TableApiData data = new PagerTableApiData(pager); | ||
return DataTableApiResponse.builder().data(data).build(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
backend/src/main/java/ai/dragon/dto/api/GenericApiResponse.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,7 +1,7 @@ | ||
package ai.dragon.dto.api; | ||
|
||
public interface GenericApiResponse { | ||
public GenericApiData getData(); | ||
public Object getData(); | ||
public String getCode(); | ||
public String getMsg(); | ||
} |
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.