Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/app/services/plugin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,4 @@ export class PluginService {
}
return this.availablePlugins;
}

loadPlugins(files: File[]) {
return this._crud.loadPlugins(files);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ export class FileUploaderComponent implements OnInit {
this.files = Array.from((event.target as HTMLInputElement).files);
}

loadPlugins() {
this.isLoading = true;
this.uploadProgress = 0;
this._plugin.loadPlugins(this.files).subscribe({
next: res => {
this.files = null;
this.isLoading = false;
this.loadPage();
}, error: err => {
console.log(err);
this._toast.error(err.message);
this.isLoading = false;
}
});
}


removeFile(file
:
File
Expand Down
17 changes: 0 additions & 17 deletions src/app/views/forms/form-generator/form-generator.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ <h1 *ngIf="formObj.title">{{ formObj.title }}</h1>
</c-row>
<c-row class="list-wrapper" [gutter]="3"
*ngIf="config.value.template.webUiFormType === 'PLUGIN_INSTANCE'">
<c-col class="list-input-wrapper align-self-center">
<div class="text-center bg-transparent border-0">
<app-file-uploader [loadPage]="loadPage"></app-file-uploader>
</div>
</c-col>
<ng-container
*ngFor="let el of filterPlugins(config.value.values); let i = index;">
<c-col xs="6">
Expand Down Expand Up @@ -148,18 +143,6 @@ <h1 *ngIf="formObj.title">{{ formObj.title }}</h1>
<a target="_blank"
[href]=" el.url ? el.url : 'https://polypheny.com' "><small
class="text-muted">{{ el.url ? el.url : "polypheny.com" }}</small></a>
<button cButton color="info"
[disabled]="el.isSystemComponent"
(click)="deactivatePlugin(el, config.value.key)"
*ngIf="el.status === 'ACTIVE' && !el.isSystemComponent">
Deactivate
</button>
<button cButton color="primary"
[disabled]="el.isSystemComponent"
(click)="activatePlugin(el, config.value.key)"
*ngIf="el.status === 'LOADED' && !el.isSystemComponent">
Activate
</button>
</c-card-footer>

</c-card>
Expand Down
17 changes: 0 additions & 17 deletions src/app/views/forms/form-generator/form-generator.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,23 +368,6 @@ export class FormGeneratorComponent implements OnInit, OnDestroy {
this.markElementReset(key, el);
}

deactivatePlugin(el: any, key: string) {
el.status = PluginStatus.LOADED;
this.markElementReset(key, el);
this.forceSubmit(() => el.status = PluginStatus.ACTIVE);
}

activatePlugin(el: any, key: string) {
el.status = PluginStatus.ACTIVE;
this.markElementReset(key, el);
this.forceSubmit(() => el.status = PluginStatus.LOADED);

}

forceSubmit(func: () => {}) {
this.onSubmit(this.form, null, func);
}

comparePlugins(a: any, b: any) {
if (a.isSystemComponent) {
return -1;
Expand Down