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
7 years ago
by
pratik pandey
Committed by
kevalbhatt
7 years ago
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
Show 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) {
...
@@ -103,7 +103,8 @@ module.exports = function(grunt) {
'query-builder.standalone.min.js'
:
{
'jQuery-QueryBuilder/dist/js'
:
'jQueryQueryBuilder/js'
},
'query-builder.standalone.min.js'
:
{
'jQuery-QueryBuilder/dist/js'
:
'jQueryQueryBuilder/js'
},
'daterangepicker.js'
:
{
'bootstrap-daterangepicker'
:
'bootstrap-daterangepicker/js'
},
'daterangepicker.js'
:
{
'bootstrap-daterangepicker'
:
'bootstrap-daterangepicker/js'
},
'nv.d3.min.js'
:
{
'nvd3/build'
:
'nvd3'
},
'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) {
...
@@ -164,6 +165,7 @@ module.exports = function(grunt) {
{
'nvd3'
:
'nvd3/'
}
{
'nvd3'
:
'nvd3/'
}
],
],
'license.txt'
:
[{
'backbone.marionette'
:
'backbone-marionette'
}],
'license.txt'
:
[{
'backbone.marionette'
:
'backbone-marionette'
}],
'license'
:
[{
'table-dragger'
:
'table-dragger'
}],
'LICENSE-MIT'
:
[{
'backbone.paginator'
:
'backbone-paginator'
},
'LICENSE-MIT'
:
[{
'backbone.paginator'
:
'backbone-paginator'
},
{
'backgrid'
:
'backgrid'
},
{
'backgrid'
:
'backgrid'
},
{
'backgrid-filter'
:
'backgrid-filter'
},
{
'backgrid-filter'
:
'backgrid-filter'
},
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/package.json
View file @
d569e538
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
"requirejs"
:
"2.3.3"
,
"requirejs"
:
"2.3.3"
,
"requirejs-text"
:
"2.0.15"
,
"requirejs-text"
:
"2.0.15"
,
"select2"
:
"4.0.3"
,
"select2"
:
"4.0.3"
,
"table-dragger"
:
"^1.0.2"
,
"underscore"
:
"1.8.3"
"underscore"
:
"1.8.3"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/css/scss/search.scss
View file @
d569e538
...
@@ -103,3 +103,22 @@ $color_celeste_approx: #1D1F2B;
...
@@ -103,3 +103,22 @@ $color_celeste_approx: #1D1F2B;
display
:
block
;
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
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/main.js
View file @
d569e538
...
@@ -159,7 +159,8 @@ require.config({
...
@@ -159,7 +159,8 @@ require.config({
'query-builder'
:
'libs/jQueryQueryBuilder/js/query-builder.standalone.min'
,
'query-builder'
:
'libs/jQueryQueryBuilder/js/query-builder.standalone.min'
,
'daterangepicker'
:
'libs/bootstrap-daterangepicker/js/daterangepicker'
,
'daterangepicker'
:
'libs/bootstrap-daterangepicker/js/daterangepicker'
,
'nvd3'
:
'libs/nvd3/nv.d3.min'
,
'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'
},
},
/**
/**
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/utils/Utils.js
View file @
d569e538
...
@@ -448,7 +448,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
...
@@ -448,7 +448,7 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
titleBoxEl
.
fadeIn
();
titleBoxEl
.
fadeIn
();
}
}
Utils
.
findAndMergeRefEntity
=
function
(
attributeObject
,
referredEntities
)
{
Utils
.
findAndMergeRefEntity
=
function
(
attributeObject
,
referredEntities
)
{
var
megeObject
=
function
(
obj
)
{
var
me
r
geObject
=
function
(
obj
)
{
if
(
obj
)
{
if
(
obj
)
{
if
(
obj
.
attributes
)
{
if
(
obj
.
attributes
)
{
Utils
.
findAndMergeRefEntity
(
obj
.
attributes
,
referredEntities
);
Utils
.
findAndMergeRefEntity
(
obj
.
attributes
,
referredEntities
);
...
@@ -462,10 +462,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
...
@@ -462,10 +462,10 @@ define(['require', 'utils/Globals', 'pnotify', 'utils/Messages', 'utils/Enums',
if
(
_
.
isObject
(
obj
))
{
if
(
_
.
isObject
(
obj
))
{
if
(
_
.
isArray
(
obj
))
{
if
(
_
.
isArray
(
obj
))
{
_
.
each
(
obj
,
function
(
value
)
{
_
.
each
(
obj
,
function
(
value
)
{
megeObject
(
value
);
me
r
geObject
(
value
);
});
});
}
else
{
}
else
{
megeObject
(
obj
);
me
r
geObject
(
obj
);
}
}
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
d569e538
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
define
([
'require'
,
define
([
'require'
,
'backbone'
,
'backbone'
,
'table-dragger'
,
'hbs!tmpl/search/SearchResultLayoutView_tmpl'
,
'hbs!tmpl/search/SearchResultLayoutView_tmpl'
,
'modules/Modal'
,
'modules/Modal'
,
'models/VEntity'
,
'models/VEntity'
,
...
@@ -29,7 +30,7 @@ define(['require',
...
@@ -29,7 +30,7 @@ define(['require',
'utils/Messages'
,
'utils/Messages'
,
'utils/Enums'
,
'utils/Enums'
,
'utils/UrlLinks'
'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'
;
'use strict'
;
var
SearchResultLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
var
SearchResultLayoutView
=
Backbone
.
Marionette
.
LayoutView
.
extend
(
...
@@ -129,6 +130,7 @@ define(['require',
...
@@ -129,6 +130,7 @@ define(['require',
this
.
bradCrumbList
=
[];
this
.
bradCrumbList
=
[];
this
.
arr
=
[];
this
.
arr
=
[];
this
.
searchType
=
'Basic Search'
;
this
.
searchType
=
'Basic Search'
;
this
.
columnOrder
=
null
;
if
(
this
.
value
)
{
if
(
this
.
value
)
{
if
(
this
.
value
.
searchType
&&
this
.
value
.
searchType
==
'dsl'
)
{
if
(
this
.
value
.
searchType
&&
this
.
value
.
searchType
==
'dsl'
)
{
this
.
searchType
=
'Advanced Search'
;
this
.
searchType
=
'Advanced Search'
;
...
@@ -239,7 +241,7 @@ define(['require',
...
@@ -239,7 +241,7 @@ define(['require',
},
},
gridOpts
:
{
gridOpts
:
{
emptyText
:
'No Record found!'
,
emptyText
:
'No Record found!'
,
className
:
'table table-hover backgrid table-quickMenu'
className
:
'table table-hover backgrid table-quickMenu
colSort
'
},
},
filterOpts
:
{},
filterOpts
:
{},
paginatorOpts
:
{}
paginatorOpts
:
{}
...
@@ -494,7 +496,7 @@ define(['require',
...
@@ -494,7 +496,7 @@ define(['require',
},
},
setPositions
:
function
()
{
setPositions
:
function
()
{
_
.
each
(
this
.
models
,
function
(
model
,
index
)
{
_
.
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
;
return
this
;
}
}
...
@@ -511,9 +513,19 @@ define(['require',
...
@@ -511,9 +513,19 @@ define(['require',
that
.
ui
.
containerCheckBox
.
hide
();
that
.
ui
.
containerCheckBox
.
hide
();
}
}
that
.
$
(
".ellipsis .inputAssignTag"
).
hide
();
that
.
$
(
".ellipsis .inputAssignTag"
).
hide
();
tableDragger
(
document
.
querySelector
(
".colSort"
)).
on
(
'drop'
,
function
(
from
,
to
,
el
)
{
that
.
columnOrder
=
that
.
getColumnOrder
(
el
.
querySelectorAll
(
'th'
));
});
that
.
checkTableFetch
();
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
()
{
checkTableFetch
:
function
()
{
if
(
this
.
asyncFetchCounter
<=
0
)
{
if
(
this
.
asyncFetchCounter
<=
0
)
{
this
.
hideLoader
();
this
.
hideLoader
();
...
...
This diff is collapsed.
Click to expand it.
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