This message was deleted.
# extensions
a
This message was deleted.
s
that url points to an internal rancher api liable to change, which in 2.12 did. best to stick to the vuex findX actions for fetching resources. for this case there's the new
findLabelSelector
which takes into account that change in api, and will also handle if server-side pagination is enabled or disabled
b
Examples of usage:
Copy code
const response = await this.$store.dispatch('cluster/findLabelSelector', {
        type:     SERVICE,
        matching: { labelSelector: { matchLabels: { app: 'longhorn-ui' } } },
        opt:      { transient: true }
      });
Copy code
return this.$dispatch('findLabelSelector', {
        type:     POD,
        matching: {
          namespace:     this.metadata.namespace,
          labelSelector: { matchExpressions: this.podMatchExpression },
        },
      });
or
Copy code
return await this.$dispatch('findLabelSelector', {
      type:     POD,
      matching: {
        namespace:     this.metadata.namespace,
        labelSelector: { matchExpressions: parse(this.podRelationship?.selector) },
      }
    });
c
Thanks @stocky-account-63046 & @busy-ability-54059 for explanation and examples!