Delete input plugin element properly

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-09-14 13:09:01 +09:00
parent 6fd3a56f58
commit 1f1bb2960d
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1
2 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class Api::SettingsController < ApplicationController
end
def destroy
if params[:label] == "ROOT"
if params[:label] == "ROOT" || params[:pluginType] == "source"
name = params[:pluginType]
arg = params[:arg]
else

View File

@ -133,6 +133,9 @@ $(document).ready(() => {
_.each(data, (elements, label) => {
this.$set(this.sections, label, elements);
});
if (_.isEmpty(data["ROOT"])) {
this.$set(this.sections, "ROOT", []);
}
this.loaded = true;
setTimeout(() => {
this.loading = false;