Commit d0147981 by kevalbhatt

ATLAS-3697:- [Business Metadata] Incorrect values populated in Entity details >…

ATLAS-3697:- [Business Metadata] Incorrect values populated in Entity details > Business Metatdata attribute values, after encountering an error previously
parent c06221ae
...@@ -100,8 +100,16 @@ label { ...@@ -100,8 +100,16 @@ label {
font-weight: 600; font-weight: 600;
} }
button:focus { button {
&:focus {
outline: none !important; outline: none !important;
}
&[disabled] {
.fa {
opacity: .65;
}
}
} }
.btn { .btn {
......
...@@ -79,7 +79,10 @@ define(['require', ...@@ -79,7 +79,10 @@ define(['require',
} }
}) })
}; };
events["click " + this.ui.refreshGlossary] = 'getGlossary'; events["click " + this.ui.refreshGlossary] = function() {
this.ui.refreshGlossary.attr("disabled", true);
this.getGlossary();
};
events["click " + this.ui.importGlossary] = 'onClickImportGlossary'; events["click " + this.ui.importGlossary] = 'onClickImportGlossary';
events["keyup " + this.ui.searchTerm] = function() { events["keyup " + this.ui.searchTerm] = function() {
this.ui.termTree.jstree("search", this.ui.searchTerm.val()); this.ui.termTree.jstree("search", this.ui.searchTerm.val());
...@@ -113,6 +116,7 @@ define(['require', ...@@ -113,6 +116,7 @@ define(['require',
this.generateTree(); this.generateTree();
this.setValues(); this.setValues();
this.changeLoaderState(false); this.changeLoaderState(false);
this.ui.refreshGlossary.attr("disabled", false);
}, this); }, this);
this.listenTo(this.glossaryCollection, "update:details", function(options) { this.listenTo(this.glossaryCollection, "update:details", function(options) {
var isGlossaryUpdate = options.isGlossaryUpdate; var isGlossaryUpdate = options.isGlossaryUpdate;
......
...@@ -113,6 +113,7 @@ define(['require', ...@@ -113,6 +113,7 @@ define(['require',
}, },
fetchCollections: function() { fetchCollections: function() {
this.changeLoaderState(true); this.changeLoaderState(true);
this.ui.refreshTag.attr("disabled", true);
this.collection.fetch({ reset: true }); this.collection.fetch({ reset: true });
this.ui.offLineSearchTag.val(""); this.ui.offLineSearchTag.val("");
}, },
...@@ -245,6 +246,7 @@ define(['require', ...@@ -245,6 +246,7 @@ define(['require',
} }
this.changeLoaderState(false); this.changeLoaderState(false);
this.ui.refreshTag.attr("disabled", false);
}, },
getTagTreeList: function(options) { getTagTreeList: function(options) {
var that = this, var that = this,
......
...@@ -107,8 +107,16 @@ label { ...@@ -107,8 +107,16 @@ label {
font-weight: 600; font-weight: 600;
} }
button:focus { button {
&:focus {
outline: none !important; outline: none !important;
}
&[disabled] {
.fa {
opacity: .65;
}
}
} }
.btn { .btn {
......
...@@ -180,7 +180,7 @@ define(['require', ...@@ -180,7 +180,7 @@ define(['require',
} else if (typeName.indexOf("date") > -1) { } else if (typeName.indexOf("date") > -1) {
returnEL = '<' + (isMultiValued ? "textarea" : "input") + ' type="text" data-key="' + key + '" data-businessMetadata="' + businessMetadata + '" data-typename="' + typeName + '"data-multi="' + isMultiValued + '" data-type="date" class="form-control" ' + (isMultiValued === false && !_.isUndefinedNull(val) ? 'value="' + val + '"' : "") + '>' + (isMultiValued === true && !_.isUndefinedNull(val) ? val : "") + (isMultiValued ? "</textarea>" : ""); returnEL = '<' + (isMultiValued ? "textarea" : "input") + ' type="text" data-key="' + key + '" data-businessMetadata="' + businessMetadata + '" data-typename="' + typeName + '"data-multi="' + isMultiValued + '" data-type="date" class="form-control" ' + (isMultiValued === false && !_.isUndefinedNull(val) ? 'value="' + val + '"' : "") + '>' + (isMultiValued === true && !_.isUndefinedNull(val) ? val : "") + (isMultiValued ? "</textarea>" : "");
setTimeout(function() { setTimeout(function() {
var dateObj = { "singleDatePicker": true, autoUpdateInput: isMultiValued ? false : true }, var dateObj = { singleDatePicker: true, showDropdowns: true, autoUpdateInput: isMultiValued ? false : true },
dateEl = that.$el.find('[data-type="date"][data-key="' + key + '"]').daterangepicker(dateObj); dateEl = that.$el.find('[data-type="date"][data-key="' + key + '"]').daterangepicker(dateObj);
if (isMultiValued) { if (isMultiValued) {
dateEl.on("apply.daterangepicker", function(ev, picker) { dateEl.on("apply.daterangepicker", function(ev, picker) {
......
...@@ -83,7 +83,7 @@ define([ ...@@ -83,7 +83,7 @@ define([
}, },
updateToActualData: function(options) { updateToActualData: function(options) {
var silent = options && options.silent || false; var silent = options && options.silent || false;
this.collection.reset(this.actualCollection.toJSON(), { silent: silent }); this.collection.reset($.extend(true, [], this.actualCollection.toJSON()), { silent: silent });
}, },
onAddBusinessMetadata: function() { onAddBusinessMetadata: function() {
this.ui.addBusinessMetadata.hide(); this.ui.addBusinessMetadata.hide();
......
...@@ -56,6 +56,7 @@ define([ ...@@ -56,6 +56,7 @@ define([
// refresh individual tree // refresh individual tree
events["click " + this.ui.refreshTree] = function(e) { events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true); that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
e.stopPropagation(); e.stopPropagation();
that.refresh(); that.refresh();
}; };
...@@ -200,6 +201,7 @@ define([ ...@@ -200,6 +201,7 @@ define([
that.businessMetadataDefCollection.fullCollection.sort({ silent: true }); that.businessMetadataDefCollection.fullCollection.sort({ silent: true });
that.ui.businessMetadataSearchTree.jstree(true).refresh(); that.ui.businessMetadataSearchTree.jstree(true).refresh();
that.changeLoaderState(false); that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
} }
}); });
}, },
......
...@@ -66,6 +66,7 @@ define([ ...@@ -66,6 +66,7 @@ define([
that = this; that = this;
events["click " + this.ui.refreshTree] = function(e) { events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true); that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type"); var type = $(e.currentTarget).data("type");
e.stopPropagation(); e.stopPropagation();
that.refresh({ type: type }); that.refresh({ type: type });
...@@ -380,6 +381,7 @@ define([ ...@@ -380,6 +381,7 @@ define([
that.classificationTreeUpdate = true that.classificationTreeUpdate = true
that.ui.classificationSearchTree.jstree(true).refresh(); that.ui.classificationSearchTree.jstree(true).refresh();
that.changeLoaderState(false); that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
} }
}; };
this.classificationDefCollection.fetch({ this.classificationDefCollection.fetch({
......
...@@ -57,6 +57,7 @@ define([ ...@@ -57,6 +57,7 @@ define([
that = this; that = this;
events["click " + this.ui.refreshTree] = function(e) { events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true); that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type"); var type = $(e.currentTarget).data("type");
e.stopPropagation(); e.stopPropagation();
that.refreshCustomFilterTree(); that.refreshCustomFilterTree();
...@@ -190,6 +191,7 @@ define([ ...@@ -190,6 +191,7 @@ define([
that.saveSearchBaiscCollection.fullCollection.reset(_.where(data, { searchType: "BASIC" })); that.saveSearchBaiscCollection.fullCollection.reset(_.where(data, { searchType: "BASIC" }));
that.saveSearchAdvanceCollection.fullCollection.reset(_.where(data, { searchType: "ADVANCED" })); that.saveSearchAdvanceCollection.fullCollection.reset(_.where(data, { searchType: "ADVANCED" }));
that.changeLoaderState(false); that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
}, },
silent: true silent: true
}); });
......
...@@ -55,6 +55,7 @@ define([ ...@@ -55,6 +55,7 @@ define([
that = this; that = this;
events["click " + this.ui.refreshTree] = function(e) { events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true); that.changeLoaderState(true);
this.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type"); var type = $(e.currentTarget).data("type");
e.stopPropagation(); e.stopPropagation();
that.ui[type + "SearchTree"].jstree(true).destroy(); that.ui[type + "SearchTree"].jstree(true).destroy();
...@@ -525,6 +526,7 @@ define([ ...@@ -525,6 +526,7 @@ define([
if (apiCount === 0) { if (apiCount === 0) {
that.renderEntityTree(); that.renderEntityTree();
that.changeLoaderState(false); that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
} }
}; };
this.entityDefCollection.fetch({ this.entityDefCollection.fetch({
......
...@@ -53,10 +53,10 @@ define([ ...@@ -53,10 +53,10 @@ define([
that = this; that = this;
events["click " + this.ui.refreshTree] = function(e) { events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true); that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type"); var type = $(e.currentTarget).data("type");
e.stopPropagation(); e.stopPropagation();
that.refresh({ type: type }); that.refresh({ type: type });
}; };
events["click " + this.ui.createGlossary] = function(e) { events["click " + this.ui.createGlossary] = function(e) {
...@@ -98,6 +98,7 @@ define([ ...@@ -98,6 +98,7 @@ define([
this.renderGlossaryTree(); this.renderGlossaryTree();
} }
that.changeLoaderState(); that.changeLoaderState();
that.ui.refreshTree.attr("disabled", false);
}, },
this this
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment