[DEV] update edit serie
This commit is contained in:
parent
8914fdc8d9
commit
f49e221ac7
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_14">
|
||||
<output url="file://$MODULE_DIR$/out/maven/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/out/maven/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test/src" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/out/maven" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-multipart:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jvnet.mimepull:mimepull:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.inject:jersey-hk2:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-http:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:jakarta.inject:2.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http-server:2.4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-http:2.4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.grizzly:grizzly-framework:2.4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.ws.rs:jakarta.ws.rs-api:2.1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2:2.32" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: jakarta.servlet:jakarta.servlet-api:4.0.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.glassfish.jersey.test-framework:jersey-test-framework-core:2.32" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.glassfish.jersey.containers:jersey-container-servlet-core:2.32" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.glassfish.jersey.containers:jersey-container-grizzly2-servlet:2.32" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.glassfish.jersey.containers:jersey-container-servlet:2.32" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.glassfish.grizzly:grizzly-http-servlet:2.4.4" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.45" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.32" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.10.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jetbrains:annotations:20.1.0" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -21,7 +21,7 @@ public class ConfigVariable {
|
||||
public static String getRestOAuthServer() {
|
||||
String out = System.getenv("org.kar.karideo.rest.oauth");
|
||||
if (out == null) {
|
||||
return "http://localhost:17080/oauth/api/";
|
||||
return "http://localhost:17080/karauth/api/";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
@ -37,7 +37,7 @@ public class ConfigVariable {
|
||||
public static String getDBPort() {
|
||||
String out = System.getenv("org.kar.karideo.db.port");
|
||||
if (out == null) {
|
||||
return "3306";
|
||||
return "15306";
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
@ -413,6 +413,9 @@ public class NodeInterface {
|
||||
if (!root.path("description").isMissingNode()) {
|
||||
query += ", `description` = ? ";
|
||||
}
|
||||
if (!root.path("parent_id").isMissingNode()) {
|
||||
query += ", `parent_id` = ? ";
|
||||
}
|
||||
query += " WHERE `id` = ?";
|
||||
DBEntry entry = new DBEntry(WebLauncher.dbConfig);
|
||||
try {
|
||||
@ -432,6 +435,13 @@ public class NodeInterface {
|
||||
ps.setString(iii++, root.path("description").asText());
|
||||
}
|
||||
}
|
||||
if (!root.path("parent_id").isMissingNode()) {
|
||||
if (root.path("parent_id").isNull()) {
|
||||
ps.setNull(iii++, Types.BIGINT);
|
||||
} else {
|
||||
ps.setLong(iii++, root.path("parent_id").asLong());
|
||||
}
|
||||
}
|
||||
ps.setLong(iii++, id);
|
||||
System.out.println(" request : " + ps.toString());
|
||||
ps.executeUpdate();
|
||||
|
@ -60,9 +60,12 @@ public class SeriesResource {
|
||||
) {
|
||||
return NodeInterface.uploadCover(typeInNode, id, file_name, fileInputStream, fileMetaData);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{id}/rm_cover/{cover_id}")
|
||||
public Response removeCover(@PathParam("id") Long nodeId, @PathParam("cover_id") Long coverId) {
|
||||
return NodeInterface.removeCover(typeInNode, nodeId, coverId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
1
front/.gitignore
vendored
Normal file
1
front/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/node_modules/
|
@ -3,6 +3,17 @@
|
||||
<div class="title">
|
||||
Edit series
|
||||
</div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Type:
|
||||
</div>
|
||||
<div class="input">
|
||||
<select [ngModel]="type_id"
|
||||
(ngModelChange)="onChangeType($event)">
|
||||
<option *ngFor="let element of listType" [ngValue]="element.value">{{element.label}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="request_raw">
|
||||
<div class="label">
|
||||
Name:
|
||||
|
@ -11,6 +11,7 @@ import { fadeInAnimation } from '../../_animations/index';
|
||||
|
||||
import { SeriesService } from '../../service/series';
|
||||
import { DataService } from '../../service/data';
|
||||
import { TypeService } from '../../service/type';
|
||||
import { ArianeService } from '../../service/ariane';
|
||||
import { UploadProgress } from '../../popin/upload-progress/upload-progress';
|
||||
import { PopInService } from '../../service/popin';
|
||||
@ -35,18 +36,24 @@ export class ElementList {
|
||||
export class SeriesEditScene implements OnInit {
|
||||
id_series:number = -1;
|
||||
|
||||
error:string = ""
|
||||
|
||||
name:string = ""
|
||||
description:string = ""
|
||||
error:string = "";
|
||||
|
||||
type_id:number = null;
|
||||
name:string = "";
|
||||
description:string = "";
|
||||
coverFile:File;
|
||||
upload_file_value:string = ""
|
||||
upload_file_value:string = "";
|
||||
selectedFiles:FileList;
|
||||
|
||||
covers_display:Array<any> = [];
|
||||
// section tha define the upload value to display in the pop-in of upload
|
||||
public upload:UploadProgress = new UploadProgress();
|
||||
|
||||
|
||||
listType: ElementList[] = [
|
||||
{value: undefined, label: '---'},
|
||||
];
|
||||
|
||||
// --------------- confirm section ------------------
|
||||
public confirmDeleteComment:string = null;
|
||||
public confirmDeleteImageUrl:string = null;
|
||||
@ -68,6 +75,7 @@ export class SeriesEditScene implements OnInit {
|
||||
private router: Router,
|
||||
private locate: Location,
|
||||
private dataService: DataService,
|
||||
private typeService: TypeService,
|
||||
private seriesService: SeriesService,
|
||||
private arianeService: ArianeService,
|
||||
private popInService: PopInService) {
|
||||
@ -78,10 +86,22 @@ export class SeriesEditScene implements OnInit {
|
||||
this.arianeService.updateManual(this.route.snapshot.paramMap);
|
||||
this.id_series = this.arianeService.getSeriesId();
|
||||
let self = this;
|
||||
this.listType = [{value: null, label: '---'}];
|
||||
|
||||
this.typeService.getData()
|
||||
.then(function(response2) {
|
||||
for(let iii= 0; iii < response2.length; iii++) {
|
||||
self.listType.push({value: response2[iii].id, label: response2[iii].name});
|
||||
}
|
||||
}).catch(function(response2) {
|
||||
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
||||
});
|
||||
|
||||
this.seriesService.get(this.id_series)
|
||||
.then(function(response) {
|
||||
//console.log("get response of video : " + JSON.stringify(response, null, 2));
|
||||
self.name = response.name;
|
||||
self.type_id = response.parent_id;
|
||||
self.description = response.description;
|
||||
self.updateCoverList(response.covers);
|
||||
//console.log("covers_list : " + JSON.stringify(self.covers_display, null, 2));
|
||||
@ -114,10 +134,19 @@ export class SeriesEditScene implements OnInit {
|
||||
onDescription(_value:any):void {
|
||||
this.description = _value;
|
||||
}
|
||||
|
||||
onChangeType(_value:any):void {
|
||||
console.log("Change requested of type ... " + _value);
|
||||
this.type_id = _value;
|
||||
if (this.type_id == undefined) {
|
||||
this.type_id = null;
|
||||
}
|
||||
}
|
||||
|
||||
sendValues():void {
|
||||
console.log("send new values....");
|
||||
let data = {
|
||||
"parent_id": this.type_id,
|
||||
"name": this.name,
|
||||
"description": this.description
|
||||
};
|
||||
|
@ -8,7 +8,9 @@ export const environment = {
|
||||
// URL of development API
|
||||
//apiUrl: 'http://localhost:15080',
|
||||
apiUrl: 'http://localhost:18080/karideo/api',
|
||||
//apiUrl: 'http://192.168.1.156/karideo/api',
|
||||
apiOAuthUrl: 'http://localhost:17080/oauth/api',
|
||||
//apiOAuthUrl: 'http://192.168.1.156/oauth/api',
|
||||
frontBaseUrl: '',
|
||||
//apiMode: "QUERRY"
|
||||
apiMode: "REWRITE"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue
Block a user