Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (refresh) {
view.push(span({class: 'loader'}));
actions.fetchImage(image_id);
}
return div(
Nav(state.status.config.REGISTRY_STORAGE_DELETE_ENABLED),
div({class: 'my-3 my-md-5'},
div({class: 'container'}, view)
),
// Delete modal
append_delete_model ? Modal(
div({class: 'modal-dialog'},
div({class: 'modal-content'}, [
div({class: 'modal-header text-left'},
h4({class: 'modal-title'}, 'Confirm Delete')
),
div({class: 'modal-body'},
p('Are you sure you want to delete this image and tag' + (image.data.tags.length === 1 ? '' : 's') + '?')
),
div({class: 'modal-footer'}, [
button({
class: 'btn btn-danger',
type: 'button',
onclick: actions.deleteImageClicked,
'data-image_id': image_id,
'data-digest': digest
}, 'Yes I\'m sure'),
button({class: 'btn btn-default', type: 'button', 'data-dismiss': 'modal'}, 'Cancel')
])
])
),
export default (state, actions) => params => {
let content = null;
if (!state.repos || !state.repos.length) {
// empty
content = div({class: 'alert alert-success'}, [
h4('Nothing to see here!'),
p('There are no images in this Registry yet.'),
div({class: 'btn-list'},
Link({class: 'btn btn-success', to: '/instructions/pushing'}, 'How to push an image')
)
]);
} else {
content = TableCard([
'Name',
'Tags'
], {
name: {manipulator: Manipulators.imageName()},
tags: {manipulator: Manipulators.joiner(', ')}
}, state.repos);
}