File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
frontend/src/views/setting/license Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,20 @@ const search = async () => {
216216 .then ((res ) => {
217217 loading .value = false ;
218218 data .value = res .data .items || [];
219- console .log (data .value );
220219 for (const item of data .value ) {
221220 item .productName = ' product-1panel-pro' ;
222221 item .expiresAt = item .productPro === ' 0' ? ' ' : timestampToDate (Number (item .productPro ));
223222 }
223+ data .value .sort ((a , b ) => {
224+ const masterLabel = i18n .global .t (' xpack.node.master' );
225+ const nodeA = loadBindNode (a );
226+ const nodeB = loadBindNode (b );
227+
228+ if (nodeA === masterLabel || nodeB === masterLabel ) {
229+ return Number (nodeB === masterLabel ) - Number (nodeA === masterLabel );
230+ }
231+ return a .status .localeCompare (b .status );
232+ });
224233 paginationConfig .total = res .data .total ;
225234 })
226235 .catch (() => {
You can’t perform that action at this time.
0 commit comments