Custom EndpointButton, Download logs using EndpointButton
This commit is contained in:
parent
ff43deae36
commit
987807ec3b
4 changed files with 79 additions and 38 deletions
48
webapp/src/components/labThingsComponents/endpointButton.vue
Normal file
48
webapp/src/components/labThingsComponents/endpointButton.vue
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<template>
|
||||
<a
|
||||
class="uk-button"
|
||||
:class="[isDisabled ? 'disabled' : '', buttonPrimary ? 'uk-button-primary' : 'uk-button-default']"
|
||||
:href="URL"
|
||||
download
|
||||
> {{ buttonLabel }}</a
|
||||
>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "EndpointButton",
|
||||
|
||||
props: {
|
||||
buttonPrimary: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
URL: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
isDisabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
destinationName: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
buttonLabel: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "Download File"
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import "../../assets/less/theme.less";
|
||||
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue