Skip to content

Commit eda0385

Browse files
committed
Finish 0.3.1
2 parents 3850aee + 5391f3c commit eda0385

File tree

8 files changed

+62
-45
lines changed

8 files changed

+62
-45
lines changed

business_logic/static/business_logic/main.bundle.js

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

business_logic/static/business_logic/polyfills.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

business_logic/static/business_logic/vendor.bundle.js

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/app/components/editor/editor.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ export class EditorComponent {
100100
this.params["Program"] = this.base.programs.getCurrent().getTitle();
101101
this.params["Version"] = this.base.versions.getCurrent().getTitle();
102102

103-
this.xmlForFunctionLibs = this.environment.generateXmlForToolbox();
103+
if( this.environment.getEnvironment() ){
104+
this.xmlForFunctionLibs = this.environment.generateXmlForToolbox();
105+
}else{
106+
this.xmlForFunctionLibs = '';
107+
}
104108

105109
this.ref.fetchReferenceDescriptors().subscribe(() => {
106110
this.xmlForReferenceDescriptors = this.ref.generateXmlForToolbox();

frontend/src/app/models/program.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
import { BaseCollection } from "./base.collection";
22
import { BaseModel } from "./base.model";
3+
import {Environment} from "./environment";
34

45
export class Program extends BaseModel{
6+
environment = null;
7+
58
constructor(id: number, title: string){
69
super(id, title);
710
}
11+
12+
setEnvironment(data: any){
13+
if(data) this.environment = new Environment(data);
14+
}
15+
16+
getEnvironment(){
17+
return this.environment;
18+
}
819
}
920

1021
export class ProgramCollection extends BaseCollection{

frontend/src/app/models/programInterface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class ProgramInterface extends BaseModel{
1313
}
1414

1515
setEnvironment(data: any){
16-
this.environment = new Environment(data);
16+
if(data) this.environment = new Environment(data);
1717
}
1818

1919
setArgs(args: any){

frontend/src/app/models/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class Version extends BaseModel{
2525
}
2626

2727
setEnvironment(data: any){
28-
this.environment = new Environment(data);
28+
if(data) this.environment = new Environment(data);
2929
}
3030

3131
setXml(xml: string){

frontend/src/app/services/environment.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export class EnvironmentService {
1313

1414
getEnvironment(){
1515
return this.base.currentVersion.getEnvironment()
16+
// || this.base.currentProgram.getEnvironment()
1617
|| this.base.currentProgramInterface.getEnvironment();
1718
}
1819

0 commit comments

Comments
 (0)