[DEV] work on uuid conversion

This commit is contained in:
Edouard DUPIN 2024-02-27 08:01:42 +01:00
parent 48ad545da1
commit 5e8b244ebd
15 changed files with 262 additions and 171 deletions

View File

@ -20,7 +20,7 @@
<dependency> <dependency>
<groupId>kangaroo-and-rabbit</groupId> <groupId>kangaroo-and-rabbit</groupId>
<artifactId>archidata</artifactId> <artifactId>archidata</artifactId>
<version>0.6.1</version> <version>0.6.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>

View File

@ -32,6 +32,7 @@ import org.kar.karideo.migration.Initialization;
import org.kar.karideo.migration.Migration20230810; import org.kar.karideo.migration.Migration20230810;
import org.kar.karideo.migration.Migration20231015; import org.kar.karideo.migration.Migration20231015;
import org.kar.karideo.migration.Migration20231126; import org.kar.karideo.migration.Migration20231126;
import org.kar.karideo.migration.Migration20240226;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -60,7 +61,7 @@ public class WebLauncher {
migrationEngine.add(new Migration20230810()); migrationEngine.add(new Migration20230810());
migrationEngine.add(new Migration20231015()); migrationEngine.add(new Migration20231015());
migrationEngine.add(new Migration20231126()); migrationEngine.add(new Migration20231126());
//migrationEngine.add(new Migration20231126()); migrationEngine.add(new Migration20240226());
WebLauncher.LOGGER.info("Migrate the DB [START]"); WebLauncher.LOGGER.info("Migrate the DB [START]");
migrationEngine.migrateWaitAdmin(GlobalConfiguration.dbConfig); migrationEngine.migrateWaitAdmin(GlobalConfiguration.dbConfig);
WebLauncher.LOGGER.info("Migrate the DB [STOP]"); WebLauncher.LOGGER.info("Migrate the DB [STOP]");

View File

@ -2,6 +2,7 @@ package org.kar.karideo.api;
import java.io.InputStream; import java.io.InputStream;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
@ -98,7 +99,7 @@ public class SeasonResource {
return Response.ok(DataAccess.get(Season.class, id)).build(); return Response.ok(DataAccess.get(Season.class, id)).build();
} }
public static Season getOrCreate(final String name, final Long seriesId) { public static Season getOrCreate(final String name, final UUID seriesId) {
try { try {
Season out = DataAccess.getWhere(Season.class, new Condition(new QueryAnd(new QueryCondition("name", "=", name), new QueryCondition("parentId", "=", seriesId)))); Season out = DataAccess.getWhere(Season.class, new Condition(new QueryAnd(new QueryCondition("name", "=", name), new QueryCondition("parentId", "=", seriesId))));
if (out == null) { if (out == null) {

View File

@ -2,6 +2,7 @@ package org.kar.karideo.api;
import java.io.InputStream; import java.io.InputStream;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
@ -98,7 +99,7 @@ public class SeriesResource {
return Response.ok(DataAccess.get(Series.class, id)).build(); return Response.ok(DataAccess.get(Series.class, id)).build();
} }
public static Series getOrCreate(final String name, final Long typeId) { public static Series getOrCreate(final String name, final UUID typeId) {
try { try {
Series out = DataAccess.getWhere(Series.class, new Condition(new QueryAnd(new QueryCondition("name", "=", name), new QueryCondition("parentId", "=", typeId)))); Series out = DataAccess.getWhere(Series.class, new Condition(new QueryAnd(new QueryCondition("name", "=", name), new QueryCondition("parentId", "=", typeId))));
if (out == null) { if (out == null) {

View File

@ -4,6 +4,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam; import org.glassfish.jersey.media.multipart.FormDataParam;
@ -200,7 +201,7 @@ public class VideoResource {
@Path("{id}/add_cover") @Path("{id}/add_cover")
@RolesAllowed("ADMIN") @RolesAllowed("ADMIN")
@Consumes({ MediaType.MULTIPART_FORM_DATA }) @Consumes({ MediaType.MULTIPART_FORM_DATA })
public Response uploadCover(@PathParam("id") final Long id, @FormDataParam("fileName") final String fileName, @FormDataParam("file") final InputStream fileInputStream, public Response uploadCover(@PathParam("id") final UUID id, @FormDataParam("fileName") final String fileName, @FormDataParam("file") final InputStream fileInputStream,
@FormDataParam("file") final FormDataContentDisposition fileMetaData) { @FormDataParam("file") final FormDataContentDisposition fileMetaData) {
return DataTools.uploadCover(Media.class, id, fileName, fileInputStream, fileMetaData); return DataTools.uploadCover(Media.class, id, fileName, fileInputStream, fileMetaData);
} }
@ -208,7 +209,7 @@ public class VideoResource {
@GET @GET
@Path("{id}/rm_cover/{coverId}") @Path("{id}/rm_cover/{coverId}")
@RolesAllowed("ADMIN") @RolesAllowed("ADMIN")
public Response removeCover(@PathParam("id") final Long id, @PathParam("coverId") final Long coverId) throws Exception { public Response removeCover(@PathParam("id") final UUID id, @PathParam("coverId") final UUID coverId) throws Exception {
AddOnManyToMany.removeLink(Media.class, id, "cover", coverId); AddOnManyToMany.removeLink(Media.class, id, "cover", coverId);
return Response.ok(DataAccess.get(Media.class, id)).build(); return Response.ok(DataAccess.get(Media.class, id)).build();
} }
@ -216,7 +217,7 @@ public class VideoResource {
@DELETE @DELETE
@Path("{id}") @Path("{id}")
@RolesAllowed("ADMIN") @RolesAllowed("ADMIN")
public Response delete(@PathParam("id") final Long id) throws Exception { public Response delete(@PathParam("id") final UUID id) throws Exception {
DataAccess.delete(Media.class, id); DataAccess.delete(Media.class, id);
return Response.ok().build(); return Response.ok().build();
} }

View File

@ -34,16 +34,16 @@ public class Initialization extends MigrationSqlStep {
addAction(""" addAction("""
INSERT INTO `type` (`id`, `name`, `description`) VALUES INSERT INTO `type` (`id`, `name`, `description`) VALUES
(1, 'Documentary', 'Documentary (animals, space, earth...)'), (UUID_TO_BIN('15237fd7-d4ee-11ee-a8dd-02420a030203'), 'Documentary', 'Documentary (animals, space, earth...)'),
(2, 'Movie', 'Movie with real humans (film)'), (UUID_TO_BIN('553146c1-d4ee-11ee-a8dd-02420a030203'), 'Movie', 'Movie with real humans (film)'),
(3, 'Animation', 'Animation movies (film)'), (UUID_TO_BIN('59c430a3-d4ee-11ee-a8dd-02420a030203'), 'Animation', 'Animation movies (film)'),
(4, 'Short movie', 'Small movies (less 2 minutes)'), (UUID_TO_BIN('5cd619e3-d4ee-11ee-a8dd-02420a030203'), 'Short movie', 'Small movies (less 2 minutes)'),
(5, 'TV show', 'TV show for old peoples'), (UUID_TO_BIN('5fbbf085-d4ee-11ee-a8dd-02420a030203'), 'TV show', 'TV show for old peoples'),
(6, 'Animation TV show', 'TV show for young peoples'), (UUID_TO_BIN('66dcb6ba-d4ee-11ee-a8dd-02420a030203'), 'Animation TV show', 'TV show for young peoples'),
(7, 'Theater', 'Theater play'), (UUID_TO_BIN('69ee5c15-d4ee-11ee-a8dd-02420a030203'), 'Theater', 'Theater play'),
(8, 'One man show', 'Recorded stand up'), (UUID_TO_BIN('6ce72530-d4ee-11ee-a8dd-02420a030203'), 'One man show', 'Recorded stand up'),
(9, 'Concert', 'Recorded concert'), (UUID_TO_BIN('6ff1691a-d4ee-11ee-a8dd-02420a030203'), 'Concert', 'Recorded concert'),
(10, 'Opera', 'Recorded opera'); (UUID_TO_BIN('730815ef-d4ee-11ee-a8dd-02420a030203'), 'Opera', 'Recorded opera');
"""); """);
// set start increment element to permit to add after default elements // set start increment element to permit to add after default elements
addAction(""" addAction("""

View File

@ -0,0 +1,44 @@
package org.kar.karideo.migration;
import java.util.List;
import java.util.UUID;
import org.kar.archidata.dataAccess.DataAccess;
import org.kar.archidata.dataAccess.options.AccessDeletedItems;
import org.kar.archidata.dataAccess.options.OverrideTableName;
import org.kar.archidata.migration.MigrationSqlStep;
import org.kar.karideo.migration.model.UUIDConversion;
public class Migration20240226 extends MigrationSqlStep {
public static final int KARSO_INITIALISATION_ID = 1;
@Override
public String getName() {
return "migration-2024-02-26: convert base with UUID";
}
public Migration20240226() {
}
@Override
public void generateStep() throws Exception {
// update migration update (last one)
addAction("""
ALTER TABLE `media` ADD `uuid` binary(16) AFTER `id`;
""");
addAction(() -> {
final List<UUIDConversion> medias = DataAccess.gets(UUIDConversion.class, new AccessDeletedItems(), new OverrideTableName("media"));
for (final UUIDConversion elem: medias) {
elem.uuid = UUID.randomUUID();
}
for (final UUIDConversion elem: medias) {
DataAccess.update(elem, elem.id, List.of("uuid"), new OverrideTableName("media"));
}
});
}
}

View File

@ -0,0 +1,11 @@
package org.kar.karideo.migration.model;
import java.util.UUID;
import jakarta.persistence.Id;
public class UUIDConversion {
@Id
public Long id = null;
public UUID uuid = null;
}

View File

@ -1,16 +1,17 @@
package org.kar.karideo.model; package org.kar.karideo.model;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.kar.archidata.annotation.DataJson;
import org.kar.archidata.model.Data; import org.kar.archidata.model.Data;
import org.kar.archidata.model.GenericDataSoftDelete; import org.kar.archidata.model.UUIDGenericDataSoftDelete;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.persistence.Column; import jakarta.persistence.Column;
import jakarta.persistence.Entity; import jakarta.persistence.Entity;
import jakarta.persistence.FetchType; import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table; import jakarta.persistence.Table;
@ -19,7 +20,7 @@ import jakarta.persistence.Table;
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
//@SQLDelete(sql = "UPDATE table_product SET deleted = true WHERE id=?") //@SQLDelete(sql = "UPDATE table_product SET deleted = true WHERE id=?")
//@Where(clause = "deleted=false") //@Where(clause = "deleted=false")
public class Media extends GenericDataSoftDelete { public class Media extends UUIDGenericDataSoftDelete {
// Name of the media (this represent the title) // Name of the media (this represent the title)
@Column(nullable = false, length = 0) @Column(nullable = false, length = 0)
public String name; public String name;
@ -29,16 +30,16 @@ public class Media extends GenericDataSoftDelete {
// Foreign Key Id of the data // Foreign Key Id of the data
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Data.class) @ManyToOne(fetch = FetchType.LAZY, targetEntity = Data.class)
@Column(nullable = false) @Column(nullable = false)
public Long dataId; public UUID dataId;
// Type of the media") // Type of the media")
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Type.class) @ManyToOne(fetch = FetchType.LAZY, targetEntity = Type.class)
public Long typeId; public UUID typeId;
// Series reference of the media // Series reference of the media
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Series.class) @ManyToOne(fetch = FetchType.LAZY, targetEntity = Series.class)
public Long seriesId; public UUID seriesId;
// Saison reference of the media // Saison reference of the media
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Season.class) @ManyToOne(fetch = FetchType.LAZY, targetEntity = Season.class)
public Long seasonId; public UUID seasonId;
// Episide Id // Episide Id
public Integer episode; public Integer episode;
// ") // ")
@ -48,6 +49,6 @@ public class Media extends GenericDataSoftDelete {
// Limitation Age of the media // Limitation Age of the media
public Integer ageLimit; public Integer ageLimit;
// List of Id of the specific covers // List of Id of the specific covers
@ManyToMany(fetch = FetchType.LAZY, targetEntity = Data.class) @DataJson()
public List<Long> covers = null; public List<UUID> covers = null;
} }

View File

@ -1,24 +1,24 @@
package org.kar.karideo.model; package org.kar.karideo.model;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.kar.archidata.annotation.DataIfNotExists; import org.kar.archidata.annotation.DataIfNotExists;
import org.kar.archidata.model.Data; import org.kar.archidata.annotation.DataJson;
import org.kar.archidata.model.GenericDataSoftDelete; import org.kar.archidata.model.UUIDGenericDataSoftDelete;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column; import jakarta.persistence.Column;
import jakarta.persistence.FetchType; import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table; import jakarta.persistence.Table;
@Table(name = "season") @Table(name = "season")
@DataIfNotExists @DataIfNotExists
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class Season extends GenericDataSoftDelete { public class Season extends UUIDGenericDataSoftDelete {
@Column(nullable = false, length = 0) @Column(nullable = false, length = 0)
@Schema(description = "Name of the media (this represent the title)") @Schema(description = "Name of the media (this represent the title)")
public String name; public String name;
@ -28,8 +28,8 @@ public class Season extends GenericDataSoftDelete {
@Column(nullable = false) @Column(nullable = false)
@Schema(description = "series parent ID") @Schema(description = "series parent ID")
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Series.class) @ManyToOne(fetch = FetchType.LAZY, targetEntity = Series.class)
public Long parentId; public UUID parentId;
@Schema(description = "List of Id of the sopecific covers") @Schema(description = "List of Id of the sopecific covers")
@ManyToMany(fetch = FetchType.LAZY, targetEntity = Data.class) @DataJson()
public List<Long> covers = null; public List<UUID> covers = null;
} }

View File

@ -1,24 +1,24 @@
package org.kar.karideo.model; package org.kar.karideo.model;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.kar.archidata.annotation.DataIfNotExists; import org.kar.archidata.annotation.DataIfNotExists;
import org.kar.archidata.model.Data; import org.kar.archidata.annotation.DataJson;
import org.kar.archidata.model.GenericDataSoftDelete; import org.kar.archidata.model.UUIDGenericDataSoftDelete;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column; import jakarta.persistence.Column;
import jakarta.persistence.FetchType; import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.ManyToOne; import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table; import jakarta.persistence.Table;
@Table(name = "series") @Table(name = "series")
@DataIfNotExists @DataIfNotExists
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class Series extends GenericDataSoftDelete { public class Series extends UUIDGenericDataSoftDelete {
@Column(nullable = false, length = 0) @Column(nullable = false, length = 0)
@Schema(description = "Name of the media (this represent the title)") @Schema(description = "Name of the media (this represent the title)")
public String name; public String name;
@ -28,8 +28,8 @@ public class Series extends GenericDataSoftDelete {
@Column(nullable = false) @Column(nullable = false)
@Schema(description = "series parent ID") @Schema(description = "series parent ID")
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Type.class) @ManyToOne(fetch = FetchType.LAZY, targetEntity = Type.class)
public Long parentId; public UUID parentId;
@Schema(description = "List of Id of the sopecific covers") @Schema(description = "List of Id of the sopecific covers")
@ManyToMany(fetch = FetchType.LAZY, targetEntity = Data.class) @DataJson()
public List<Long> covers = null; public List<UUID> covers = null;
} }

View File

@ -1,23 +1,22 @@
package org.kar.karideo.model; package org.kar.karideo.model;
import java.util.List; import java.util.List;
import java.util.UUID;
import org.kar.archidata.annotation.DataIfNotExists; import org.kar.archidata.annotation.DataIfNotExists;
import org.kar.archidata.model.Data; import org.kar.archidata.annotation.DataJson;
import org.kar.archidata.model.GenericDataSoftDelete; import org.kar.archidata.model.UUIDGenericDataSoftDelete;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column; import jakarta.persistence.Column;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;
import jakarta.persistence.Table; import jakarta.persistence.Table;
@Table(name = "type") @Table(name = "type")
@DataIfNotExists @DataIfNotExists
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class Type extends GenericDataSoftDelete { public class Type extends UUIDGenericDataSoftDelete {
@Column(nullable = false, length = 0) @Column(nullable = false, length = 0)
@Schema(description = "Name of the media (this represent the title)") @Schema(description = "Name of the media (this represent the title)")
public String name; public String name;
@ -25,6 +24,6 @@ public class Type extends GenericDataSoftDelete {
@Schema(description = "Description of the media") @Schema(description = "Description of the media")
public String description; public String description;
@Schema(description = "List of Id of the sopecific covers") @Schema(description = "List of Id of the sopecific covers")
@ManyToMany(fetch = FetchType.LAZY, targetEntity = Data.class) @DataJson()
public List<Long> covers = null; public List<UUID> covers = null;
} }

View File

@ -1,88 +1,112 @@
{ {
"$schema" : "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version" : 1, "version": 1,
"newProjectRoot" : "projects", "newProjectRoot": "projects",
"defaultProject" : "karideo", "defaultProject": "karideo",
"projects" : { "projects": {
"karideo" : { "karideo": {
"root" : "", "root": "",
"sourceRoot" : "src", "sourceRoot": "src",
"projectType" : "application", "projectType": "application",
"architect" : { "architect": {
"build" : { "build": {
"builder" : "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options" : { "options": {
"outputPath" : "dist", "outputPath": "dist",
"index" : "src/index.html", "index": "src/index.html",
"main" : "src/main.ts", "main": "src/main.ts",
"tsConfig" : "src/tsconfig.app.json", "tsConfig": "src/tsconfig.app.json",
"polyfills" : "src/polyfills.ts", "polyfills": [
"assets" : [ "src/assets", "src/favicon.ico" ], "zone.js"
"styles" : [ "src/styles.less", "src/generic_page.less", "src/theme.color.blue.less", "src/theme.checkbox.less", "src/theme.modal.less" ], ],
"scripts" : [ ] "assets": [
"src/assets",
"src/favicon.ico"
],
"styles": [
"src/styles.less",
"src/generic_page.less",
"src/theme.color.blue.less",
"src/theme.checkbox.less",
"src/theme.modal.less"
],
"scripts": []
}, },
"configurations" : { "configurations": {
"production" : { "production": {
"optimization" : true, "optimization": true,
"outputHashing" : "all", "outputHashing": "all",
"sourceMap" : false, "sourceMap": false,
"namedChunks" : false, "namedChunks": false,
"aot" : true, "aot": true,
"extractLicenses" : true, "extractLicenses": true,
"vendorChunk" : false, "vendorChunk": false,
"buildOptimizer" : true, "buildOptimizer": true,
"fileReplacements" : [ { "fileReplacements": [
"replace" : "src/environments/environment.ts", {
"with" : "src/environments/environment.prod.ts" "replace": "src/environments/environment.ts",
} ] "with": "src/environments/environment.prod.ts"
}
]
}, },
"develop" : { "develop": {
"optimization" : false, "optimization": false,
"outputHashing" : "none", "outputHashing": "none",
"sourceMap" : true, "sourceMap": true,
"namedChunks" : true, "namedChunks": true,
"aot" : true, "aot": true,
"extractLicenses" : true, "extractLicenses": true,
"vendorChunk" : true, "vendorChunk": true,
"buildOptimizer" : false "buildOptimizer": false
} }
} }
}, },
"serve" : { "serve": {
"builder" : "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options" : { "options": {
"browserTarget" : "karideo:build" "browserTarget": "karideo:build"
}, },
"configurations" : { "configurations": {
"production" : { "production": {
"browserTarget" : "karideo:build:production" "browserTarget": "karideo:build:production"
}, },
"develop" : { "develop": {
"browserTarget" : "karideo:build:develop" "browserTarget": "karideo:build:develop"
} }
} }
}, },
"extract-i18n" : { "extract-i18n": {
"builder" : "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options" : { "options": {
"browserTarget" : "karideo:build" "browserTarget": "karideo:build"
} }
}, },
"test" : { "test": {
"builder" : "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options" : { "options": {
"main" : "src/test.ts", "main": "src/test.ts",
"karmaConfig" : "./karma.conf.js", "karmaConfig": "./karma.conf.js",
"polyfills" : "src/polyfills.ts", "polyfills": [
"tsConfig" : "src/tsconfig.spec.json", "zone.js"
"scripts" : [ ], ],
"styles" : [ "src/styles.less", "src/generic_page.less", "src/theme.color.blue.less", "src/theme.checkbox.less", "src/theme.modal.less" ], "tsConfig": "src/tsconfig.spec.json",
"assets" : [ "src/assets", "src/favicon.ico" ] "scripts": [],
"styles": [
"src/styles.less",
"src/generic_page.less",
"src/theme.color.blue.less",
"src/theme.checkbox.less",
"src/theme.modal.less"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
} }
}, },
"lint" : { "lint": {
"builder" : "@angular-eslint/builder:lint", "builder": "@angular-eslint/builder:lint",
"options" : { "options": {
"fix": true, "fix": true,
"eslintConfig": ".eslintrc.js", "eslintConfig": ".eslintrc.js",
"lintFilePatterns": [ "lintFilePatterns": [
@ -91,44 +115,53 @@
] ]
} }
}, },
"TTTTTTlint" : { "TTTTTTlint": {
"builder" : "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options" : { "options": {
"tsConfig" : [ "src/tsconfig.app.json", "src/tsconfig.spec.json" ], "tsConfig": [
"exclude" : [ "**/node_modules/**" ] "src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
} }
} }
} }
}, },
"karideo-e2e" : { "karideo-e2e": {
"root" : "e2e", "root": "e2e",
"sourceRoot" : "e2e", "sourceRoot": "e2e",
"projectType" : "application", "projectType": "application",
"architect" : { "architect": {
"e2e" : { "e2e": {
"builder" : "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options" : { "options": {
"protractorConfig" : "./protractor.conf.js", "protractorConfig": "./protractor.conf.js",
"devServerTarget" : "karideo:serve" "devServerTarget": "karideo:serve"
} }
}, },
"lint" : { "lint": {
"builder" : "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options" : { "options": {
"tsConfig" : [ "e2e/tsconfig.e2e.json" ], "tsConfig": [
"exclude" : [ "**/node_modules/**" ] "e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
} }
} }
} }
} }
}, },
"schematics" : { "schematics": {
"@schematics/angular:component" : { "@schematics/angular:component": {
"prefix" : "app", "prefix": "app",
"style" : "less" "style": "less"
}, },
"@schematics/angular:directive" : { "@schematics/angular:directive": {
"prefix" : "app" "prefix": "app"
} }
} }
} }

View File

@ -1,5 +1,4 @@
import { isNumberFinite, isString, isOptionalOf, isNumber } from "common/utils"; import { isNumberFinite, isNumber } from "common/utils";
import { isNodeData, NodeData } from "common/model/node";
export interface UserMediaAdvancement { export interface UserMediaAdvancement {

View File

@ -74,7 +74,7 @@ export class VideoScene implements OnInit {
timeLeft: number = 10; timeLeft: number = 10;
interval = null; interval = null;
userMetaData: UserMediaAdvancement & { percentDisplay: number } = undefined userMetaData: UserMediaAdvancement & { percentDisplay?: number } = undefined
previousTime: number = 0; previousTime: number = 0;
startPlayingTime: number = undefined; startPlayingTime: number = undefined;