Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ChatBot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
miromar
ChatBot
Merge requests
!18
QA modification system
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
QA modification system
admin
into
main
Overview
0
Commits
2
Pipelines
0
Changes
7
Merged
miromar
requested to merge
admin
into
main
2 years ago
Overview
0
Commits
2
Pipelines
0
Changes
7
Expand
0
0
Merge request reports
Compare
main
version 1
59accbff
2 years ago
main (base)
and
latest version
latest version
af6cb228
2 commits,
2 years ago
version 1
59accbff
1 commit,
2 years ago
7 files
+
160
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
src/main/java/com/chatbot/AdminViewController.java
+
17
−
2
Options
package
com.chatbot
;
import
javafx.fxml.FXML
;
import
javafx.fxml.FXMLLoader
;
import
javafx.scene.Node
;
import
javafx.scene.Parent
;
import
javafx.scene.control.ListView
;
import
javafx.scene.control.TextField
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.PasswordField
;
import
javafx.scene.layout.BorderPane
;
import
javafx.scene.layout.VBox
;
import
java.io.IOException
;
public
class
AdminViewController
{
@@ -16,6 +24,8 @@ public class AdminViewController {
@FXML
private
Label
info
;
@FXML
BorderPane
adminRoot
;
@FXML
private
void
login
()
{
String
user
=
Username
.
getText
();
@@ -24,13 +34,18 @@ public class AdminViewController {
Password
.
setText
(
""
);
if
(!
LoginManager
.
getInstance
().
isLoggedIn
()){
LoginManager
.
getInstance
().
login
(
user
,
pass
);
if
(
LoginManager
.
getInstance
().
isLoggedIn
()){
info
.
setText
(
"Logged in succesfully"
);
try
{
FXMLLoader
loader
=
new
FXMLLoader
(
getClass
().
getResource
(
"EditQAView.fxml"
));
Parent
editQAView
=
loader
.
load
();
adminRoot
.
setCenter
(
editQAView
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
else
{
info
.
setText
(
"Incorrect username or password"
);
}
}
}
}
\ No newline at end of file
Loading