Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TIPM-UI
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
LOUDNI Samir
TIPM-UI
Commits
7fc53c62
Verified
Commit
7fc53c62
authored
3 years ago
by
BARBIER Marc
Browse files
Options
Downloads
Patches
Plain Diff
better index
parent
f9493bcf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Index/Index.ts
+19
-6
19 additions, 6 deletions
src/Index/Index.ts
src/Index/Index.vue
+2
-2
2 additions, 2 deletions
src/Index/Index.vue
src/MineView/MineView.vue
+2
-2
2 additions, 2 deletions
src/MineView/MineView.vue
with
23 additions
and
10 deletions
src/Index/Index.ts
+
19
−
6
View file @
7fc53c62
...
...
@@ -15,7 +15,7 @@ export default defineComponent({
}
},
computed
:
{
isReady
()
{
isReady
()
:
boolean
{
return
this
.
projects
!=
null
}
},
...
...
@@ -23,11 +23,15 @@ export default defineComponent({
this
.
loadProjects
()
},
methods
:
{
loadProjects
()
{
secureFetch
(
this
,
'
http://localhost:8080/rest/projects
'
).
then
(
async
(
response
)
=>
{
async
loadProjects
()
{
await
secureFetch
(
this
,
'
http://localhost:8080/rest/projects
'
).
then
(
async
(
response
)
=>
{
if
(
response
.
status
!=
200
)
console
.
log
(
response
)
else
{
this
.
projects
=
await
response
.
json
()
const
projects
:
Project
[]
=
await
response
.
json
()
projects
.
forEach
(
e
=>
e
.
items
.
sort
((
a
,
b
)
=>
b
.
version
-
a
.
version
))
projects
.
forEach
(
e
=>
e
.
fileItems
.
sort
((
a
,
b
)
=>
b
.
version
-
a
.
version
))
projects
.
sort
((
a
,
b
)
=>
a
.
name
>
b
.
name
?
1
:
-
1
)
this
.
projects
=
projects
}
}).
catch
(()
=>
{
//if nothing was loaded keep trying since it means the server isn't on
...
...
@@ -38,17 +42,21 @@ export default defineComponent({
})
},
newProject
(
event
:
Event
)
{
async
newProject
(
event
:
Event
)
{
//on ne submit pas le form
event
.
preventDefault
()
if
(
this
.
newProjectName
)
{
const
data
=
new
FormData
()
data
.
append
(
'
name
'
,
this
.
newProjectName
)
secureFetch
(
this
,
"
http://localhost:8080/rest/project/create
"
,
{
await
secureFetch
(
this
,
"
http://localhost:8080/rest/project/create
"
,
{
method
:
'
POST
'
,
body
:
data
})
await
this
.
loadProjects
()
this
.
$toast
.
success
(
"
Done
"
)
}
else
{
this
.
$toast
.
error
(
'
Please enter a valid name
'
)
}
},
...
...
@@ -71,11 +79,16 @@ export default defineComponent({
body
:
data
})).
text
()
//if the file is a csv we need to convert it to arff to use it
if
(
file
.
name
.
endsWith
(
'
.csv
'
))
{
this
.
$toast
.
info
(
"
Uploaded, now converting to ARFF
"
)
const
form
=
new
FormData
()
form
.
append
(
'
id
'
,
id
)
await
secureFetch
(
this
,
'
http://localhost:8080/rest/transform/convert-to-arff
'
,
{
method
:
'
POST
'
,
body
:
form
})
this
.
$toast
.
success
(
"
Converted
"
)
}
else
{
this
.
$toast
.
success
(
"
Uploaded
"
)
}
this
.
loadProjects
()
...
...
This diff is collapsed.
Click to expand it.
src/Index/Index.vue
+
2
−
2
View file @
7fc53c62
...
...
@@ -55,7 +55,7 @@
<label
class=
"form-label"
for=
"file"
>
File
</label>
<input
class=
"form-control"
type=
"file"
name=
"file"
id=
"file"
>
<label
class=
"form-label"
for=
"name"
>
Name
</label>
<input
class=
"form-control"
type=
"text"
name=
"name"
id=
"name"
placeholder=
"Dataset name"
>
<input
class=
"form-control"
type=
"text"
name=
"name"
id=
"name"
placeholder=
"Dataset name"
required
>
<label
class=
"form-label"
for=
"project-select-upload"
>
Project
</label>
<select
class=
"form-control"
name=
"project"
id=
"project-select-upload"
>
<option
v-for=
"project of projects"
v-bind:key=
"project.name"
v-bind:value=
"project.name"
>
{{project.name}}
</option>
...
...
@@ -66,7 +66,7 @@
<form
@
submit=
"newProject"
>
<label
for=
"name"
>
Name
</label>
<input
class=
"form-control"
type=
"text"
name=
"name"
id=
"name"
placeholder=
"Dataset name"
v-model=
"newProjectName"
>
<input
class=
"form-control"
type=
"text"
name=
"name"
id=
"name"
placeholder=
"Dataset name"
v-model=
"newProjectName"
required
>
<br>
<button
class=
"btn btn-primary mb-3"
>
Create project
</button>
</form>
...
...
This diff is collapsed.
Click to expand it.
src/MineView/MineView.vue
+
2
−
2
View file @
7fc53c62
...
...
@@ -58,7 +58,7 @@
<Multiselect
mode=
"tags"
:close-on-select=
"false"
:options=
"columns"
v-model=
"selectedPatternColumns"
></Multiselect>
<label
class=
"form-label"
for=
"itemsetSupport"
>
Support
</label>
<input
class=
"form-control"
type=
"text"
name=
"support"
id=
"itemsetSupport"
placeholder=
"support %"
v-model=
"itemsetSupport"
>
<div
class=
"form-text"
v-if=
"itemsetSupport"
>
Support >=
{{
Math
.
floor
(
nbWindows
/
itemsetSupport
)
}}
</div>
<div
class=
"form-text"
v-if=
"itemsetSupport"
>
Support >=
{{
Math
.
floor
(
nbWindows
*
itemsetSupport
/
100
)
}}
</div>
<label
for=
"miningAlgorithm"
>
Algorithm
</label>
<input
type=
"hidden"
name=
"isItemset"
:value=
"true"
>
<select
class=
"form-control"
name=
"algorithm"
id=
"miningAlgorithm"
>
...
...
@@ -85,7 +85,7 @@
<Multiselect
mode=
"tags"
:close-on-select=
"false"
:options=
"columns"
v-model=
"selectedSequenceColumns"
></Multiselect>
<label
class=
"form-label"
for=
"sequentialSupport"
>
Support
</label>
<input
class=
"form-control"
type=
"text"
name=
"support"
id=
"sequentialSupport"
placeholder=
"support %"
v-model=
"sequentialSupport"
>
<div
class=
"form-text"
v-if=
"sequentialSupport"
>
Support >=
{{
Math
.
floor
(
nbWindows
/
sequentialSupport
)
}}
</div>
<div
class=
"form-text"
v-if=
"sequentialSupport"
>
Support >=
{{
Math
.
floor
(
nbWindows
*
sequentialSupport
/
100
)
}}
</div>
<input
type=
"hidden"
name=
"isItemset"
:value=
"false"
>
<label
for=
"patternMiningAlgorithm"
>
Algorithm
</label>
<select
class=
"form-control"
name=
"algorithm"
id=
"patternMiningAlgorithm"
v-model=
"selectedAlgorithm"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment