Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release-v0.1' into dependabot/pip/backend/cryptography-…
Browse files Browse the repository at this point in the history
…41.0.4
  • Loading branch information
MeisterSeSe authored Nov 10, 2023
2 parents babe21c + 43a7d41 commit 6ecb2b3
Show file tree
Hide file tree
Showing 74 changed files with 4,772 additions and 2,414 deletions.
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cryptography==41.0.4
defusedxml==0.7.1
Deprecated==1.2.14
dj-rest-auth==4.0.1
Django==4.2.2
Django==4.2.3
django-allauth==0.54.0
django-cors-headers==4.1.0
django-coverage-plugin==3.0.0
Expand Down
1 change: 1 addition & 0 deletions frontend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ VUE_APP_DOMAIN="http://localhost:8000/"
VUE_APP_DOMAIN_FRONTEND="http://localhost:8080/"
VUE_APP_DOMAIN_WEBSOCKET="localhost"
VUE_APP_DOMAIN_WEBSOCKET_PORT=9000
VUE_APP_DOMAIN_FEATUREIDESERVICE="http://localhost:10000/"
1 change: 1 addition & 0 deletions frontend/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ VUE_APP_DOMAIN="https://doener.tobiasbetz.de/"
VUE_APP_DOMAIN_FRONTEND="https://ddueruem.tobiasbetz.de/"
VUE_APP_DOMAIN_WEBSOCKET="boerek.tobiasbetz.de"
VUE_APP_DOMAIN_WEBSOCKET_PORT=443
VUE_APP_DOMAIN_FEATUREIDESERVICE="http://localhost:10000/"
NODE_ENV="production"
1,123 changes: 663 additions & 460 deletions frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@vue/cli-service": "~5.0.8",
"eslint": "^8.43.0",
"eslint-plugin-vue": "^9.15.0",
"node-sass": "^7.0.3",
"node-sass": "^9.0.0",
"sass": "~1.32.0",
"sass-loader": "^10.0.0",
"vue-cli-plugin-vuetify": "~2.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class NewEmptyModelCommand extends Command {
calculations: undefined,
comments: [],
featureOrder: undefined,
rootNode: new FeatureNode(null, 'Root', 'and', false, false),
rootNode: new FeatureNode(null, 'Root', 'and', true, false),
};
}

Expand Down
48 changes: 48 additions & 0 deletions frontend/src/classes/Commands/FeatureModel/RemoveCommand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import {FeatureNodeCommand} from "@/classes/Commands/FeatureModel/FeatureNodeCommand";

export class RemoveCommand extends FeatureNodeCommand {
constructor(node, dstIndex) {
super();
this.node = node;
this.parent = node.parent
this.dstIndex = dstIndex

// Properties for undo.
this.oldData = {
name: this.node.name,
groupType: this.node.groupType,
mandatory: this.node.isMandatory,
abstract: this.node.isAbstract,
};
}

undo() {
this.parent.uncollapse();
this.parent.unhideChildren();

this.parent.insertChildAtIndex(this.node, this.dstIndex);
}

execute() {
this.parent.uncollapse();
this.parent.unhideChildren();

this.parent.removeChild(this.node);
}

createDTO() {
return {
commandType: 'remove',
nodeName: this.node.name,
dstIndex: this.dstIndex,
};
}

markChanges() {
this.parent.markAsEdited()
}

unmarkChanges() {
this.parent.unmarkAsEdited()
}
}
37 changes: 37 additions & 0 deletions frontend/src/classes/Commands/FeatureModel/SliceCommand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {Command} from "@/classes/Commands/Command";
import * as init from '@/services/FeatureModel/init.service.js';

export class SliceCommand extends Command {
constructor(oldFM, newFM) {
super();
this.featureModelComponent = oldFM;
this.d3Data = this.featureModelComponent.$refs.featureModelTree.d3Data;

// Constraint command manager
this.constraintCommandManager = this.featureModelComponent.constraintCommandManager;
this.historyCommands = this.constraintCommandManager.historyCommands;
this.futureCommands = this.constraintCommandManager.futureCommands;

this.oldRoot = this.d3Data.root;

this.oldData = this.featureModelComponent.data;
this.newData = newFM;
}

execute() {
this.featureModelComponent.data = this.newData;
init.initData(this.d3Data, this.newData.rootNode);
}


undo() {
this.featureModelComponent.data = this.oldData;
this.d3Data.root = this.oldRoot;
}

createDTO() {
return {
commandType: 'slice-model',
};
}
}
41 changes: 41 additions & 0 deletions frontend/src/classes/Constraint/SoloDisjunction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {ConstraintItem} from "@/classes/Constraint/ConstraintItem";


export class SoloDisjunction extends ConstraintItem {
constructor(item) {
super();
this.item = item;
}

count() {
return 1;
}

toString() {
return `${this.addPossibleBrackets(this.item)}`;
}

toStringForEdit() {
return `${this.addPossibleBracketsForEdit(this.item)}`;
}

toStringPostfix() {
return `${this.item.toStringPostfix()}`;
}

toStringXML() {
return `<disj>${this.item.toStringXML()}</disj>`;
}

getFeatureNodes() {
return this.item.getFeatureNodes();
}

setConstraint(constraint) {
this.item.setConstraint(constraint);
}

removeConstraint() {
this.item.removeConstraint();
}
}
4 changes: 4 additions & 0 deletions frontend/src/classes/FeatureNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export class FeatureNode {
return this.children.length === 0;
}

setGroupType(groupType) {
this.groupType = groupType;
}

uncollapse(toRoot = true) {
if (this.isCollapsed && !this.isLeaf()) {
this.d3Node.children = this.d3Node.collapsedChildren;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/classes/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const EXAMPLE_FEATURE_MODEL_XML = `
<featureModel>
<properties/>
<struct>
<and name="Root">
<and name="Root" mandatory="true">
<feature mandatory="true" name="Feature A"/>
<feature mandatory="false" name="Feature B"/>
</and>
Expand Down
Loading

0 comments on commit 6ecb2b3

Please sign in to comment.