Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
f501236a
Verified
Commit
f501236a
authored
3 years ago
by
Kirill Stytsenko
Browse files
Options
Downloads
Patches
Plain Diff
WiP
parent
586b9d91
No related branches found
No related tags found
4 merge requests
!81
New stable release
,
!43
Merge dev to master
,
!40
Misc
,
!39
Column units
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fda-ui/components/TableList.vue
+2
-2
2 additions, 2 deletions
fda-ui/components/TableList.vue
fda-ui/components/dialogs/ColumnUnit.vue
+38
-5
38 additions, 5 deletions
fda-ui/components/dialogs/ColumnUnit.vue
with
40 additions
and
7 deletions
fda-ui/components/TableList.vue
+
2
−
2
View file @
f501236a
<
template
>
<
template
>
<div>
<div>
<v-progress-linear
v-if=
"loading"
:indeterminate=
"!error"
/>
<v-progress-linear
v-if=
"loading"
/>
<v-card
v-if=
"!loading && tables.length === 0"
flat
>
<v-card
v-if=
"!loading && tables.length === 0"
flat
>
<v-card-title>
<v-card-title>
(no tables)
(no tables)
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
{{
col
.
column_type
}}
{{
col
.
column_type
}}
</td>
</td>
<td>
<td>
<DialogsColumnUnit
:column=
"col"
/>
<DialogsColumnUnit
:column=
"col"
:table-id=
"tableDetails.id"
/>
</td>
</td>
<td>
<td>
<v-simple-checkbox
v-model=
"col.is_primary_key"
disabled
aria-readonly=
"true"
/>
<v-simple-checkbox
v-model=
"col.is_primary_key"
disabled
aria-readonly=
"true"
/>
...
...
This diff is collapsed.
Click to expand it.
fda-ui/components/dialogs/ColumnUnit.vue
+
38
−
5
View file @
f501236a
...
@@ -83,7 +83,8 @@
...
@@ -83,7 +83,8 @@
<v-btn
<v-btn
color=
"blue darken-1"
color=
"blue darken-1"
text
text
@
click=
"dialog = false"
>
:disabled=
"!model || !uri"
@
click=
"save"
>
Save
Save
</v-btn>
</v-btn>
</v-card-actions>
</v-card-actions>
...
@@ -94,12 +95,14 @@
...
@@ -94,12 +95,14 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
column
:
{
type
:
Object
,
default
:
()
=>
({})
}
column
:
{
type
:
Object
,
default
:
()
=>
({})
},
tableId
:
{
type
:
Number
,
default
:
()
=>
-
1
}
},
},
data
()
{
data
()
{
return
{
return
{
dialog
:
false
,
dialog
:
false
,
isLoading
:
false
,
isLoading
:
false
,
saved
:
false
,
model
:
null
,
model
:
null
,
uri
:
null
,
uri
:
null
,
search
:
null
,
search
:
null
,
...
@@ -108,8 +111,7 @@ export default {
...
@@ -108,8 +111,7 @@ export default {
},
},
computed
:
{
computed
:
{
name
()
{
name
()
{
// TODO
return
this
.
saved
&&
this
.
model
&&
this
.
model
.
name
return
null
},
},
items
()
{
items
()
{
return
this
.
entries
&&
this
.
entries
.
map
((
entry
)
=>
{
return
this
.
entries
&&
this
.
entries
.
map
((
entry
)
=>
{
...
@@ -121,10 +123,10 @@ export default {
...
@@ -121,10 +123,10 @@ export default {
})
})
}
}
},
},
watch
:
{
watch
:
{
async
model
(
val
)
{
async
model
(
val
)
{
this
.
uri
=
null
this
.
uri
=
null
this
.
saved
=
false
if
(
!
val
)
{
return
}
if
(
!
val
)
{
return
}
try
{
try
{
const
res
=
await
this
.
$axios
.
get
(
`/api/units/uri/
${
val
.
name
}
`
)
const
res
=
await
this
.
$axios
.
get
(
`/api/units/uri/
${
val
.
name
}
`
)
...
@@ -154,6 +156,37 @@ export default {
...
@@ -154,6 +156,37 @@ export default {
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
async
save
()
{
try
{
await
this
.
$axios
.
post
(
'
/api/units/saveconcept
'
,
{
name
:
this
.
model
.
name
,
uri
:
this
.
uri
})
}
catch
(
error
)
{
const
{
status
}
=
error
.
response
if
(
status
!==
201
&&
status
!==
400
)
{
this
.
$toast
.
error
(
'
Could not save concept.
'
)
console
.
log
(
error
)
}
}
console
.
log
(
this
.
$route
.
params
.
database_id
,
this
.
tableId
,
this
.
column
)
try
{
await
this
.
$axios
.
post
(
'
/api/units/savecolumnsconcept
'
,
{
cdbid
:
Number
(
this
.
$route
.
params
.
database_id
),
cid
:
this
.
column
.
id
,
tid
:
this
.
tableId
,
uri
:
this
.
uri
})
this
.
dialog
=
false
this
.
saved
=
true
this
.
$nextTick
(()
=>
{
this
.
$emit
(
'
save
'
)
})
}
catch
(
err
)
{
this
.
$toast
.
error
(
'
Could not save column unit.
'
)
console
.
log
(
err
)
}
}
}
}
}
}
</
script
>
</
script
>
...
...
This diff is collapsed.
Click to expand it.
Kirill Stytsenko
@stytsenkok39
mentioned in commit
ae95abee
·
3 years ago
mentioned in commit
ae95abee
mentioned in commit ae95abee223261014eb7dc5a672409a01d7815af
Toggle commit list
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