Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
web app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
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
ICNML
web app
Commits
b01b5f54
Commit
b01b5f54
authored
5 years ago
by
Marco De Donno
Browse files
Options
Downloads
Patches
Plain Diff
Add the check mark for the general pattern on the segment page
parent
fd0a785d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
module.py
+4
-1
4 additions, 1 deletion
module.py
templates/submission/segment.html
+62
-1
62 additions, 1 deletion
templates/submission/segment.html
with
66 additions
and
2 deletions
module.py
+
4
−
1
View file @
b01b5f54
...
@@ -1716,6 +1716,9 @@ def submission_segment( id, tid, pc ):
...
@@ -1716,6 +1716,9 @@ def submission_segment( id, tid, pc ):
sql
=
"
SELECT name FROM pc WHERE id = %s
"
sql
=
"
SELECT name FROM pc WHERE id = %s
"
pc_name
=
config
.
db
.
query
(
sql
,
(
pc
,
)
).
fetchone
()[
0
]
pc_name
=
config
.
db
.
query
(
sql
,
(
pc
,
)
).
fetchone
()[
0
]
sql
=
"
SELECT gp.name FROM files_segments LEFT JOIN gp ON files_segments.gp = gp.id WHERE files_segments.tenprint = %s AND files_segments.pc = %s
"
current_gp
=
config
.
db
.
query
(
sql
,
(
tid
,
pc
,
)
).
fetchone
()[
0
]
return
render_template
(
return
render_template
(
"
submission/segment.html
"
,
"
submission/segment.html
"
,
baseurl
=
baseurl
,
baseurl
=
baseurl
,
...
@@ -1724,11 +1727,11 @@ def submission_segment( id, tid, pc ):
...
@@ -1724,11 +1727,11 @@ def submission_segment( id, tid, pc ):
session_timeout
=
config
.
session_timeout
,
session_timeout
=
config
.
session_timeout
,
submission_id
=
id
,
submission_id
=
id
,
nickname
=
nickname
,
nickname
=
nickname
,
file
=
{},
pc_name
=
pc_name
,
pc_name
=
pc_name
,
tp_filename
=
tp_filename
,
tp_filename
=
tp_filename
,
tid
=
tid
,
tid
=
tid
,
pc
=
pc
,
pc
=
pc
,
current_gp
=
current_gp
,
session_security_key
=
session
.
get
(
"
session_security_key
"
)
session_security_key
=
session
.
get
(
"
session_security_key
"
)
)
)
...
...
This diff is collapsed.
Click to expand it.
templates/submission/segment.html
+
62
−
1
View file @
b01b5f54
...
@@ -20,6 +20,9 @@
...
@@ -20,6 +20,9 @@
var
update_general_pattern_db
=
function
(
gp
)
var
update_general_pattern_db
=
function
(
gp
)
{
{
$
(
"
.gp_checked
"
).
css
(
"
visibility
"
,
"
hidden
"
)
$
(
"
#gp_
"
+
gp
+
"
_checked
"
).
css
(
"
visibility
"
,
"
visible
"
);
$
.
ajax
(
{
$
.
ajax
(
{
url
:
"
{{ url_for( 'submission_segment_set_gp', id = submission_id, tid = tid, pc = pc ) }}
"
,
url
:
"
{{ url_for( 'submission_segment_set_gp', id = submission_id, tid = tid, pc = pc ) }}
"
,
dataType
:
'
json
'
,
dataType
:
'
json
'
,
...
@@ -30,6 +33,10 @@
...
@@ -30,6 +33,10 @@
success
:
function
(
data
)
success
:
function
(
data
)
{
{
console
.
log
(
data
);
console
.
log
(
data
);
},
error
:
function
(
data
)
{
toastr
.
error
(
"
Error
"
);
}
}
}
);
}
);
}
}
...
@@ -55,6 +62,14 @@
...
@@ -55,6 +62,14 @@
.icnml_box_fields
{
.icnml_box_fields
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.gp_checked
{
visibility
:
hidden
;
position
:
absolute
;
margin-top
:
0px
;
margin-bottom
:
0px
;
right
:
-8px
;
top
:
-8px
;
}
</style>
</style>
</head>
</head>
<body
class=
"icnml_main_layout"
>
<body
class=
"icnml_main_layout"
>
...
@@ -63,7 +78,7 @@
...
@@ -63,7 +78,7 @@
<div
class=
"icnml_content"
>
<div
class=
"icnml_content"
>
<div
class=
"icnml_lp_oneperpage"
>
<div
class=
"icnml_lp_oneperpage"
>
<form
id=
"icnml_file_update_{{ file[ 'uuid' ] }}"
>
<form>
<div
class=
"ui-widget-header ui-corner-top icnml_box_top"
>
Segment '{{ pc_name }}'
</div>
<div
class=
"ui-widget-header ui-corner-top icnml_box_top"
>
Segment '{{ pc_name }}'
</div>
<div
class=
"ui-widget-content ui-corner-bottom icnml_box_content"
>
<div
class=
"ui-widget-content ui-corner-bottom icnml_box_content"
>
<div
class=
"icnml_lp_cardbox"
>
<div
class=
"icnml_lp_cardbox"
>
...
@@ -80,15 +95,59 @@
...
@@ -80,15 +95,59 @@
<div
id=
"general_pattern"
>
<div
id=
"general_pattern"
>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_loop"
>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_loop"
>
<span
class=
"ui-button-text"
>
Loop
</span>
<span
class=
"ui-button-text"
>
Loop
</span>
<div
class=
"gp_checked"
id=
"gp_loop_checked"
>
<svg
width=
"20px"
height=
"20px"
viewBox=
"0 0 54 54"
version=
"1.1"
>
<g
id=
""
fill-rule=
"evenodd"
>
<path
d=
"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"
stroke=
"#747474"
stroke-opacity=
"0.198794158"
fill=
"#109618"
fill-opacity=
"0.816519475"
></path>
</g>
</svg>
</div>
</div>
</div>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_whorl"
>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_whorl"
>
<span
class=
"ui-button-text"
>
Whorl
</span>
<span
class=
"ui-button-text"
>
Whorl
</span>
<div
class=
"gp_checked"
id=
"gp_whorl_checked"
>
<svg
width=
"20px"
height=
"20px"
viewBox=
"0 0 54 54"
version=
"1.1"
>
<g
id=
""
fill-rule=
"evenodd"
>
<path
d=
"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"
stroke=
"#747474"
stroke-opacity=
"0.198794158"
fill=
"#109618"
fill-opacity=
"0.816519475"
></path>
</g>
</svg>
</div>
</div>
</div>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_arch"
>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_arch"
>
<span
class=
"ui-button-text"
>
Arch
</span>
<span
class=
"ui-button-text"
>
Arch
</span>
<div
class=
"gp_checked"
id=
"gp_arch_checked"
>
<svg
width=
"20px"
height=
"20px"
viewBox=
"0 0 54 54"
version=
"1.1"
>
<g
id=
""
fill-rule=
"evenodd"
>
<path
d=
"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"
stroke=
"#747474"
stroke-opacity=
"0.198794158"
fill=
"#109618"
fill-opacity=
"0.816519475"
></path>
</g>
</svg>
</div>
</div>
</div>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_unknown"
>
<div
class=
"ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
id=
"general_pattern_unknown"
>
<span
class=
"ui-button-text"
>
Unknown
</span>
<span
class=
"ui-button-text"
>
Unknown
</span>
<div
class=
"gp_checked"
id=
"gp_unknown_checked"
>
<svg
width=
"20px"
height=
"20px"
viewBox=
"0 0 54 54"
version=
"1.1"
>
<g
id=
""
fill-rule=
"evenodd"
>
<path
d=
"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"
stroke=
"#747474"
stroke-opacity=
"0.198794158"
fill=
"#109618"
fill-opacity=
"0.816519475"
></path>
</g>
</svg>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -120,6 +179,8 @@
...
@@ -120,6 +179,8 @@
update_general_pattern_db
(
'
arch
'
);
update_general_pattern_db
(
'
arch
'
);
}
);
}
);
$
(
"
#gp_{{ current_gp }}_checked
"
).
css
(
"
visibility
"
,
"
visible
"
);
/*
/*
* Navigation UI update
* Navigation UI update
*/
*/
...
...
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