datajunction-ui 0.0.105 → 0.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -45,6 +45,11 @@ export default function NamespaceHeader({
|
|
|
45
45
|
setExistingPR(null);
|
|
46
46
|
|
|
47
47
|
const fetchData = async () => {
|
|
48
|
+
if (!namespace) {
|
|
49
|
+
if (onGitConfigLoaded) onGitConfigLoaded(null);
|
|
50
|
+
setGitConfigLoading(false);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
48
53
|
if (namespace) {
|
|
49
54
|
// Fetch deployment sources
|
|
50
55
|
try {
|
|
@@ -219,7 +219,15 @@ export function NamespacePage() {
|
|
|
219
219
|
const ASC = 'ascending';
|
|
220
220
|
const DESC = 'descending';
|
|
221
221
|
|
|
222
|
-
const fields = [
|
|
222
|
+
const fields = [
|
|
223
|
+
'name',
|
|
224
|
+
'displayName',
|
|
225
|
+
'type',
|
|
226
|
+
'status',
|
|
227
|
+
'mode',
|
|
228
|
+
'owners',
|
|
229
|
+
'updatedAt',
|
|
230
|
+
];
|
|
223
231
|
|
|
224
232
|
const djClient = useContext(DJClientContext).DataJunctionAPI;
|
|
225
233
|
const { currentUser } = useCurrentUser();
|
|
@@ -486,6 +494,7 @@ export function NamespacePage() {
|
|
|
486
494
|
path: path,
|
|
487
495
|
};
|
|
488
496
|
currentLevel.push(existingNamespace);
|
|
497
|
+
currentLevel.sort((a, b) => a.namespace.localeCompare(b.namespace));
|
|
489
498
|
}
|
|
490
499
|
|
|
491
500
|
currentLevel = existingNamespace.children;
|
|
@@ -620,7 +629,14 @@ export function NamespacePage() {
|
|
|
620
629
|
state.nodes.length > 0 ? (
|
|
621
630
|
state.nodes.map(node => (
|
|
622
631
|
<tr key={node.name}>
|
|
623
|
-
<td
|
|
632
|
+
<td
|
|
633
|
+
style={{
|
|
634
|
+
maxWidth: '300px',
|
|
635
|
+
overflow: 'hidden',
|
|
636
|
+
whiteSpace: 'nowrap',
|
|
637
|
+
textOverflow: 'ellipsis',
|
|
638
|
+
}}
|
|
639
|
+
>
|
|
624
640
|
<a href={'/nodes/' + node.name} className="link-table">
|
|
625
641
|
{isBranchNamespace && node.name.startsWith(namespace + '.')
|
|
626
642
|
? node.name.slice(namespace.length + 1)
|
|
@@ -633,7 +649,14 @@ export function NamespacePage() {
|
|
|
633
649
|
{node.currentVersion}
|
|
634
650
|
</span>
|
|
635
651
|
</td>
|
|
636
|
-
<td
|
|
652
|
+
<td
|
|
653
|
+
style={{
|
|
654
|
+
maxWidth: '250px',
|
|
655
|
+
overflow: 'hidden',
|
|
656
|
+
whiteSpace: 'nowrap',
|
|
657
|
+
textOverflow: 'ellipsis',
|
|
658
|
+
}}
|
|
659
|
+
>
|
|
637
660
|
<a href={'/nodes/' + node.name} className="link-table">
|
|
638
661
|
{node.type !== 'source' ? node.current.displayName : ''}
|
|
639
662
|
</a>
|
|
@@ -673,9 +696,44 @@ export function NamespacePage() {
|
|
|
673
696
|
{node.current.mode === 'PUBLISHED' ? 'P' : 'D'}
|
|
674
697
|
</span>
|
|
675
698
|
</td>
|
|
699
|
+
<td>
|
|
700
|
+
{node.owners?.length > 0 && (
|
|
701
|
+
<div style={{ display: 'flex', gap: '2px' }}>
|
|
702
|
+
{node.owners.slice(0, 3).map(owner => {
|
|
703
|
+
const initials = owner.username
|
|
704
|
+
.split('@')[0]
|
|
705
|
+
.slice(0, 2)
|
|
706
|
+
.toUpperCase();
|
|
707
|
+
const [bg, fg] =
|
|
708
|
+
AVATAR_COLORS[avatarColorIndex(owner.username)];
|
|
709
|
+
return (
|
|
710
|
+
<span
|
|
711
|
+
key={owner.username}
|
|
712
|
+
title={owner.username}
|
|
713
|
+
style={{
|
|
714
|
+
display: 'inline-flex',
|
|
715
|
+
alignItems: 'center',
|
|
716
|
+
justifyContent: 'center',
|
|
717
|
+
width: '24px',
|
|
718
|
+
height: '24px',
|
|
719
|
+
borderRadius: '50%',
|
|
720
|
+
backgroundColor: bg,
|
|
721
|
+
color: fg,
|
|
722
|
+
fontSize: '9px',
|
|
723
|
+
fontWeight: '600',
|
|
724
|
+
flexShrink: 0,
|
|
725
|
+
}}
|
|
726
|
+
>
|
|
727
|
+
{initials}
|
|
728
|
+
</span>
|
|
729
|
+
);
|
|
730
|
+
})}
|
|
731
|
+
</div>
|
|
732
|
+
)}
|
|
733
|
+
</td>
|
|
676
734
|
<td>
|
|
677
735
|
<span className="status">
|
|
678
|
-
{new Date(node.current.updatedAt).
|
|
736
|
+
{new Date(node.current.updatedAt).toLocaleDateString('en-us')}
|
|
679
737
|
</span>
|
|
680
738
|
</td>
|
|
681
739
|
{showEditControls && (
|
|
@@ -687,7 +745,7 @@ export function NamespacePage() {
|
|
|
687
745
|
))
|
|
688
746
|
) : (
|
|
689
747
|
<tr>
|
|
690
|
-
<td colSpan={
|
|
748
|
+
<td colSpan={8}>
|
|
691
749
|
<span
|
|
692
750
|
style={{
|
|
693
751
|
display: 'block',
|