Update assets/dashAgGridComponentFunctions.js
Browse files
assets/dashAgGridComponentFunctions.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
var dagcomponentfuncs = window.dashAgGridComponentFunctions = window.dashAgGridComponentFunctions || {};
|
| 2 |
|
| 3 |
dagcomponentfuncs.ModelLink = function(props) {
|
| 4 |
-
if (
|
| 5 |
-
|
|
|
|
|
|
|
| 6 |
}
|
|
|
|
| 7 |
return React.createElement(
|
| 8 |
'a',
|
| 9 |
{
|
|
@@ -41,8 +44,13 @@ dagcomponentfuncs.PinRenderer = function(props) {
|
|
| 41 |
},
|
| 42 |
style: {
|
| 43 |
cursor: 'pointer',
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
}
|
| 47 |
},
|
| 48 |
props.data.pinned ? 'π' : 'β'
|
|
@@ -73,26 +81,32 @@ dagcomponentfuncs.TypeRenderer = function(props) {
|
|
| 73 |
|
| 74 |
return React.createElement('div', {
|
| 75 |
style: {
|
|
|
|
|
|
|
|
|
|
| 76 |
display: 'flex',
|
| 77 |
alignItems: 'center',
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
bottom: 0,
|
| 82 |
-
left: '12px'
|
| 83 |
}
|
| 84 |
-
},
|
| 85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
style: {
|
| 87 |
-
color: color
|
|
|
|
|
|
|
| 88 |
display: 'flex',
|
| 89 |
alignItems: 'center',
|
| 90 |
justifyContent: 'center',
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
lineHeight: '1',
|
| 94 |
-
textAlign: 'center'
|
| 95 |
}
|
| 96 |
-
},
|
| 97 |
-
|
|
|
|
| 98 |
};
|
|
|
|
| 1 |
var dagcomponentfuncs = window.dashAgGridComponentFunctions = window.dashAgGridComponentFunctions || {};
|
| 2 |
|
| 3 |
dagcomponentfuncs.ModelLink = function(props) {
|
| 4 |
+
// Check if Total Parameters is null (indicating a proprietary model) or if the link is empty.
|
| 5 |
+
// If so, just return the plain text value without a hyperlink.
|
| 6 |
+
if (props.data['Total Parameters'] == null || !props.data.Model_Link) {
|
| 7 |
+
return props.value;
|
| 8 |
}
|
| 9 |
+
// Otherwise, create the hyperlink as before.
|
| 10 |
return React.createElement(
|
| 11 |
'a',
|
| 12 |
{
|
|
|
|
| 44 |
},
|
| 45 |
style: {
|
| 46 |
cursor: 'pointer',
|
| 47 |
+
fontSize: '16px',
|
| 48 |
+
// Flexbox properties for perfect centering
|
| 49 |
+
display: 'flex',
|
| 50 |
+
alignItems: 'center',
|
| 51 |
+
justifyContent: 'center',
|
| 52 |
+
width: '100%',
|
| 53 |
+
height: '100%'
|
| 54 |
}
|
| 55 |
},
|
| 56 |
props.data.pinned ? 'π' : 'β'
|
|
|
|
| 81 |
|
| 82 |
return React.createElement('div', {
|
| 83 |
style: {
|
| 84 |
+
color: color,
|
| 85 |
+
fontWeight: 'bold',
|
| 86 |
+
fontSize: '14px',
|
| 87 |
display: 'flex',
|
| 88 |
alignItems: 'center',
|
| 89 |
+
justifyContent: 'center',
|
| 90 |
+
width: '100%',
|
| 91 |
+
height: '100%'
|
|
|
|
|
|
|
| 92 |
}
|
| 93 |
+
}, letter);
|
| 94 |
+
};
|
| 95 |
+
|
| 96 |
+
dagcomponentfuncs.ReasoningRenderer = function(props) {
|
| 97 |
+
if (props.value) { // props.value is the boolean from "Is Thinking Model"
|
| 98 |
+
return React.createElement('div', {
|
| 99 |
style: {
|
| 100 |
+
color: '#71de5f', // Green color
|
| 101 |
+
fontWeight: 'bold',
|
| 102 |
+
fontSize: '14px',
|
| 103 |
display: 'flex',
|
| 104 |
alignItems: 'center',
|
| 105 |
justifyContent: 'center',
|
| 106 |
+
width: '100%',
|
| 107 |
+
height: '100%'
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
+
}, 'R');
|
| 110 |
+
}
|
| 111 |
+
return null; // Render nothing if false
|
| 112 |
};
|