Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
d569e538
Commit
d569e538
authored
Nov 10, 2017
by
pratik pandey
Committed by
kevalbhatt
Dec 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1964 : UI, Support to resize and order columns in Search table
Signed-off-by:
kevalbhatt
<
kbhatt@apache.org
>
parent
eef3c089
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
8 deletions
+44
-8
gruntfile.js
dashboardv2/gruntfile.js
+3
-1
package.json
dashboardv2/package.json
+1
-0
search.scss
dashboardv2/public/css/scss/search.scss
+20
-0
main.js
dashboardv2/public/js/main.js
+2
-1
Utils.js
dashboardv2/public/js/utils/Utils.js
+3
-3
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+15
-3
No files found.
dashboardv2/gruntfile.js
View file @
d569e538
...
...
@@ -103,7 +103,8 @@ module.exports = function(grunt) {
'query-builder.standalone.min.js'
:
{
'jQuery-QueryBuilder/dist/js'
:
'jQueryQueryBuilder/js'
},
'daterangepicker.js'
:
{
'bootstrap-daterangepicker'
:
'bootstrap-daterangepicker/js'
},
'nv.d3.min.js'
:
{
'nvd3/build'
:
'nvd3'
},
'jquery.sparkline.min.js'
:
{
'jquery-sparkline'
:
'sparkline'
}
'jquery.sparkline.min.js'
:
{
'jquery-sparkline'
:
'sparkline'
},
'table-dragger.js'
:
{
'table-dragger/dist'
:
'table-dragger'
}
}
},
...
...
@@ -164,6 +165,7 @@ module.exports = function(grunt) {
{
'nvd3'
:
'nvd3/'
}
],
'license.txt'
:
[{
'backbone.marionette'
:
'backbone-marionette'
}],
'license'
:
[{
'table-dragger'
:
'table-dragger'
}],
'LICENSE-MIT'
:
[{
'backbone.paginator'
:
'backbone-paginator'
},
{
'backgrid'
:
'backgrid'
},
{
'backgrid-filter'
:
'backgrid-filter'
},
...
...
dashboardv2/package.json
View file @
d569e538
...
...
@@ -44,6 +44,7 @@
"requirejs"
:
"2.3.3"
,
"requirejs-text"
:
"2.0.15"
,
"select2"
:
"4.0.3"
,
"table-dragger"
:
"^1.0.2"
,
"underscore"
:
"1.8.3"
},
"devDependencies"
:
{
...
...
dashboardv2/public/css/scss/search.scss
View file @
d569e538
...
...
@@ -102,4 +102,23 @@ $color_celeste_approx: #1D1F2B;
.btn
{
display
:
block
;
}
}
.gu-mirror
{
.table-quickMenu
{
border
:
none
;
td
{
height
:
54px
;
}
}
}
.sindu_dragger
{
@extend
.gu-mirror
;
.gu-transit
{
box-shadow
:
0px
1px
15px
inset
;
}
table
{
background
:
rgba
(
0
,
0
,
0
,
0
.18
)
!
important
;
}
}
\ No newline at end of file
dashboardv2/public/js/main.js
View file @
d569e538
...
...
@@ -159,7 +159,8 @@ require.config({
'query-builder'
:
'libs/jQueryQueryBuilder/js/query-builder.standalone.min'
,
'daterangepicker'
:
'libs/bootstrap-daterangepicker/js/daterangepicker'
,
'nvd3'
:
'libs/nvd3/nv.d3.min'
,
'sparkline'
:
'libs/sparkline/jquery.sparkline.min'
'sparkline'
:
'libs/sparkline/jquery.sparkline.min'
,
'table-dragger'
:
'libs/table-dragger/table-dragger'
},
/**
...
...
dashboardv2/public/js/utils/Utils.js
View file @
d569e538
...
...
@@ -448,7 +448,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
titleBoxEl
.
fadeIn
();
}
Utils
.
findAndMergeRefEntity
=
function
(
attributeObject
,
referredEntities
)
{
var
megeObject
=
function
(
obj
)
{
var
me
r
geObject
=
function
(
obj
)
{
if
(
obj
)
{
if
(
obj
.
attributes
)
{
Utils
.
findAndMergeRefEntity
(
obj
.
attributes
,
referredEntities
);
...
...
@@ -462,10 +462,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
if
(
_
.
isObject
(
obj
))
{
if
(
_
.
isArray
(
obj
))
{
_
.
each
(
obj
,
function
(
value
)
{
megeObject
(
value
);
me
r
geObject
(
value
);
});
}
else
{
megeObject
(
obj
);
me
r
geObject
(
obj
);
}
}
});
...
...
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
d569e538
...
...
@@ -18,6 +18,7 @@
define
([
'require'
,
'backbone'
,
'table-dragger'
,
'hbs!tmpl/search/SearchResultLayoutView_tmpl'
,
'modules/Modal'
,
'models/VEntity'
,
...
...
@@ -29,7 +30,7 @@ define(['require',
'utils/Messages'
,
'utils/Enums'
,
'utils/UrlLinks'
],
function
(
require
,
Backbone
,
SearchResultLayoutViewTmpl
,
Modal
,
VEntity
,
Utils
,
Globals
,
VSearchList
,
VCommon
,
CommonViewFunction
,
Messages
,
Enums
,
UrlLinks
)
{
],
function
(
require
,
Backbone
,
tableDragger
,
SearchResultLayoutViewTmpl
,
Modal
,
VEntity
,
Utils
,
Globals
,
VSearchList
,
VCommon
,
CommonViewFunction
,
Messages
,
Enums
,
UrlLinks
)
{
'use strict'
;
var
SearchResultLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
...
@@ -129,6 +130,7 @@ define(['require',
this
.
bradCrumbList
=
[];
this
.
arr
=
[];
this
.
searchType
=
'Basic Search'
;
this
.
columnOrder
=
null
;
if
(
this
.
value
)
{
if
(
this
.
value
.
searchType
&&
this
.
value
.
searchType
==
'dsl'
)
{
this
.
searchType
=
'Advanced Search'
;
...
...
@@ -239,7 +241,7 @@ define(['require',
},
gridOpts
:
{
emptyText
:
'No Record found!'
,
className
:
'table table-hover backgrid table-quickMenu'
className
:
'table table-hover backgrid table-quickMenu
colSort
'
},
filterOpts
:
{},
paginatorOpts
:
{}
...
...
@@ -494,7 +496,7 @@ define(['require',
},
setPositions
:
function
()
{
_
.
each
(
this
.
models
,
function
(
model
,
index
)
{
model
.
set
(
"displayOrder"
,
index
+
1
,
{
silent
:
true
});
model
.
set
(
"displayOrder"
,
(
that
.
columnOrder
==
null
?
index
:
that
.
columnOrder
[
model
.
get
(
'label'
)])
+
1
,
{
silent
:
true
});
});
return
this
;
}
...
...
@@ -511,9 +513,19 @@ define(['require',
that
.
ui
.
containerCheckBox
.
hide
();
}
that
.
$
(
".ellipsis .inputAssignTag"
).
hide
();
tableDragger
(
document
.
querySelector
(
".colSort"
)).
on
(
'drop'
,
function
(
from
,
to
,
el
)
{
that
.
columnOrder
=
that
.
getColumnOrder
(
el
.
querySelectorAll
(
'th'
));
});
that
.
checkTableFetch
();
});
},
getColumnOrder
:
function
(
arr
)
{
var
obj
=
{};
for
(
var
i
=
0
;
i
<
arr
.
length
;
++
i
)
{
obj
[(
arr
[
i
].
innerText
==
""
?
'Select'
:
arr
[
i
].
innerText
)]
=
i
;
}
return
obj
;
},
checkTableFetch
:
function
()
{
if
(
this
.
asyncFetchCounter
<=
0
)
{
this
.
hideLoader
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment