Fix for reals this time
@@ -75,22 +75,39 @@ export class FlowViewStepComponent {
getParentClass() {
let clazz = '';
- switch (this.step.stepKind) {
- case 'endpoint':
- if (this.step.connection && this.step.connection && this.step.configuredProperties) {
+ if (this.thingIsEnabled(this.step)) {
clazz = 'current';
}
+ return 'parent-step ' + clazz;
+ }
+
+ private thingIsEnabled(step: Step) {
+ if (!step) {
+ return false;
+ }
+ switch (step.stepKind) {
+ case 'endpoint':
+ if (step.connection && step.connection && step.configuredProperties) {
+ return true;
+ }
break;
default:
- if (this.step.configuredProperties) {
- clazz = 'current';
+ if (step.configuredProperties) {
+ return true;
}
break;
}
- return 'parent-step ' + clazz;
+ return false;
}
getActiveClass(state: string) {
+ if (!state) {
+ if (this.thingIsEnabled(this.step)) {
+ return 'active';
+ } else {
+ return 'inactive';
+ }
+ }
if ((this.currentState === state || !state) && this.getPosition() === this.currentPosition) {
return 'active';
}
