Skip to content

Commit

Permalink
filter executables based on supported application versions in getExec…
Browse files Browse the repository at this point in the history
…utables
  • Loading branch information
pranabdas committed Jul 22, 2023
1 parent 85f8710 commit 042bd2f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,20 @@ export class Application extends NamedDefaultableInMemoryEntity {

get executables() {
const tree = getAppTree(this.prop("name"));
return Object.keys(tree).map((key) => {
const executableList = Object.keys(tree).map((key) => {
return new this.constructor.Executable({ ...tree[key], name: key });
});
const allowedExecutables = executableList.filter((exe) => {
const filteredExecutables = exe._json.supportedApplicationVersions;
return (
!filteredExecutables ||
(filteredExecutables && filteredExecutables.includes(this.prop("version")))
);
});
return allowedExecutables;
// return Object.keys(tree).map((key) => {
// return new this.constructor.Executable({ ...tree[key], name: key });
// });
}

get hasAdvancedComputeOptions() {
Expand Down

0 comments on commit 042bd2f

Please sign in to comment.