Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion electron/app/js/witInspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function getInspectEnvironment(javaHome, options, httpsProxyUrl, bypassProxyHost
}

function getImageToolInspectArgs(imageTag, options) {
const args = [ 'inspect', `--image=${imageTag}`, '--format=JSON' ];
const args = [ 'inspect', `--image=${imageTag}`, '--patches', '--format=JSON' ];
if ('buildEngine' in options && options.buildEngine) {
args.push(`--builder=${options['buildEngine']}`);
}
Expand Down
24 changes: 17 additions & 7 deletions electron/app/locales/en/webui.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,14 +809,25 @@
"wit-inspector-inspect-failed-title": "Inspect Image Failed",
"wit-inspector-inspect-failed-error-message":"Unable to inspect image {{imageTag}}: {{error}}.",
"wit-inspector-inspect-catch-all-error-message": "Inspect Image failed with an unexpected error: {{error}}",
"wit-inspector-fmw-version-message": "Oracle Fusion Middleware {{version}} installed at {{path}}",
"wit-inspector-fmw-message": "Oracle Fusion Middleware installed at {{path}}",
"wit-inspector-java-version-message": "Java {{version}} installed at {{path}}",
"wit-inspector-java-message": "Java installed at {{path}}",
"wit-inspect-results-fmw-message": "Inspection of image {{imageTag}} found {{javaMessage}} and {{fmwMessage}}.",
"wit-inspect-results-java-message": "Inspection of image {{imageTag}} found {{javaMessage}}.",
"wit-inspect-results-fmw-message": "Inspection of image {{imageTag}} found both Java and Oracle Fusion Middleware installations.",
"wit-inspect-results-java-message": "Inspection of image {{imageTag}} found a Java installation.",
"wit-inspector-empty-contents-message": "Inspection of image {{imageTag}} did not find Java or Oracle Fusion Middleware installations",

"inspect-dialog-default-title": "Image Contents",
"inspect-dialog-default-message": "Unknown image contents",
"inspect-dialog-os-section-title": "Operating System:",
"inspect-dialog-os-name-label": "Name:",
"inspect-dialog-os-version-label": "Version:",
"inspect-dialog-java-home-section-title": "Java Development Kit:",
"inspect-dialog-java-home-path-label": "Location:",
"inspect-dialog-java-home-version-label": "Version:",
"inspect-dialog-oracle-home-section-title": "Oracle Fusion Middleware:",
"inspect-dialog-oracle-home-path-label": "Location:",
"inspect-dialog-oracle-home-version-label": "Version:",
"inspect-dialog-opatch-version-label": "OPatch Version:",
"inspect-dialog-oracle-patches-section-title": "Oracle Patches:",
"inspect-dialog-oracle-one-off-patches-label": "Oracle One-Off Patches:",

"wit-creator-image-not-create-message": "The Create New Primary Image option is off so there is nothing to do.",
"wit-creator-aborted-error-title": "Create Image Aborted",
"wit-creator-invalid-java-home-error-prefix": "Unable to create image due to the Java Home being invalid",
Expand Down Expand Up @@ -1121,7 +1132,6 @@
"flow-getting-k8s-domain-status-in-progress": "Getting domain {{domain}} status",
"flow-checking-operator-version-in-progress": "Checking operator version",


"add-archive-file-title": "Add Archive File",
"add-archive-file-replace-message": "This will replace the existing archive, continue?",
"add-model-file-title": "Add Model File",
Expand Down
35 changes: 35 additions & 0 deletions webui/src/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,41 @@ h6:first-child {
max-width: 850px;
}

.wkt-inspect-grid-container {
display: grid;
grid-column-gap: 1em;
grid-auto-columns: min-content auto;
}

.wkt-inspect-grid-message {
grid-column-start: 1;
grid-column-end: 3;
}

.wkt-inspect-grid-title {
font-weight: bold;
margin-top: 0.75em;
grid-column-start: 1;
grid-column-end: 3;
}

.wkt-inspect-grid-name {
margin-left: 1em;
grid-column-start: 1;
grid-column-end: 1;
white-space: nowrap;
}

.wkt-inspect-grid-value {
grid-column-start: 2;
grid-column-end: 3;
}

.wkt-inspect-dialog-content {
max-height: 50vh;
overflow: auto;
}

.wkt-center-text-in-frame {
vertical-align: center;
text-align: center;
Expand Down
45 changes: 13 additions & 32 deletions webui/src/js/utils/wit-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ define(['utils/wit-actions-base', 'models/wkt-project', 'utils/i18n', 'utils/pro
this.project.image.setBaseImageContents(inspectResults.contents);
const title = i18n.t('wit-inspector-inspect-complete-title');
const message = this.getInspectSuccessMessage(baseImageTag, inspectResults.contents);
await window.api.ipc.invoke('show-info-message', title, message);
const dialogOptions = {
title: title,
message: message,
contents: inspectResults.contents
};
dialogHelper.openDialog('inspect-dialog', dialogOptions);
return Promise.resolve(true);
} else {
errTitle = i18n.t('wit-inspector-inspect-failed-title');
Expand Down Expand Up @@ -137,39 +142,15 @@ define(['utils/wit-actions-base', 'models/wkt-project', 'utils/i18n', 'utils/pro
}

getInspectSuccessMessage(imageTag, imageContents) {
const hasJdk = 'javaHome' in imageContents;
const jdkPath = imageContents.javaHome;
const jdkVersion = imageContents.javaVersion;
const hasFmw = 'oracleHome' in imageContents;
const fmwPath = imageContents.oracleHome;
const fmwVersion = imageContents.wlsVersion;

const fmwMessage = this.getMessage('wit-inspector-fmw', hasFmw, fmwPath, fmwVersion);
const javaMessage = this.getMessage('wit-inspector-java', hasJdk, jdkPath, jdkVersion);

let message;
if (fmwMessage) {
message = i18n.t('wit-inspect-results-fmw-message',
{ imageTag: imageTag, javaMessage: javaMessage, fmwMessage: fmwMessage });
} else if (javaMessage) {
message = i18n.t('wit-inspect-results-java-message',
{ imageTag: imageTag, javaMessage: javaMessage });
let key;
if ('oracleHome' in imageContents) {
key = 'wit-inspect-results-fmw-message';
} else if ('javaHome' in imageContents) {
key = 'wit-inspect-results-java-message';
} else {
message = i18n.t('wit-inspector-empty-contents-message', { imageTag: imageTag });
}
return message;
}

getMessage(i18nPrefix, isInstalled, path, version) {
let message;
if (isInstalled) {
if (version) {
message = i18n.t(`${i18nPrefix}-version-message`, { path: path, version: version });
} else {
message = i18n.t(`${i18nPrefix}-message`, { path: path });
}
key = 'wit-inspector-empty-contents-message';
}
return message;
return i18n.t(key, { imageTag: imageTag });
}
}

Expand Down
2 changes: 1 addition & 1 deletion webui/src/js/viewModels/app-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, Arra

this.collapseArrowClass = ko.computed(() => {
return this.navCollapsed() ? 'oj-ux-ico-arrow-right' : 'oj-ux-ico-arrow-left';
});
}, this);

this.collapseNav = () => {
this.navCollapsed(!this.navCollapsed());
Expand Down
8 changes: 4 additions & 4 deletions webui/src/js/viewModels/domain-design-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ function (project, accUtils, utils, ko, i18n, BufferingDataProvider,

this.isDomainInPV = ko.computed(() => {
return this.project.settings.targetDomainLocation.observable() === 'pv';
});
}, this);

this.isDomainInImage = ko.computed(() => {
return this.project.settings.targetDomainLocation.observable() === 'dii';
});
}, this);

this.isModelInImage = ko.computed(() => {
return this.project.settings.targetDomainLocation.observable() === 'mii';
});
}, this);

