Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
fba183b9
Commit
fba183b9
authored
1 year ago
by
Reinder Kraaij
Browse files
Options
Downloads
Patches
Plain Diff
Resolve
TMSS-2899
"Front end only save button tweak"
parent
2fd02e1a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1308
Resolve TMSS-2899 "Front end only save button tweak"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js
+1
-1
1 addition, 1 deletion
...frontend/tmss_webapp/src/components/JSONEditor/JEditor.js
SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js
+9
-17
9 additions, 17 deletions
...TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js
with
10 additions
and
18 deletions
SAS/TMSS/frontend/tmss_webapp/src/components/JSONEditor/JEditor.js
+
1
−
1
View file @
fba183b9
...
@@ -1386,7 +1386,7 @@ Jeditor.propTypes = {
...
@@ -1386,7 +1386,7 @@ Jeditor.propTypes = {
schema
:
PropTypes
.
oneOfType
([
PropTypes
.
object
,
PropTypes
.
array
,
PropTypes
.
oneOf
([
null
,
undefined
])]),
schema
:
PropTypes
.
oneOfType
([
PropTypes
.
object
,
PropTypes
.
array
,
PropTypes
.
oneOf
([
null
,
undefined
])]),
bandPassFilter
:
PropTypes
.
string
,
bandPassFilter
:
PropTypes
.
string
,
id
:
PropTypes
.
string
,
id
:
PropTypes
.
string
,
resolveExtRef
:
PropTypes
.
func
,
resolveExtRef
:
PropTypes
.
bool
,
showInGrid
:
PropTypes
.
bool
,
showInGrid
:
PropTypes
.
bool
,
title
:
PropTypes
.
string
,
title
:
PropTypes
.
string
,
errorsOn
:
PropTypes
.
bool
,
errorsOn
:
PropTypes
.
bool
,
...
...
This diff is collapsed.
Click to expand it.
SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js
+
9
−
17
View file @
fba183b9
...
@@ -47,6 +47,10 @@ export class SchedulingUnitCreate extends Component {
...
@@ -47,6 +47,10 @@ export class SchedulingUnitCreate extends Component {
states
:
[
'
active
'
],
states
:
[
'
active
'
],
purpose
:
[]
purpose
:
[]
},
},
constraintValidEditor
:
false
,
validForm
:
false
,
validConstraints
:
false
,
validSpecification
:
false
,
userrole
:
{},
userrole
:
{},
selectedProject
:
{},
selectedProject
:
{},
showAddSet
:
false
,
showAddSet
:
false
,
...
@@ -552,9 +556,8 @@ export class SchedulingUnitCreate extends Component {
...
@@ -552,9 +556,8 @@ export class SchedulingUnitCreate extends Component {
}
}
}
}
const
updatedErrors
=
errors
.
length
>
0
?
[...
this
.
state
.
errors
,
errors
]
:
this
.
state
.
errors
const
updatedErrors
=
errors
.
length
>
0
?
[...
this
.
state
.
errors
,
errors
]
:
this
.
state
.
errors
const
updatedValidFields
=
validFields
?
{...
this
.
state
.
validFields
,
validFields
}
:
this
.
state
.
validFields
const
updatedValidFields
=
validFields
?
{...
this
.
state
.
validFields
,
...
validFields
}
:
this
.
state
.
validFields
;
this
.
setState
({
errors
:
updatedErrors
,
validFields
:
updatedValidFields
});
this
.
setState
({
errors
:
updatedErrors
,
validFields
:
updatedValidFields
});
if
(
Object
.
keys
(
validFields
).
length
===
Object
.
keys
(
this
.
formRules
).
length
)
{
if
(
Object
.
keys
(
validFields
).
length
===
Object
.
keys
(
this
.
formRules
).
length
)
{
validForm
=
true
;
validForm
=
true
;
}
}
...
@@ -929,6 +932,7 @@ export class SchedulingUnitCreate extends Component {
...
@@ -929,6 +932,7 @@ export class SchedulingUnitCreate extends Component {
}
}
render
()
{
render
()
{
let
isSaveEnabled
=
(
this
.
state
.
constraintValidEditor
&&
this
.
state
.
validEditor
&&
this
.
state
.
validForm
&&
this
.
state
.
validConstraints
&&
this
.
state
.
validSpecification
)
if
(
this
.
state
.
redirect
)
{
if
(
this
.
state
.
redirect
)
{
return
<
Redirect
to
=
{{
pathname
:
this
.
state
.
redirect
}}
><
/Redirect
>
return
<
Redirect
to
=
{{
pathname
:
this
.
state
.
redirect
}}
><
/Redirect
>
}
}
...
@@ -1071,19 +1075,7 @@ export class SchedulingUnitCreate extends Component {
...
@@ -1071,19 +1075,7 @@ export class SchedulingUnitCreate extends Component {
onChange
=
{(
e
)
=>
this
.
setSchedUnitParams
(
'
output_pinned
'
,
e
.
target
.
checked
)}
onChange
=
{(
e
)
=>
this
.
setSchedUnitParams
(
'
output_pinned
'
,
e
.
target
.
checked
)}
><
/Checkbox
>
><
/Checkbox
>
<
/div
>
<
/div
>
{
/*
<label htmlFor="schedulingConstraintsTemp" className="col-lg-2 col-md-2 col-sm-12 hide">Scheduling Constraints Template</label>
<div className="col-lg-3 col-md-3 col-sm-12 hide" data-testid="schedulingConstraintsTemp">
<Dropdown inputId="schedulingConstraintsTemp" optionLabel="name" optionValue="id"
tooltip="Scheduling Constraints Template to add scheduling constraints to a scheduling unit" tooltipOptions={this.tooltipOptions}
value={this.state.schedulingUnit.scheduling_constraints_template_id}
disabled
options={this.constraintTemplates}
//onChange={(e) => { this.setStrategyConstraint(e);}}
placeholder="Select Constraints Template"/>
</div>
*/
}
<
/div
>
<
/div
>
{
_
.
keys
(
this
.
state
.
stationGroups
).
length
>
0
&&
{
_
.
keys
(
this
.
state
.
stationGroups
).
length
>
0
&&
<
div
className
=
'
grouping
'
>
<
div
className
=
'
grouping
'
>
...
@@ -1161,7 +1153,7 @@ export class SchedulingUnitCreate extends Component {
...
@@ -1161,7 +1153,7 @@ export class SchedulingUnitCreate extends Component {
tooltip
=
"
Select checkbox to create another Scheduling Unit after saving this Scheduling Unit
"
tooltip
=
"
Select checkbox to create another Scheduling Unit after saving this Scheduling Unit
"
submitTitle
=
{(
!
this
.
state
.
constraintValidEditor
||
!
this
.
state
.
validEditor
||
!
this
.
state
.
validForm
||
!
this
.
state
.
validConstraints
||
!
this
.
state
.
validSpecification
)
?
""
:
"
Save Scheduling Unit
"
}
submitTitle
=
{(
!
this
.
state
.
constraintValidEditor
||
!
this
.
state
.
validEditor
||
!
this
.
state
.
validForm
||
!
this
.
state
.
validConstraints
||
!
this
.
state
.
validSpecification
)
?
""
:
"
Save Scheduling Unit
"
}
onSubmit
=
{
this
.
saveSchedulingUnit
}
onSubmit
=
{
this
.
saveSchedulingUnit
}
disableSaveBtn
=
{
!
this
.
state
.
constraintValidEditor
||
!
this
.
state
.
validEditor
||
!
this
.
state
.
validForm
||
!
this
.
state
.
validConstraints
||
!
this
.
state
.
validSpecification
}
disableSaveBtn
=
{
!
isSaveEnabled
}
onCancel
=
{
this
.
checkIsDirty
}
/
>
onCancel
=
{
this
.
checkIsDirty
}
/
>
<
/div
>
<
/div
>
<
ReactTooltip
id
=
"
reacttooltip
"
place
=
{
'
left
'
}
type
=
{
'
dark
'
}
effect
=
{
'
solid
'
}
multiline
=
{
true
}
/
>
<
ReactTooltip
id
=
"
reacttooltip
"
place
=
{
'
left
'
}
type
=
{
'
dark
'
}
effect
=
{
'
solid
'
}
multiline
=
{
true
}
/
>
...
...
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