mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-29 00:19:54 +03:00
feat(riot-mui): upgrade tag-list components (table, list, remove image and tag history button)
This commit is contained in:
parent
c7368a3104
commit
54a954f8c3
6 changed files with 36 additions and 21 deletions
|
@ -18,11 +18,13 @@
|
||||||
<div class="copy-to-clipboard">
|
<div class="copy-to-clipboard">
|
||||||
<input style="display: none; width: 1px; height: 1px" value="{ getDockerCmd(props) }" />
|
<input style="display: none; width: 1px; height: 1px" value="{ getDockerCmd(props) }" />
|
||||||
<material-button
|
<material-button
|
||||||
waves-center="true"
|
color="rgba(0,0,0,0)"
|
||||||
rounded="true"
|
text-color="#777"
|
||||||
waves-color="#ddd"
|
waves-color="#ddd"
|
||||||
|
waves-center="true"
|
||||||
onClick="{ copy }"
|
onClick="{ copy }"
|
||||||
title="Copy pull command."
|
title="Copy pull command."
|
||||||
|
icon
|
||||||
>
|
>
|
||||||
<i class="material-icons">content_copy</i>
|
<i class="material-icons">content_copy</i>
|
||||||
</material-button>
|
</material-button>
|
||||||
|
|
|
@ -16,13 +16,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<remove-image>
|
<remove-image>
|
||||||
<material-button
|
<material-button
|
||||||
waves-center="true"
|
color="rgba(0,0,0,0)"
|
||||||
rounded="true"
|
text-color="#777"
|
||||||
waves-color="#ddd"
|
waves-color="#ddd"
|
||||||
|
waves-center="true"
|
||||||
title="This will delete the image."
|
title="This will delete the image."
|
||||||
if="{ !props.multiDelete }"
|
if="{ !props.multiDelete }"
|
||||||
disabled="{ !state.contentDigest }"
|
disabled="{ !state.contentDigest }"
|
||||||
onClick="{ deleteImage }"
|
onClick="{ deleteImage }"
|
||||||
|
icon
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</material-button>
|
</material-button>
|
||||||
|
|
|
@ -17,11 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<tag-history-button>
|
<tag-history-button>
|
||||||
<material-button
|
<material-button
|
||||||
title="{ buttonTittle() }"
|
title="{ buttonTittle() }"
|
||||||
waves-center="true"
|
color="rgba(0,0,0,0)"
|
||||||
rounded="true"
|
text-color="#777"
|
||||||
waves-color="#ddd"
|
waves-color="#ddd"
|
||||||
onClick="{ routeToHistory }"
|
waves-center="true"
|
||||||
|
href="{ routeToHistory() }"
|
||||||
disabled="{ props.image.ociImage }"
|
disabled="{ props.image.ociImage }"
|
||||||
|
icon
|
||||||
>
|
>
|
||||||
<i class="material-icons">history</i>
|
<i class="material-icons">history</i>
|
||||||
</material-button>
|
</material-button>
|
||||||
|
@ -40,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
},
|
},
|
||||||
routeToHistory() {
|
routeToHistory() {
|
||||||
if (!this.props.image.ociImage) {
|
if (!this.props.image.ociImage) {
|
||||||
router.history(this.props.image.name, this.props.image.tag);
|
return router.history(this.props.image.name, this.props.image.tag);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,7 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<tag-list>
|
<tag-list>
|
||||||
<material-card class="header">
|
<material-card class="header">
|
||||||
<div class="material-card-title-action">
|
<div class="material-card-title-action">
|
||||||
<material-button waves-center="true" rounded="true" waves-color="#ddd" onClick="{ router.home }">
|
<material-button
|
||||||
|
color="#fff"
|
||||||
|
text-color="#777"
|
||||||
|
waves-color="#ddd"
|
||||||
|
waves-center="true"
|
||||||
|
href="{ router.home() }"
|
||||||
|
icon
|
||||||
|
>
|
||||||
<i class="material-icons">arrow_back</i>
|
<i class="material-icons">arrow_back</i>
|
||||||
</material-button>
|
</material-button>
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -63,12 +63,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
>
|
>
|
||||||
</material-checkbox>
|
</material-checkbox>
|
||||||
<material-button
|
<material-button
|
||||||
|
if="{ state.toDelete.size > 0 && !state.singleDeleteAction }"
|
||||||
waves-center="true"
|
waves-center="true"
|
||||||
rounded="true"
|
color="#fff"
|
||||||
|
text-color="#777"
|
||||||
waves-color="#ddd"
|
waves-color="#ddd"
|
||||||
title="This will delete selected images."
|
title="This will delete selected images."
|
||||||
onClick="{ deleteImages }"
|
onClick="{ deleteImages }"
|
||||||
if="{ state.toDelete.size > 0 && !state.singleDeleteAction }"
|
icon
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</material-button>
|
</material-button>
|
||||||
|
@ -78,31 +80,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr each="{ image in getPage(props.tags, props.page) }" if="{ matchSearch(props.filterResults, image.tag) }">
|
<tr each="{ image in getPage(props.tags, props.page) }" if="{ matchSearch(props.filterResults, image.tag) }">
|
||||||
<td class="creation-date">
|
<td class="creation-date">
|
||||||
<image-date image="{ image }" />
|
<image-date image="{ image }"></image-date>
|
||||||
</td>
|
</td>
|
||||||
<td class="image-size">
|
<td class="image-size">
|
||||||
<image-size image="{ image }" />
|
<image-size image="{ image }"></image-size>
|
||||||
</td>
|
</td>
|
||||||
<td if="{ props.showContentDigest }">
|
<td if="{ props.showContentDigest }">
|
||||||
<image-content-digest image="{ image }" />
|
<image-content-digest image="{ image }"></image-content-digest>
|
||||||
<copy-to-clipboard
|
<copy-to-clipboard
|
||||||
target="digest"
|
target="digest"
|
||||||
image="{ image }"
|
image="{ image }"
|
||||||
pull-url="{ props.pullUrl }"
|
pull-url="{ props.pullUrl }"
|
||||||
on-notify="{ props.onNotify }"
|
on-notify="{ props.onNotify }"
|
||||||
/>
|
></copy-to-clipboard>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<image-tag image="{ image }" />
|
<image-tag image="{ image }"></image-tag>
|
||||||
<copy-to-clipboard
|
<copy-to-clipboard
|
||||||
target="tag"
|
target="tag"
|
||||||
image="{ image }"
|
image="{ image }"
|
||||||
pull-url="{ props.pullUrl }"
|
pull-url="{ props.pullUrl }"
|
||||||
on-notify="{ props.onNotify }"
|
on-notify="{ props.onNotify }"
|
||||||
/>
|
></copy-to-clipboard>
|
||||||
</td>
|
</td>
|
||||||
<td class="show-tag-history">
|
<td class="show-tag-history">
|
||||||
<tag-history-button image="{ image }" />
|
<tag-history-button image="{ image }"></tag-history-button>
|
||||||
</td>
|
</td>
|
||||||
<td if="{ props.isImageRemoveActivated }" class="remove-tag">
|
<td if="{ props.isImageRemoveActivated }" class="remove-tag">
|
||||||
<remove-image
|
<remove-image
|
||||||
|
@ -113,7 +115,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
checked="{ state.toDelete.has(image) }"
|
checked="{ state.toDelete.has(image) }"
|
||||||
on-notify="{ props.onNotify }"
|
on-notify="{ props.onNotify }"
|
||||||
on-authentication="{ props.onAuthentication }"
|
on-authentication="{ props.onAuthentication }"
|
||||||
/>
|
></remove-image>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -59,7 +59,7 @@ function baseUrl(qs) {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
home() {
|
home() {
|
||||||
router.push(baseUrl({ page: null }));
|
return baseUrl({ page: null });
|
||||||
},
|
},
|
||||||
taglist(image) {
|
taglist(image) {
|
||||||
router.push(`${baseUrl({ page: null })}#!/taglist/${image}`);
|
router.push(`${baseUrl({ page: null })}#!/taglist/${image}`);
|
||||||
|
@ -68,7 +68,7 @@ export default {
|
||||||
return getCurrentRoute().replace(/^.*(#!)?\/?taglist\//, '');
|
return getCurrentRoute().replace(/^.*(#!)?\/?taglist\//, '');
|
||||||
},
|
},
|
||||||
history(image, tag) {
|
history(image, tag) {
|
||||||
router.push(`${baseUrl({ page: null })}#!/taghistory/image/${image}/tag/${tag}`);
|
return `${baseUrl({ page: null })}#!/taghistory/image/${image}/tag/${tag}`;
|
||||||
},
|
},
|
||||||
getTagHistoryImage() {
|
getTagHistoryImage() {
|
||||||
return getCurrentRoute().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/, '$2');
|
return getCurrentRoute().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/, '$2');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue