summaryrefslogtreecommitdiffstats
path: root/public/src/app/bar-icons/bar-icons.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'public/src/app/bar-icons/bar-icons.component.ts')
-rw-r--r--public/src/app/bar-icons/bar-icons.component.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/public/src/app/bar-icons/bar-icons.component.ts b/public/src/app/bar-icons/bar-icons.component.ts
index bf930f3..0a03132 100644
--- a/public/src/app/bar-icons/bar-icons.component.ts
+++ b/public/src/app/bar-icons/bar-icons.component.ts
@@ -2,6 +2,7 @@ import { Component, Input, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { includes } from 'lodash';
import { Store } from '../store/store';
+import { RuleEngineApiService } from '../rule-engine/api/rule-engine-api.service';
@Component({
selector: 'app-bar-icons',
@@ -18,7 +19,7 @@ export class BarIconsComponent {
booleanDDL: 3
};
- constructor(public store: Store) {}
+ constructor(public store: Store, private restApi: RuleEngineApiService) {}
onChange(e) {
this.store.cdumpIsDirty = true;
@@ -49,4 +50,14 @@ export class BarIconsComponent {
this.store.expandAdvancedSetting[this.store.tabIndex] = !this.store
.expandAdvancedSetting[this.store.tabIndex];
}
+
+ enableImports() {
+ this.store.expandImports[this.store.tabIndex] = !this.store.expandImports[
+ this.store.tabIndex
+ ];
+ }
+
+ downloadRules() {
+ this.restApi.exportRules();
+ }
}