2018-12-01 00:24:58 +01:00
|
|
|
<!--
|
2023-03-15 23:02:31 +01:00
|
|
|
Copyright (C) 2016-2023 Jones Magloire @Joxit
|
2018-12-01 00:24:58 +01:00
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
-->
|
|
|
|
<tag-history-button>
|
2022-03-19 22:35:41 +01:00
|
|
|
<material-button
|
|
|
|
title="{ buttonTittle() }"
|
2023-01-05 22:29:37 +01:00
|
|
|
text-color="var(--neutral-text)"
|
2023-01-06 19:10:13 +01:00
|
|
|
color="inherit"
|
2023-01-05 22:29:37 +01:00
|
|
|
waves-color="var(--hover-background)"
|
2022-12-03 15:07:58 +01:00
|
|
|
waves-center="true"
|
|
|
|
href="{ routeToHistory() }"
|
2022-03-19 22:35:41 +01:00
|
|
|
disabled="{ props.image.ociImage }"
|
2022-12-03 15:07:58 +01:00
|
|
|
icon
|
2022-03-19 22:35:41 +01:00
|
|
|
>
|
2018-12-01 20:49:59 +01:00
|
|
|
<i class="material-icons">history</i>
|
2018-12-24 19:07:29 +01:00
|
|
|
</material-button>
|
2021-03-20 08:15:05 +01:00
|
|
|
<script>
|
|
|
|
import router from '../../scripts/router';
|
|
|
|
export default {
|
2022-03-19 22:35:41 +01:00
|
|
|
onMounted(props) {
|
|
|
|
props.image.one('oci-image', () => {
|
|
|
|
this.update();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
buttonTittle() {
|
|
|
|
return !this.props.image.ociImage
|
|
|
|
? 'This will show the history of given tag'
|
|
|
|
: 'History is unavailable on OCI index/Buildkit export cache';
|
|
|
|
},
|
2021-03-20 08:15:05 +01:00
|
|
|
routeToHistory() {
|
2022-03-19 22:35:41 +01:00
|
|
|
if (!this.props.image.ociImage) {
|
2022-12-03 15:07:58 +01:00
|
|
|
return router.history(this.props.image.name, this.props.image.tag);
|
2022-03-19 22:35:41 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
2018-12-18 23:25:57 +01:00
|
|
|
</script>
|
2022-03-19 22:35:41 +01:00
|
|
|
</tag-history-button>
|