diff --git a/electron/app/js/wktLogging.js b/electron/app/js/wktLogging.js index e43c2857f..e6457e39a 100644 --- a/electron/app/js/wktLogging.js +++ b/electron/app/js/wktLogging.js @@ -1,6 +1,6 @@ /** * @license - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. */ const path = require('path'); @@ -188,7 +188,7 @@ function getRotatingFileTransport(fileLogConfig) { _logFileName = newFilename; // this _logger call is safe only because it happens after the logger has been initialized. // - _logger.notice(`Log file rotated from ${oldFilename} to ${newFilename}`); + _logger.info(`Log file rotated from ${oldFilename} to ${newFilename}`); }); return fileTransport; diff --git a/electron/app/locales/en/webui.json b/electron/app/locales/en/webui.json index aaa95645b..6f9e59464 100644 --- a/electron/app/locales/en/webui.json +++ b/electron/app/locales/en/webui.json @@ -953,8 +953,8 @@ "ingress-design-ingress-annotations": "Optional Annotations", "ingress-design-ingress-route-name-help": "The name to be used for creating this ingress route.", "ingress-design-ingress-route-virtualhost-help": "The virtual host name is used as the host routing rule for this ingress route.", - "ingress-design-ingress-route-targetservice-help": "The target service is the where this ingress route will send the request to the backend Kubernetes service address.", - "ingress-design-ingress-route-targetport-help": "The target port is the where this ingress route will send the request to the backend Kubernetes service port.", + "ingress-design-ingress-route-targetservice-help": "The target service where this ingress route will send the request to the backend Kubernetes service address.", + "ingress-design-ingress-route-targetport-help": "The target port where this ingress route will send the request to the backend Kubernetes service port.", "ingress-design-ingress-route-path-help": "The URL path routing rule for this ingress route.", "ingress-design-ingress-route-annotations-table-title": "Ingress Route Annotations", "ingress-design-ingress-route-annotation-key-help": "The name of the annotation used for this ingress route.", @@ -962,7 +962,7 @@ "ingress-design-ingress-route-annotation-add-row-tooltip": "Add Annotation", "ingress-design-ingress-route-annotation-delete-row-tooltip": "Delete Annotation", "ingress-design-ingress-route-traefik-mw-label": "Traefik Middleware", - "ingress-design-ingress-route-traefik-mw-help": "Customize Traefik Middlewares Object", + "ingress-design-ingress-route-traefik-mw-help": "Customize Traefik Middleware Object", "ingress-design-ingress-routes-get-services-in-namespace-title" : "Retrieving existing domain service details", "ingress-design-ingress-routes-get-services-in-namespace-error-message": "Failed to get existing domain services from Kubernetes namespace {{namespace}}: {{error}}.", diff --git a/webui/src/js/utils/project-io.js b/webui/src/js/utils/project-io.js index 07a1b1106..177b042b1 100644 --- a/webui/src/js/utils/project-io.js +++ b/webui/src/js/utils/project-io.js @@ -1,12 +1,12 @@ /** * @license - * Copyright (c) 2021, 2022, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. */ 'use strict'; /** - * An helper object for project IO. + * A helper object for project IO. * Returns a singleton. */ diff --git a/webui/src/js/utils/wit-aux-creator.js b/webui/src/js/utils/wit-aux-creator.js index 55e113ea1..451b29172 100644 --- a/webui/src/js/utils/wit-aux-creator.js +++ b/webui/src/js/utils/wit-aux-creator.js @@ -1,6 +1,6 @@ /** * @license - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. + * Copyright (c) 2021, 2024, Oracle and/or its affiliates. * Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. */ 'use strict'; @@ -279,9 +279,31 @@ function (WitActionsBase, project, wktConsole, wdtModelPreparer, i18n, projectIo } addWdtConfig(projectDirectory, createConfig) { + const variableFiles = this.project.wdtModel.propertiesFiles.value; + const nonEmptyVariableFiles = []; + if (Array.isArray(variableFiles) && variableFiles.length > 0) { + // This code currently supports a single variable file. + const variableFileContent = this.project.wdtModel.getPropertyFileContents(); + for (const [file, contents] of Object.entries(variableFileContent)) { + if (Object.getOwnPropertyNames(contents).length > 0) { + nonEmptyVariableFiles.push(file); + } + } + } + + const archiveFiles = this.project.wdtModel.archiveFiles.value; + const nonEmptyArchiveFiles = []; + if (Array.isArray(archiveFiles) && archiveFiles.length > 0) { + // This code currently supports a single archive file. + const archiveRoots = this.project.wdtModel.archiveRoots(); + if (Array.isArray(archiveRoots) && archiveRoots.length > 0) { + nonEmptyArchiveFiles.push(archiveFiles[0]); + } + } + createConfig.modelFiles = this.getAbsoluteModelFiles(projectDirectory, this.project.wdtModel.modelFiles.value); - createConfig.variableFiles = this.getAbsoluteModelFiles(projectDirectory, this.project.wdtModel.propertiesFiles.value); - createConfig.archiveFiles = this.getAbsoluteModelFiles(projectDirectory, this.project.wdtModel.archiveFiles.value); + createConfig.variableFiles = this.getAbsoluteModelFiles(projectDirectory, nonEmptyVariableFiles); + createConfig.archiveFiles = this.getAbsoluteModelFiles(projectDirectory, nonEmptyArchiveFiles); // Because we are overriding the defaults for these next two options, // we should always include them if they have a value. //