Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PROINFODATA
unstable
Commits
ad25cab4
Commit
ad25cab4
authored
11 years ago
by
Ruanito Santos
Browse files
Options
Download
Email Patches
Plain Diff
web/app/controllers/Install.java: Add show dialog invalid inep
parent
7509fb94
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/app/controllers/Install.java
+13
-6
web/app/controllers/Install.java
with
13 additions
and
6 deletions
+13
-6
web/app/controllers/Install.java
+
13
-
6
View file @
ad25cab4
...
...
@@ -3,6 +3,8 @@ package controllers;
import
java.io.*
;
import
java.util.ArrayList
;
import
javax.swing.JOptionPane
;
import
play.*
;
import
play.mvc.*
;
import
play.data.*
;
...
...
@@ -31,8 +33,11 @@ public class Install extends Controller {
String
proxyUser
=
requestData
.
get
(
"proxyUser"
);
String
proxyPass
=
requestData
.
get
(
"proxyPass"
);
if
((
inep
==
null
)
||
(
inep
.
length
()
<
6
)
||
(
inep
.
length
()
>
12
))
return
badRequest
(
"Inep inválido"
);
if
((
inep
==
null
)
||
(
inep
.
length
()
<
6
)
||
(
inep
.
length
()
>
12
))
{
Object
[]
options
=
{
"OK"
};
JOptionPane
.
showOptionDialog
(
null
,
"Inep inválido."
,
"Aviso"
,
JOptionPane
.
DEFAULT_OPTION
,
JOptionPane
.
WARNING_MESSAGE
,
null
,
options
,
options
[
0
]);
return
ok
(
views
.
html
.
install
.
index
.
render
());
}
School
school
=
null
;
...
...
@@ -44,15 +49,17 @@ public class Install extends Controller {
return
internalServerError
();
}
if
(
school
==
null
)
return
badRequest
(
"Inep inválido"
);
if
(
school
==
null
)
{
Object
[]
options
=
{
"OK"
};
JOptionPane
.
showOptionDialog
(
null
,
"Inep inválido."
,
"Aviso"
,
JOptionPane
.
DEFAULT_OPTION
,
JOptionPane
.
WARNING_MESSAGE
,
null
,
options
,
options
[
0
]);
return
ok
(
views
.
html
.
install
.
index
.
render
());
}
// build the package
String
command
=
"sh "
+
MAKE_PACKAGE_BIN
+
" "
+
inep
;
if
(
useProxy
)
{
command
+=
" "
+
proxyHost
+
" "
+
proxyPort
+
" "
+
proxyUser
+
" "
+
proxyPass
;
proxyUser
+
" "
+
proxyPass
;
}
StringBuffer
sb
=
new
StringBuffer
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help