mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-05-01 09:29:55 +03:00
fix: should update the catalog when the server is changed
This commit is contained in:
parent
dd26bf66a2
commit
992328eae9
1 changed files with 15 additions and 5 deletions
|
@ -32,6 +32,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
import {
|
import {
|
||||||
Http
|
Http
|
||||||
} from '../../scripts/http';
|
} from '../../scripts/http';
|
||||||
|
import {
|
||||||
|
getRegistryServers
|
||||||
|
} from '../../scripts/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -41,18 +44,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
registryName: '',
|
registryName: '',
|
||||||
length: 0,
|
length: 0,
|
||||||
loadend: false,
|
loadend: false,
|
||||||
repositories: []
|
repositories: [],
|
||||||
|
registryUrl: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
onBeforeMount(props) {
|
onBeforeMount(props) {
|
||||||
this.state.registryName = props.registryName;
|
this.state.registryName = props.registryName;
|
||||||
this.state.catalogElementsLimit = props.catalogElementsLimit;
|
this.state.catalogElementsLimit = props.catalogElementsLimit;
|
||||||
},
|
},
|
||||||
onMounted(props) {
|
onMounted(props, state) {
|
||||||
this.display(props, this.state)
|
this.display(props, state)
|
||||||
|
},
|
||||||
|
onUpdated(props, state) {
|
||||||
|
this.display(props, state);
|
||||||
},
|
},
|
||||||
|
|
||||||
display(props, state) {
|
display(props, state) {
|
||||||
|
if (props.registryUrl === state.registryUrl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
state.registryUrl = props.registryUrl;
|
||||||
let repositories = [];
|
let repositories = [];
|
||||||
const self = this;
|
const self = this;
|
||||||
const oReq = new Http({
|
const oReq = new Http({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue