Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
TMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
CC-IN2P3 Applications team
TMS
Commits
7bd31595
Commit
7bd31595
authored
2 years ago
by
ZZZ[GONE] PERRIER Guillaume
Browse files
Options
Downloads
Patches
Plain Diff
Module Lot : Setup page with split js code.
parent
0e8dc0f8
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Module Tapes : Try fixing bug 'Mixed Content The page at was loaded over...
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tms/assets/js/app.js
+1
-13
1 addition, 13 deletions
tms/assets/js/app.js
tms/templates/lots/main.html.twig
+121
-171
121 additions, 171 deletions
tms/templates/lots/main.html.twig
tms/webpack.config.js
+1
-0
1 addition, 0 deletions
tms/webpack.config.js
with
123 additions
and
184 deletions
tms/assets/js/app.js
+
1
−
13
View file @
7bd31595
...
...
@@ -21,15 +21,7 @@ require('datatables.net-bs4');
require
(
'
chart.js
'
);
require
(
'
chartjs-plugin-colorschemes
'
);
require
(
'
../images/tapes.jpg
'
);
require
(
'
../images/tape_logo.png
'
);
require
(
'
../images/tapes_view.jpg
'
);
require
(
'
../images/tms-black.png
'
);
require
(
'
../images/library.jpg
'
);
require
(
'
../images/library2.jpg
'
);
require
(
'
../images/library3.jpg
'
);
require
(
'
../images/gitlab.png
'
);
require
(
'
../images/favicon.ico
'
);
require
(
'
@fortawesome/fontawesome-free/css/all.min.css
'
);
require
(
'
@fortawesome/fontawesome-free/js/all.js
'
);
...
...
@@ -47,9 +39,5 @@ $(document).ready(function() {
}
);
$
(
'
.carousel
'
).
carousel
();
});
This diff is collapsed.
Click to expand it.
tms/templates/lots/main.html.twig
+
121
−
171
View file @
7bd31595
{%
extends
'base.html.twig'
%}
{%
block
body
%}
<div
class=
"container"
>
<div
class=
"container"
>
{%
if
tapes
is
null
%}
{%
if
tapes
is
null
%}
<div
class=
"row m-5"
></div>
<div
class=
"row"
>
<div
class=
"h4"
>
<img
alt=
"logo"
class=
"ml-2"
height=
"100px"
src=
"
{{
asset
(
'build/images/tms-black.png'
)
}}
"
>
LOTS
</div>
</div>
<hr/>
<div
class=
"row m-2 p-2"
>
<div
class=
"messagedanger m-2 d-none spinner-border text-danger"
role=
"status"
></div>
<div
class=
"messagedanger ml-2 d-none alert alert-info"
>
Base de données - Mise à jour en cours ...
</div>
<div
id=
"messageError"
class=
"ml-2 alert alert-danger d-none"
>
Problème de mise à jour
</div>
<div
class=
"row m-5"
></div>
<div
class=
"row"
>
<div
class=
"h4"
>
<img
alt=
"logo"
class=
"ml-2"
height=
"100px"
src=
"
{{
asset
(
'build/images/tms-black.png'
)
}}
"
>
LOTS
</div>
</div>
<hr/>
<div
class=
"row m-2 p-2"
>
<div
class=
"messagedanger m-2 d-none spinner-border text-danger"
role=
"status"
></div>
<div
class=
"messagedanger ml-2 d-none alert alert-info"
>
Base de données - Mise à jour en cours ...
</div>
<div
id=
"messageError"
class=
"ml-2 alert alert-danger d-none"
>
Problème de mise à jour
</div>
</div>
<div
class=
"col-12 text-left border-primary p-4"
style=
"border-left : 4px solid;"
>
<table
id=
"tableLots"
class=
" dataTable table-striped m-4 table table-bordered"
>
<thead>
<div
class=
"col-12 text-left border-primary p-4"
style=
"border-left : 4px solid;"
>
<table
id=
"tableLots"
class=
" dataTable table-striped m-4 table table-bordered"
>
<thead>
<tr>
<th>
ID
</th>
<th>
Nb tapes
</th>
<th>
Modèle
</th>
<th>
Statut
</th>
<th>
Date Creation
</th>
<th>
Date Livraison
</th>
<th>
Date mise en service
</th>
</tr>
</thead>
<tbody>
{%
for
lot
in
lots
%}
<tr>
<th>
ID
</th>
<th>
Nb tapes
</th>
<th>
Modèle
</th>
<th>
Statut
</th>
<th>
Date Creation
</th>
<th>
Date Livraison
</th>
<th>
Date mise en service
</th>
<td>
{{
lot.lotid
}}
</td>
<td><span
class=
"badge bg-info small"
>
{{
lot.tapesnb
}}
</span></td>
<td>
{{
lot.tapesmodeleid.nom
}}
</td>
<td>
{{
lot.statutid.statut
}}
</td>
<td>
<span
class=
"badge bg-dark text-white small"
>
{{
lot.datecreation
|
date
(
'Y-m-d H:i'
)
}}
</span>
</td>
{%
if
lot.datelivraison
is
null
%}
<td><span
class=
"badge bg-default border border-dark"
>
N.A
</span></td>
{%
else
%}
<td>
<span
class=
"badge bg-primary small"
>
{{
lot.datelivraison
|
date
(
'Y-m-d H:i'
)
}}
</span>
</td>
{%
endif
%}
{%
if
lot.datemiseservice
is
null
%}
<td><span
class=
"badge bg-default border border-dark"
>
N.A
</span></td>
{%
else
%}
<td>
<span
class=
"badge bg-success small"
>
{{
lot.datemiseservice
|
date
(
'Y-m-d H:i'
)
}}
</span>
</td>
{%
endif
%}
</tr>
</thead>
<tbody>
{%
for
lot
in
lots
%}
<tr>
<td>
{{
lot.lotid
}}
</td>
<td><span
class=
"badge badge-info small"
>
{{
lot.tapesnb
}}
</span></td>
<td>
{{
lot.tapesmodeleid.nom
}}
</td>
<td>
{{
lot.statutid.statut
}}
</td>
<td><span
class=
"badge badge-dark text-white small"
>
{{
lot.datecreation
|
date
(
'Y-m-d H:i'
)
}}
</span></td>
{%
if
lot.datelivraison
is
null
%}
<td><span
class=
"badge badge-default border border-dark"
>
N.A
</span></td>
{%
else
%}
<td><span
class=
"badge badge-primary small"
>
{{
lot.datelivraison
|
date
(
'Y-m-d H:i'
)
}}
</span></td>
{%
endif
%}
{%
if
lot.datemiseservice
is
null
%}
<td><span
class=
"badge badge-default border border-dark"
>
N.A
</span></td>
{%
else
%}
<td><span
class=
"badge badge-success small"
>
{{
lot.datemiseservice
|
date
(
'Y-m-d H:i'
)
}}
</span></td>
{%
endif
%}
</tr>
{%
endfor
%}
</tbody>
</table>
</div>
{%
endfor
%}
</tbody>
</table>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-12"
><hr/></div>
<div
class=
"row"
>
<div
class=
"col-12"
>
<hr/>
</div>
</div>
{%
else
%}
<div
class=
"row m-5"
></div>
<div
class=
"row"
>
<div
class=
"h4"
>
<img
alt=
"logo"
class=
"ml-2"
height=
"100px"
src=
"
{{
asset
(
'build/images/tms-black.png'
)
}}
"
>
LOT #
{{
lots.lotid
}}
</div>
</div>
<hr/>
{%
else
%}
<div
class=
"row m-5"
></div>
<div
class=
"row"
>
<div
class=
"float-left col-6"
>
<h3><span
class=
"badge badge-
{{
lots.statutid.color
}}
"
>
{{
lots.statutid.statut
}}
</span><span
class=
"ml-3 badge badge-primary"
>
{{
lots.tapesmodeleid.nom
}}
</span></h3>
</div>
<input
class=
"d-none"
id=
"lotid"
value=
"
{{
lots.lotid
}}
"
/>
<div
class=
"float-right text-right col-6"
>
{%
if
lots.statutid.statutid
==
'36'
%}
<span
>
<i
class=
"m-2 fas fa-truck"
></i><a
class=
"change_status"
id=
"38"
href=
"#"
>
Commande Livrée
</a></span>
{%
endif
%}
{%
if
lots.statutid.statutid
==
'38'
%}
<span>
<i
class=
"m-2 fas fa-warehouse"
></i><a
href=
"#"
class=
"change_status"
id=
"40"
>
Mise en Service
</a></span>
{%
endif
%}
</div>
<div
class=
"h4"
>
<img
alt=
"logo"
class=
"ml-2"
height=
"100px"
src=
"
{{
asset
(
'build/images/tms-black.png'
)
}}
"
>
LOT #
{{
lots.lotid
}}
</div>
</div>
<hr/>
<div
class=
"row"
>
<div
class=
"float-left col-6"
>
<h3><span
class=
"badge bg-
{{
lots.statutid.color
}}
"
>
{{
lots.statutid.statut
}}
</span><span
class=
"ml-3 badge bg-primary"
>
{{
lots.tapesmodeleid.nom
}}
</span></h3>
</div>
<input
class=
"d-none"
id=
"lotid"
value=
"
{{
lots.lotid
}}
"
/>
<div
class=
"float-right text-right col-6"
>
<div
class=
"row m-2 p-2"
>
<div
class=
"messagedanger m-2 d-none spinner-border text-danger"
role=
"status"
></div>
<div
class=
"messagedanger ml-2 d-none alert alert-info"
>
Base de données - Mise à jour en cours ...
</div>
<div
id=
"messageError"
class=
"ml-2 alert alert-danger d-none"
>
Problème de mise à jour
</div>
</div>
<div
class=
"col-12 text-left border-primary p-4"
style=
"border-left : 4px solid;"
>
{%
if
lots.statutid.statutid
==
'36'
%}
<span>
<i
class=
"m-2 fas fa-truck"
></i><a
class=
"change_status"
id=
"38"
href=
"#"
>
Commande Livrée
</a></span>
{%
endif
%}
{%
if
lots.statutid.statutid
==
'38'
%}
<span>
<i
class=
"m-2 fas fa-warehouse"
></i><a
href=
"#"
class=
"change_status"
id=
"40"
>
Mise en Service
</a></span>
{%
endif
%}
</div>
</div>
<table
id=
"tableTapes"
class=
" dataTable table-striped m-4 table table-bordered"
>
<div
class=
"row m-2 p-2"
>
<div
class=
"messagedanger m-2 d-none spinner-border text-danger"
role=
"status"
></div>
<div
class=
"messagedanger ml-2 d-none alert alert-info"
>
Base de données - Mise à jour en cours ...
</div>
<div
id=
"messageError"
class=
"ml-2 alert alert-danger d-none"
>
Problème de mise à jour
</div>
</div>
<thead>
<tr>
<th>
Label
</th>
<th>
Modele
</th>
<th>
Statut
</th>
<th>
Service
</th>
<th>
Librairie
</th>
<th>
Date de création
</th>
</tr>
</thead>
<tbody>
{%
for
tape
in
tapes
%}
<div
class=
"col-12 text-left border-primary p-4"
style=
"border-left : 4px solid;"
>
<table
id=
"tableTapes"
class=
" dataTable table-striped m-4 table table-bordered"
>
<thead>
<tr>
<th>
Label
</th>
<th>
Modele
</th>
<th>
Statut
</th>
<th>
Service
</th>
<th>
Librairie
</th>
<th>
Date de création
</th>
</tr>
</thead>
<tbody>
{%
for
tape
in
tapes
%}
<tr>
<td>
{{
tape.label
}}
</td>
<td>
{{
tape.modeleid.nom
}}
</td>
<td><span
class=
"badge badge-
{{
tape.statutid.color
}}
text-white small"
>
{{
tape.statutid.statut
}}
</span></td>
<td>
<span
class=
"badge bg-
{{
tape.statutid.color
}}
text-white small"
>
{{
tape.statutid.statut
}}
</span>
</td>
<td>
{{
tape.serviceid.nom
}}
</td>
<td>
{{
tape.librairieid.nom
}}
</td>
<td><span
class=
"badge badge-dark text-white small"
>
{{
tape.datecreation
|
date
(
'Y-m-d H:i'
)
}}
</span></td>
</tr>
{%
endfor
%}
</tbody>
</table>
</div>
<div
class=
"row"
>
<div
class=
"col-12"
><hr/></div>
<td>
<span
class=
"badge bg-dark text-white small"
>
{{
tape.datecreation
|
date
(
'Y-m-d H:i'
)
}}
</span>
</td>
</tr>
{%
endfor
%}
</tbody>
</table>
</div>
<div
class=
"row"
>
<div
class=
"col-12"
>
<hr/>
</div>
</div>
</div>
{%
endif
%}
{%
endif
%}
</div>
{%
endblock
%}
{%
block
javascripts
%}
<script>
$
(
document
).
ready
(
function
()
{
$
(
'
.change_status
'
).
click
(
function
()
{
$
.
ajax
({
url
:
'
/changeLotStatus
'
,
type
:
"
POST
"
,
dataType
:
"
json
"
,
data
:
{
"
lotid
"
:
$
(
"
#lotid
"
).
val
(),
"
statutid
"
:
$
(
this
).
attr
(
'
id
'
)
},
async
:
false
,
success
:
function
(
data
)
{
$
(
"
.messagedanger
"
).
removeClass
(
'
d-none
'
);
$
(
"
.messagedanger
"
).
fadeOut
(
3000
);
setInterval
(
function
()
{
location
.
reload
();
},
3000
);
},
error
:
function
(
xhr
,
textStatus
,
errorThrown
)
{
$
(
"
#messageError
"
).
removeClass
(
'
d-none
'
);
$
(
"
#messageError
"
).
fadeOut
(
1000
);
}
});
})
});
</script>
{%
block
javascripts
%}
{{
parent
()
}}
{{
encore_entry_script_tags
(
'lot'
)
}}
{%
endblock
%}
This diff is collapsed.
Click to expand it.
tms/webpack.config.js
+
1
−
0
View file @
7bd31595
...
...
@@ -27,6 +27,7 @@ Encore
})
.
addEntry
(
'
home
'
,
'
./assets/js/home.js
'
)
.
addEntry
(
'
command
'
,
'
./assets/js/command.js
'
)
.
addEntry
(
'
lot
'
,
'
./assets/js/lot.js
'
)
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
.
enableStimulusBridge
(
'
./assets/controllers.json
'
)
...
...
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