Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csentry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Harrisson
csentry
Commits
06bfe426
Commit
06bfe426
authored
7 years ago
by
Benjamin Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Add parent to items table
parent
34843baa
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app/main/views.py
+1
-0
1 addition, 0 deletions
app/main/views.py
app/static/js/inventory.js
+1
-1
1 addition, 1 deletion
app/static/js/inventory.js
app/templates/index.html
+1
-0
1 addition, 0 deletions
app/templates/index.html
tests/functional/test_web.py
+1
-1
1 addition, 1 deletion
tests/functional/test_web.py
with
4 additions
and
2 deletions
app/main/views.py
+
1
−
0
View file @
06bfe426
...
@@ -53,6 +53,7 @@ def retrieve_items():
...
@@ -53,6 +53,7 @@ def retrieve_items():
utils
.
format_field
(
item
.
model
),
utils
.
format_field
(
item
.
model
),
utils
.
format_field
(
item
.
location
),
utils
.
format_field
(
item
.
location
),
utils
.
format_field
(
item
.
status
),
utils
.
format_field
(
item
.
status
),
utils
.
format_field
(
item
.
parent
),
]
for
item
in
items
]
]
for
item
in
items
]
return
jsonify
(
data
=
data
)
return
jsonify
(
data
=
data
)
...
...
This diff is collapsed.
Click to expand it.
app/static/js/inventory.js
+
1
−
1
View file @
06bfe426
...
@@ -19,7 +19,7 @@ $(document).ready(function() {
...
@@ -19,7 +19,7 @@ $(document).ready(function() {
"
searchable
"
:
false
"
searchable
"
:
false
},
},
{
{
"
targets
"
:
[
1
],
"
targets
"
:
[
1
,
9
],
"
render
"
:
function
(
data
,
type
,
row
)
{
"
render
"
:
function
(
data
,
type
,
row
)
{
// render funtion to create link to Item view page
// render funtion to create link to Item view page
if
(
data
===
null
)
{
if
(
data
===
null
)
{
...
...
This diff is collapsed.
Click to expand it.
app/templates/index.html
+
1
−
0
View file @
06bfe426
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<th>
Model
</th>
<th>
Model
</th>
<th>
Location
</th>
<th>
Location
</th>
<th>
Status
</th>
<th>
Status
</th>
<th>
Parent
</th>
</tr>
</tr>
</thead>
</thead>
</table>
</table>
...
...
This diff is collapsed.
Click to expand it.
tests/functional/test_web.py
+
1
−
1
View file @
06bfe426
...
@@ -82,4 +82,4 @@ def test_retrieve_items(logged_client, session):
...
@@ -82,4 +82,4 @@ def test_retrieve_items(logged_client, session):
response
=
get
(
logged_client
,
'
/_retrieve_items
'
)
response
=
get
(
logged_client
,
'
/_retrieve_items
'
)
items
=
response
.
json
[
'
data
'
]
items
=
response
.
json
[
'
data
'
]
assert
set
(
serial_numbers
)
==
set
(
item
[
4
]
for
item
in
items
)
assert
set
(
serial_numbers
)
==
set
(
item
[
4
]
for
item
in
items
)
assert
len
(
items
[
0
])
==
9
assert
len
(
items
[
0
])
==
10
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment