Skip to content

Uas rpl #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions sequence-login.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@startuml sequence-login
actor User
participant "Login Page" as LoginPage
participant "routes.py" as Route
participant "models.py" as UserModel

User -> LoginPage : open form
User -> LoginPage : input username & password
LoginPage -> Route : POST /login
Route -> UserModel : validate_user()
UserModel --> Route : user exists or not
alt valid
Route --> LoginPage : redirect to dashboard
else invalid
Route --> LoginPage : show error
end
@enduml
Binary file added __pycache__/app.cpython-312.pyc
Binary file not shown.
49 changes: 41 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,47 @@
import os
from flask import Flask
from flask import Flask, render_template, request, redirect, url_for, session

app = Flask(__name__)
app.secret_key = 'rahasia' # untuk session

# Data login dummy
USER_CREDENTIALS = {
'admin': 'admin'
}

@app.route("/")
def main():
return "Welcome!"
def index():
return render_template("login.html")

@app.route("/login", methods=["POST"])
def login():
username = request.form["username"]
password = request.form["password"]
if username in USER_CREDENTIALS and USER_CREDENTIALS[username] == password:
session['user'] = username
return redirect(url_for('dashboard'))
return "Login gagal! <a href='/'>Coba lagi</a>"

@app.route("/dashboard")
def dashboard():
if 'user' not in session:
return redirect(url_for('index'))
return render_template("dashboard.html")

@app.route("/create", methods=["GET", "POST"])
def create():
if 'user' not in session:
return redirect(url_for('index'))
if request.method == "POST":
nama = request.form["nama"]
jumlah = request.form["jumlah"]
print(f"Data disimpan: {nama}, jumlah: {jumlah}")
return render_template("success.html")
return render_template("create.html")

@app.route('/how are you')
def hello():
return 'I am good, how about you?'
@app.route("/logout")
def logout():
session.pop('user', None)
return render_template("logout.html")

if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)
app.run(host="0.0.0.0", port=8080)
3 changes: 3 additions & 0 deletions classes_flask_app.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@startuml classes_flask_app
set namespaceSeparator none
@enduml
20 changes: 20 additions & 0 deletions evaluasi/blackbox/SUS/laporan-sus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Laporan Usability Study – Aplikasi UAS RPL

### URL Aplikasi:
https://fictional-system-xxx.github.dev

### Jumlah Responden:
5 orang

### Skor SUS:
- R1: 85
- R2: 80
- R3: 72.5
- R4: 87.5
- R5: 77.5

### Rata-rata:
**80.5**

### Interpretasi:
Rata-rata skor SUS menunjukkan kategori **Good**. Aplikasi dinilai cukup mudah digunakan dan dapat dipahami oleh pengguna tanpa banyak bantuan teknis.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading