Skip to content

Commit 1a345c0

Browse files
Working directory validation on SPA. (#1727)
1 parent 730ff18 commit 1a345c0

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

server/webapp/WEB-INF/rails.new/app/assets/new_javascripts/views/pipeline_configs/task_basic_views_widget.js.msx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ define([
4444
<f.inputWithLabel attrName='workingDirectory'
4545
model={task}
4646
end={true}
47+
validate={true}
4748
tooltip={{
4849
content: tt.task.ant.workingDirectory,
4950
direction: 'bottom',
@@ -78,6 +79,7 @@ define([
7879
<f.inputWithLabel attrName='workingDirectory'
7980
model={task}
8081
end={true}
82+
validate={true}
8183
tooltip={{
8284
content: tt.task.nant.workingDirectory,
8385
direction: 'bottom',
@@ -143,6 +145,7 @@ define([
143145
<f.inputWithLabel attrName='workingDirectory'
144146
model={task}
145147
end={true}
148+
validate={true}
146149
size={12}
147150
largeSize={12}
148151
tooltip={{
@@ -183,6 +186,7 @@ define([
183186
<f.inputWithLabel attrName='workingDirectory'
184187
model={task}
185188
end={true}
189+
validate={true}
186190
tooltip={{
187191
content: tt.task.rake.workingDirectory,
188192
direction: 'bottom',

server/webapp/WEB-INF/rails.new/app/presenters/api_v3/config/tasks/ant_task_representer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module Tasks
2020
class AntTaskRepresenter < ApiV3::Config::Tasks::BaseTaskRepresenter
2121
alias_method :task, :represented
2222
ERROR_KEYS = {
23-
'workingDirectory' => 'working_directory',
2423
'buildFile' => 'build_file',
2524
'onCancelConfig' => 'on_cancel',
2625
'runIf' => 'run_if',

server/webapp/WEB-INF/rails.new/app/presenters/api_v3/config/tasks/exec_task_representer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module Tasks
2020
class ExecTaskRepresenter < ApiV3::Config::Tasks::BaseTaskRepresenter
2121
alias_method :task, :represented
2222
ERROR_KEYS = {
23-
"workingDirectory" => "working_directory",
2423
"buildFile" => "build_file",
2524
"onCancelConfig" => "on_cancel",
2625
"runIf" => "run_if",

server/webapp/WEB-INF/rails.new/app/presenters/api_v3/config/tasks/nant_task_representer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module Tasks
2020
class NantTaskRepresenter < ApiV3::Config::Tasks::BaseTaskRepresenter
2121
alias_method :task, :represented
2222
ERROR_KEYS = {
23-
'workingDirectory' => 'working_directory',
2423
'buildFile' => 'build_file',
2524
'onCancelConfig' => 'on_cancel',
2625
'runIf' => 'run_if',

server/webapp/WEB-INF/rails.new/app/presenters/api_v3/config/tasks/rake_task_representer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module Tasks
2020
class RakeTaskRepresenter < ApiV3::Config::Tasks::BaseTaskRepresenter
2121
alias_method :task, :represented
2222
ERROR_KEYS = {
23-
'workingDirectory' => 'working_directory',
2423
'buildFile' => 'build_file',
2524
'onCancelConfig' => 'on_cancel',
2625
'runIf' => 'run_if'

server/webapp/WEB-INF/rails.new/spec/presenters/api_v3/config/task_representer_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def errors_hash
131131
attributes: { run_if: [], on_cancel: nil, command: "", working_directory: "../outside"},
132132
errors: {
133133
command: ["Command cannot be empty"],
134-
working_directory: ["The path of the working directory for the custom command in job 'dev' in stage 'stage' of pipeline 'this_pipeline' is outside the agent sandbox."]
134+
workingDirectory: ["The path of the working directory for the custom command in job 'dev' in stage 'stage' of pipeline 'this_pipeline' is outside the agent sandbox."]
135135
}
136136
}
137137
end
@@ -183,7 +183,7 @@ def errors_hash
183183
type: 'ant',
184184
attributes: { run_if: [], on_cancel: nil, working_directory: "../outside", build_file: nil, target: nil},
185185
errors: {
186-
working_directory: ["Task of job 'dev' in stage 'stage' of pipeline 'this_pipeline' has path '../outside' which is outside the working directory."]
186+
workingDirectory: ["Task of job 'dev' in stage 'stage' of pipeline 'this_pipeline' has path '../outside' which is outside the working directory."]
187187
}
188188
}
189189
end
@@ -236,7 +236,7 @@ def errors_hash
236236
type: 'nant',
237237
attributes: { run_if: [], on_cancel: nil, working_directory: "../outside", build_file: nil, target: nil, nant_path:nil},
238238
errors: {
239-
working_directory: ["Task of job 'dev' in stage 'stage' of pipeline 'this_pipeline' has path '../outside' which is outside the working directory."]
239+
workingDirectory: ["Task of job 'dev' in stage 'stage' of pipeline 'this_pipeline' has path '../outside' which is outside the working directory."]
240240
}
241241
}
242242
end
@@ -288,7 +288,7 @@ def errors_hash
288288
type: 'rake',
289289
attributes: {run_if: [], on_cancel: nil, working_directory: "../outside", build_file: nil, target: nil},
290290
errors: {
291-
working_directory: ["Task of job 'dev' in stage 'stage' of pipeline 'this_pipeline' has path '../outside' which is outside the working directory."]
291+
workingDirectory: ["Task of job 'dev' in stage 'stage' of pipeline 'this_pipeline' has path '../outside' which is outside the working directory."]
292292
}
293293

294294
}

0 commit comments

Comments
 (0)