// Disable JRF as the domain type since the application does not (yet?) provide the mechanisms required
// to specify the JRF schemas or the database connectivity and credential information needed to run RCU.
Expand Down Expand Up @@ -70,7 +70,7 @@ function (project, accUtils, utils, ko, i18n, BufferingDataProvider,

this.usingAuxImage = ko.computed(() => {
return this.isModelInImage() && this.project.image.useAuxImage.value;
});
}, this);

this.hasNoClusters = () => {
return this.project.k8sDomain.clusters.value.length === 0;
Expand Down
6 changes: 3 additions & 3 deletions webui/src/js/viewModels/image-code-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ function(accUtils, ko, i18n, project, ImageScriptGenerator, ArrayDataProvider) {

this.disablePrimaryImageScript = ko.computed(() => {
return !this.project.image.createPrimaryImage.value;
});
}, this);

this.disableAuxiliaryImageScript = ko.computed(() => {
return !(this.project.settings.targetDomainLocation.value === 'mii' &&
this.project.image.useAuxImage.value && this.project.image.createAuxImage.value);
});
}, this);

this.subviews = [
{
Expand All @@ -69,7 +69,7 @@ function(accUtils, ko, i18n, project, ImageScriptGenerator, ArrayDataProvider) {

this.tabsStatus = ko.computed(() => {
return this.disablePrimaryImageScript() && this.disableAuxiliaryImageScript() ? 'disabled' : 'enabled';
});
}, this);

this.codeViewScriptLanguage = ko.observable(ImageScriptGenerator.getDefaultScriptingLanguage());
this.codeViewScriptLanguages = [
Expand Down
20 changes: 15 additions & 5 deletions webui/src/js/viewModels/image-design-view-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ define(['utils/wkt-logger'],

this.disableAuxImage = ko.computed(() => {
return !(this.targetDomainLocationIsMII() && this.project.image.useAuxImage.value);
});
}, this);

this.mainCreateImageSwitchHelp = ko.computed(() => {
if (this.project.image.useAuxImage.value) {
return this.labelMapper('create-image-aux-help');
} else {
return this.labelMapper('create-image-help');
}
});
}, this);

this.mainImageTagHelpMII = () => {
let key = 'image-tag-mii-use-help';
Expand Down Expand Up @@ -116,15 +116,15 @@ define(['utils/wkt-logger'],
break;
}
return this.labelMapper(key);
});
}, this);

this.auxImageTagHelp = ko.computed(() => {
if (this.project.image.createAuxImage.value) {
return this.labelMapper('aux-image-tag-create-help');
} else {
return this.labelMapper('aux-image-tag-use-help');
}
});
}, this);

this.subviews = [
{id: 'fmwImage', name: this.labelMapper('image-tab')},
Expand All @@ -144,7 +144,7 @@ define(['utils/wkt-logger'],
} else {
return this.labelMapper('fmw-title');
}
});
}, this);

this.mainImageRequiresWdt = () => {
let result = false;
Expand Down Expand Up @@ -210,6 +210,16 @@ define(['utils/wkt-logger'],
return !this.project.image.baseImageContentsIncludesMiddleware();
};

this.needsInstallers = ko.computed(function() {
let result = true;
if (this.project.image.useCustomBaseImage.observable()) {
if (this.project.image.baseImageContentsIncludesMiddleware()) {
result = false;
}
}
return result;
}, this);

this.chooseJDK = () => {
window.api.ipc.invoke('get-jdk-installer-location')
.then(jdkInstaller => {
Expand Down
Loading