Commit fa9fbbd7 by Shwetha GS

ATLAS-847 UI: Audit versioning does not paginate details from Atlas server…

ATLAS-847 UI: Audit versioning does not paginate details from Atlas server (Kalyanikashikar via shwethags)
parent 079ce35e
...@@ -148,3 +148,24 @@ ...@@ -148,3 +148,24 @@
-o-transition: ease-in .1s ease-out; -o-transition: ease-in .1s ease-out;
transition: ease-in .1s ease-out; transition: ease-in .1s ease-out;
} }
.pager {
margin: 0px;
li {
>button {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 15px;
color: $color_jungle_green_approx;
}
>button,
>span {
&:hover {
background-color: $color_jungle_green_approx;
color: $white;
}
}
}
}
...@@ -292,8 +292,8 @@ form-control .tagInpput { ...@@ -292,8 +292,8 @@ form-control .tagInpput {
} }
.inputAssignTag { .inputAssignTag {
display: inline-block; display: block;
padding: 2px 0px; padding: 2px 5px;
border: 1px $action_gray solid; border: 1px $action_gray solid;
color: $action_gray; color: $action_gray;
font-size: 14px; font-size: 14px;
...@@ -303,13 +303,12 @@ form-control .tagInpput { ...@@ -303,13 +303,12 @@ form-control .tagInpput {
float: left; float: left;
cursor: pointer; cursor: pointer;
background-color: $white; background-color: $white;
width: 100px;
white-space: nowrap; white-space: nowrap;
i.fa { // i.fa {
position: relative; // position: relative;
right: -5px; // right: -5px;
cursor: pointer; // cursor: pointer;
} // }
&:hover { &:hover {
color: $color_dark_grey_approx; color: $color_dark_grey_approx;
background-color: $color_mercury_approx; background-color: $color_mercury_approx;
......
...@@ -14,4 +14,19 @@ ...@@ -14,4 +14,19 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
--> -->
<div id="r_auditTableLayoutView"></div> <div class="position-relative">
<div class="fontLoader">
<i class="fa fa-refresh fa-spin-custom"></i>
</div>
</div>
<div class="auditTable">
<div id="r_auditTableLayoutView"></div>
<ul class="pager">
<li>
<button data-id="previousAuditData">Previous</button>
</li>
<li>
<button data-id="nextAuditData">Next</button>
</li>
</ul>
</div>
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
--> -->
<a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"> Assign Term</i></a> <a href="javascript:void(0)" class="inputAssignTag multiSelect" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i> Assign Term</a>
<div id="r_tagLayoutView"></div> <div id="r_tagLayoutView"></div>
...@@ -14,16 +14,13 @@ ...@@ -14,16 +14,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
--> -->
<div class="form-horizontal"> <div>
<div class="form-group"> <div class="form-group">
<!-- <label class="control-label col-sm-4">Tag definition</label> --> <select class="form-control row-margin-bottom" data-id="addTagOptions" required>
<div class="col-sm-12"> </select>
<select class="form-control row-margin-bottom" data-id="addTagOptions" required> </div>
</select> <div class="row modalHeight">
</div> <div class="col-sm-12" data-id="tagAttribute" style="display:none">
</div> </div>
<div class="row modalHeight"> </div>
<div class="col-sm-12" data-id="tagAttribute" style="display:none"> </div>
</div>
</div>
</div>
\ No newline at end of file
...@@ -349,9 +349,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob ...@@ -349,9 +349,9 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Glob
html += '<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>' html += '<div><a href="javascript:void(0)" data-id="showMoreLessTerm" class="inputTag inputTagGreen"><span>Show More </span><i class="fa fa-angle-right"></i></a></div>'
} }
if (model.get('$id$')) { if (model.get('$id$')) {
html += '<div><a href="javascript:void(0)" class="inputAssignTag" data-id="addTerm" data-guid="' + model.get('$id$').id + '"><i class="fa fa-folder-o">' + " " + 'Assign Term</i></a></div>' html += '<div><a href="javascript:void(0)" class="inputAssignTag" data-id="addTerm" data-guid="' + model.get('$id$').id + '"><i class="fa fa-folder-o"></i>' + " " + 'Assign Term</a></div>'
} else { } else {
html += '<div><a href="javascript:void(0)" class="inputAssignTag" data-id="addTerm"><i class="fa fa-folder-o">' + " " + 'Assign Term</i></a></div>' html += '<div><a href="javascript:void(0)" class="inputAssignTag" data-id="addTerm"><i class="fa fa-folder-o"></i>' + " " + 'Assign Term</a></div>'
} }
return { return {
html: '<div class="termTableBreadcrumb" dataterm-id="' + id + '">' + html + '</div>', html: '<div class="termTableBreadcrumb" dataterm-id="' + id + '">' + html + '</div>',
......
...@@ -40,11 +40,15 @@ define(['require', ...@@ -40,11 +40,15 @@ define(['require',
ui: { ui: {
auditValue: "[data-id='auditValue']", auditValue: "[data-id='auditValue']",
auditCreate: "[data-id='auditCreate']", auditCreate: "[data-id='auditCreate']",
previousAuditData: "[data-id='previousAuditData']",
nextAuditData: "[data-id='nextAuditData']"
}, },
/** ui events hash */ /** ui events hash */
events: function() { events: function() {
var events = {}; var events = {};
events["click " + this.ui.auditCreate] = "onClickAuditCreate"; events["click " + this.ui.auditCreate] = "onClickAuditCreate";
events["click " + this.ui.nextAuditData] = "onClickNextAuditData";
events["click " + this.ui.previousAuditData] = "onClickPreviousAuditData";
return events; return events;
}, },
/** /**
...@@ -54,16 +58,17 @@ define(['require', ...@@ -54,16 +58,17 @@ define(['require',
initialize: function(options) { initialize: function(options) {
_.extend(this, _.pick(options, 'globalVent', 'guid')); _.extend(this, _.pick(options, 'globalVent', 'guid'));
this.entityCollection = new VEntityList(); this.entityCollection = new VEntityList();
this.count = 25;
this.entityCollection.url = "/api/atlas/entities/" + this.guid + "/audit"; this.entityCollection.url = "/api/atlas/entities/" + this.guid + "/audit";
this.entityCollection.modelAttrName = "events"; this.entityCollection.modelAttrName = "events"
//this.collectionObject = entityCollection;
this.entityModel = new this.entityCollection.model(); this.entityModel = new this.entityCollection.model();
this.pervOld = [];
this.commonTableOptions = { this.commonTableOptions = {
collection: this.entityCollection, collection: this.entityCollection,
includeFilter: false, includeFilter: false,
includePagination: true, includePagination: false,
includePageSize: false, includePageSize: false,
includeFooterRecords: true, includeFooterRecords: false,
gridOpts: { gridOpts: {
className: "table table-hover backgrid table-quickMenu", className: "table table-hover backgrid table-quickMenu",
emptyText: 'No records found!' emptyText: 'No records found!'
...@@ -72,16 +77,55 @@ define(['require', ...@@ -72,16 +77,55 @@ define(['require',
paginatorOpts: {} paginatorOpts: {}
}; };
}, },
bindEvents: function() {
this.listenTo(this.entityCollection, "reset", function(value) {
this.renderTableLayoutView();
}, this);
},
onRender: function() { onRender: function() {
this.entityCollection.fetch({ reset: true }); $.extend(this.entityCollection.queryParams, { count: this.count });
this.bindEvents(); this.fetchCollection({
next: this.ui.nextAuditData,
nextClick: false,
previous: this.ui.previousAuditData
});
this.renderTableLayoutView(); this.renderTableLayoutView();
}, },
fetchCollection: function(options) {
var that = this;
this.$('.fontLoader').show();
this.$('.auditTable').hide();
if (that.entityCollection.models.length > 1) {
if (options.nextClick) {
this.pervOld.push(that.entityCollection.first().get('eventKey'));
}
}
this.entityCollection.fetch({
success: function() {
that.$('.fontLoader').hide();
that.$('.auditTable').show();
options.previous.attr('disabled', true);
if (that.entityCollection.models.length <= 1) {
that.pervOld.pop();
options.next.attr('disabled', true);
}
if (that.entityCollection.models.length == 1 && that.next == that.entityCollection.last().get('eventKey')) {
options.next.attr('disabled', true);
options.previous.removeAttr("disabled");
} else {
if (that.entityCollection.models.length > 0) {
that.next = that.entityCollection.last().get('eventKey');
if (options.nextClick) {
options.previous.removeAttr("disabled");
}
if (options.previousClick) {
options.previous.removeAttr("disabled");
}
if (that.pervOld.length == 0) {
options.previous.attr('disabled', true);
}
}
that.renderTableLayoutView();
}
},
silent: true
});
},
renderTableLayoutView: function() { renderTableLayoutView: function() {
var that = this; var that = this;
require(['utils/TableLayout'], function(TableLayout) { require(['utils/TableLayout'], function(TableLayout) {
...@@ -161,8 +205,39 @@ define(['require', ...@@ -161,8 +205,39 @@ define(['require',
view.on('closeModal', function() { view.on('closeModal', function() {
modal.trigger('cancel'); modal.trigger('cancel');
}); });
view.$el.on('click', 'td a', function() {
modal.trigger('cancel');
})
});
},
onClickNextAuditData: function() {
var that = this;
this.ui.previousAuditData.removeAttr("disabled");
$.extend(this.entityCollection.queryParams, {
startKey: function() {
return that.next
}
});
this.fetchCollection({
next: this.ui.nextAuditData,
nextClick: true,
previous: this.ui.previousAuditData
}); });
} },
onClickPreviousAuditData: function() {
var that = this;
this.ui.nextAuditData.removeAttr("disabled");
$.extend(this.entityCollection.queryParams, {
startKey: function() {
return that.pervOld.pop()
}
});
this.fetchCollection({
next: this.ui.nextAuditData,
previousClick: true,
previous: this.ui.previousAuditData
});
},
}); });
return AuditTableLayoutView; return AuditTableLayoutView;
}); });
...@@ -111,9 +111,8 @@ define(['require', ...@@ -111,9 +111,8 @@ define(['require',
for (var i = 0; i < this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions.length; i++) { for (var i = 0; i < this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions.length; i++) {
var attribute = this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions; var attribute = this.commonCollection.models[0].attributes.traitTypes[0].attributeDefinitions;
this.ui.tagAttribute.show(); this.ui.tagAttribute.show();
strAttribute += '<div class="form-group"><label class="control-label col-sm-2">' + attribute[i].name + '</label>' + strAttribute += '<div class="form-group"><label>' + attribute[i].name + '</label>' +
'<div class="col-sm-10">' + '<input type="text" class="form-control attributeInputVal attrName" data-key="' + attribute[i].name + '" ></input></div>';
'<input type="text" class="form-control attributeInputVal attrName" data-key="' + attribute[i].name + '" ></input></div></div>';
this.ui.tagAttribute.html(strAttribute); this.ui.tagAttribute.html(strAttribute);
} }
if (this.commonCollection.models[0].attributes.traitTypes[0].superTypes.length > 0) { if (this.commonCollection.models[0].attributes.traitTypes[0].superTypes.length > 0) {
......
...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES: ALL CHANGES:
ATLAS-847 UI: Audit versioning does not paginate details from Atlas server (Kalyanikashikar via shwethags)
ATLAS-1004 Option to enable taxonomy feature (kevalbhatt18 via shwethags) ATLAS-1004 Option to enable taxonomy feature (kevalbhatt18 via shwethags)
ATLAS-1003 DataSetLineageServiceTest, GraphBackedDiscoveryServiceTest, and GraphRepoMapperScaleTest failing in some environments (dkantor via shwethags) ATLAS-1003 DataSetLineageServiceTest, GraphBackedDiscoveryServiceTest, and GraphRepoMapperScaleTest failing in some environments (dkantor via shwethags)
ATLAS-1002 Create default user rangertagsync in atlas file authentication for Ranger tag sync module (nixonrodrigues via shwethags) ATLAS-1002 Create default user rangertagsync in atlas file authentication for Ranger tag sync module (nixonrodrigues via shwethags)
......
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