Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
6a1a0703
Commit
6a1a0703
authored
Mar 18, 2021
by
Manuel Herold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deployment changes
added ports to host_provider added http deployment of demo
parent
80902c26
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
7 deletions
+61
-7
Dockerfile
src/dashboard/Dockerfile
+4
-0
main.dart
src/dashboard/lib/main.dart
+47
-1
clustergetter.dart
src/dashboard/lib/querying/clustergetter.dart
+6
-2
host_provider.dart
src/dashboard/lib/querying/host_provider.dart
+4
-4
No files found.
src/dashboard/Dockerfile
View file @
6a1a0703
FROM
nginx:latest
EXPOSE
80
EXPOSE
443
ENV
http_proxy http://proxy.uni-klu.ac.at:3128/
ENV
https_proxy http://proxy.uni-klu.ac.at:3128/
COPY
./src/dashboard/deployment/nginx.conf /etc/nginx/conf.d/default.conf
COPY
./src/dashboard/build/web/ /usr/share/nginx/html/
\ No newline at end of file
src/dashboard/lib/main.dart
View file @
6a1a0703
import
'package:dashboard/exceptions/login_exception.dart'
;
import
'package:dashboard/loading.dart'
;
import
'package:dashboard/ui/graphs/community_meta/cluster_view_page.dart'
;
import
'package:dashboard/ui/graphs/community_meta/index.dart'
;
import
'package:dashboard/ui/sign_in/loginpage.dart'
;
import
'package:dashboard/util/loginhelper.dart'
;
import
'package:dashboard/util/user.dart'
;
import
'package:enhanced_future_builder/enhanced_future_builder.dart'
;
import
'package:flutter/material.dart'
;
import
'package:http/http.dart'
as
http
;
void
main
(
)
{
runApp
(
ArticonfDashboardDemo
());
...
...
@@ -43,3 +43,49 @@ class _ArticonfDashboardDemoState extends State<ArticonfDashboardDemo> {
);
}
}
class
DemoWidget
extends
StatefulWidget
{
@override
_DemoWidgetState
createState
()
=>
_DemoWidgetState
();
}
class
_DemoWidgetState
extends
State
<
DemoWidget
>
{
String
_url
=
"http://rest-gateway/api/users"
;
String
_response
;
void
_call
()
async
{
try
{
http
.
Response
response
=
await
http
.
get
(
_url
);
setState
(()
{
_response
=
"
${response.statusCode}
-
${response.body}
"
;
});
}
catch
(
e
,
str
)
{
setState
(()
{
_response
=
"
$e
,
\n\n
$str
"
;
});
}
}
@override
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
home:
Scaffold
(
body:
Center
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
TextFormField
(
initialValue:
_url
,
onChanged:
(
value
)
=>
_url
=
value
,
),
SizedBox
(
height:
8
),
ElevatedButton
(
onPressed:
_call
,
child:
Text
(
"Send Request"
)),
SizedBox
(
height:
8
),
if
(
_url
!=
null
)
Text
(
_response
),
],
),
),
),
);
}
}
src/dashboard/lib/querying/clustergetter.dart
View file @
6a1a0703
...
...
@@ -12,7 +12,9 @@ class ClusterGetter {
Future
<
List
<
Community
>>
getNodesfromLayer
(
String
layerName
)
async
{
String
url
=
"
${HostProvider.articonfHost}
/api/use-cases/reddit/tables/reddit/layers/
$layerName
/nodes"
;
"
${HostProvider.articonfHost(30103)}
/api/use-cases/reddit/tables/reddit/layers/
$layerName
/nodes"
;
Logger
().
i
(
"calling
$url
"
);
BackendUser
user
=
await
LoginHelper
().
loggedInUser
;
String
token
=
user
.
token
;
...
...
@@ -70,7 +72,9 @@ class ClusterGetter {
Future
<
List
<
Cluster
>>
getClustersFromLayer
(
String
layerName
)
async
{
String
url
=
"
${HostProvider.articonfHost}
/api/use-cases/reddit/tables/reddit/layers/
$layerName
/clusters"
;
"
${HostProvider.articonfHost(30103)}
/api/use-cases/reddit/tables/reddit/layers/
$layerName
/clusters"
;
Logger
().
i
(
"calling
$url
"
);
BackendUser
user
=
await
LoginHelper
().
loggedInUser
;
String
token
=
user
.
token
;
...
...
src/dashboard/lib/querying/host_provider.dart
View file @
6a1a0703
...
...
@@ -2,13 +2,13 @@ import 'package:flutter/foundation.dart';
class
HostProvider
{
static
String
_hostArticonfDebug
=
"https://articonf1.itec.aau.at"
;
static
String
_hostArticonfRelease
=
"https://articonf1"
;
static
String
_hostArticonfRelease
=
"https://articonf1
.itec.aau.at
"
;
static
String
_hostManuelDebug
=
"http
://test
.nope-api.systems:81"
;
static
String
_hostManuelRelease
=
"http
://manuel
"
;
static
String
_hostManuelDebug
=
"http
s://live
.nope-api.systems:81"
;
static
String
_hostManuelRelease
=
"http
s://live.nope-api.systems:81
"
;
static
String
articonfHost
(
int
port
)
{
return
kReleaseMode
?
_hostArticonfRelease
:
"
$_hostArticonfDebug
:
$port
"
;
return
kReleaseMode
?
"
$_hostArticonfRelease
:
$port
"
:
"
$_hostArticonfDebug
:
$port
"
;
}
static
String
get
manuelHost
{
...
...
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