Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
6dc91de9
Commit
6dc91de9
authored
13 years ago
by
cramakri
Browse files
Options
Downloads
Patches
Plain Diff
MINOR: Fix some minor aspects of display of the data
SVN: 24014
parent
e751d962
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
eu_basynthec/source/html/browser/basynthec-style.css
+0
-1
0 additions, 1 deletion
eu_basynthec/source/html/browser/basynthec-style.css
eu_basynthec/source/html/browser/openbis-browser.html
+60
-19
60 additions, 19 deletions
eu_basynthec/source/html/browser/openbis-browser.html
with
60 additions
and
20 deletions
eu_basynthec/source/html/browser/basynthec-style.css
+
0
−
1
View file @
6dc91de9
...
@@ -16,7 +16,6 @@ h3 { font: 12px; }
...
@@ -16,7 +16,6 @@ h3 { font: 12px; }
.strains
td
{
.strains
td
{
font-family
:
"Verdana"
,
sans-serif
;
font-family
:
"Verdana"
,
sans-serif
;
font-size
:
12px
;
font-size
:
12px
;
width
:
10%
;
padding
:
6px
;
padding
:
6px
;
}
}
...
...
This diff is collapsed.
Click to expand it.
eu_basynthec/source/html/browser/openbis-browser.html
+
60
−
19
View file @
6dc91de9
...
@@ -28,12 +28,12 @@ var dataSetsByStrain = { };
...
@@ -28,12 +28,12 @@ var dataSetsByStrain = { };
var
STRAIN_GROUP_PREFIXES
=
[
"
JJS-DIN
"
,
"
JJS-MGP
"
];
var
STRAIN_GROUP_PREFIXES
=
[
"
JJS-DIN
"
,
"
JJS-MGP
"
];
// The names to show the user for the strain groups
// The names to show the user for the strain groups
var
STRAIN_GROUP_PREFIXES_DISPLAY_NAME
=
{
"
JJS-DIN
"
:
"
JJS-D
i
n
"
,
"
JJS-MGP
"
:
"
JJS-MGP
"
};
var
STRAIN_GROUP_PREFIXES_DISPLAY_NAME
=
{
"
JJS-DIN
"
:
"
JJS-D
I
n
"
,
"
JJS-MGP
"
:
"
JJS-MGP
"
};
// groups of strains to be displayed
// groups of strains to be displayed
var
strainGroups
=
[];
var
strainGroups
=
[];
var
IGNORED_DATASET_TYPES
=
[
"
EXCEL_ORIGINAL
"
,
"
UNKNOWN
"
];
var
IGNORED_DATASET_TYPES
=
[
"
EXCEL_ORIGINAL
"
,
"
TSV_EXPORT
"
,
"
UNKNOWN
"
];
//The inspected strains
//The inspected strains
var
inspected
=
[];
var
inspected
=
[];
...
@@ -67,21 +67,18 @@ function showDataSets(bisDataSets)
...
@@ -67,21 +67,18 @@ function showDataSets(bisDataSets)
// group dataSets
// group dataSets
dataSetsByStrain
=
basynthec
.
dataSetList
.
reduce
(
dataSetsByStrain
=
basynthec
.
dataSetList
.
reduce
(
function
(
result
,
dataSet
)
{
function
(
result
,
dataSet
)
{
var
uniqueStrains
=
uniqueElements
(
basynthec
.
getStrains
(
dataSet
).
sort
());
var
uniqueStrains
=
uniqueElements
(
basynthec
.
getStrains
(
dataSet
).
sort
());
uniqueStrains
.
forEach
(
function
(
strain
)
{
uniqueStrains
.
forEach
(
function
(
strain
)
{
if
(
result
[
strain
])
{
if
(
result
[
strain
])
{
result
[
strain
].
push
(
dataSet
);
result
[
strain
].
push
(
dataSet
);
}
else
{
}
else
{
result
[
strain
]
=
[
dataSet
];
result
[
strain
]
=
[
dataSet
];
}
}
});
});
return
result
;
return
result
},
{});
},
{});
refreshStrainTables
();
refreshStrainTables
();
}
}
...
@@ -120,7 +117,7 @@ function refreshStrainTables() {
...
@@ -120,7 +117,7 @@ function refreshStrainTables() {
strainGroups
=
createStrainGroups
(
strains
);
strainGroups
=
createStrainGroups
(
strains
);
createVis
();
createVis
();
updateDiagram
(
1000
);
updateDiagram
(
1000
);
}
}
...
@@ -154,7 +151,13 @@ function updateDiagram(duration)
...
@@ -154,7 +151,13 @@ function updateDiagram(duration)
.
append
(
"
h2
"
)
.
append
(
"
h2
"
)
.
text
(
function
(
d
)
{
return
d
.
groupName
})
.
text
(
function
(
d
)
{
return
d
.
groupName
})
.
append
(
"
table
"
)
.
append
(
"
table
"
)
.
selectAll
(
"
tr
"
).
data
(
function
(
d
)
{
var
lineSize
=
(
d
.
groupName
.
indexOf
(
"
Other
"
)
==
0
)
?
3
:
10
;
return
d
.
strains
.
reduce
(
groupBy
(
lineSize
),
[])
})
.
selectAll
(
"
tr
"
).
data
(
function
(
d
)
{
// Group the different sets of strains differently
if
(
d
.
groupName
.
indexOf
(
"
Other
"
)
==
0
)
return
d
.
strains
.
reduce
(
groupBy
(
3
),
[]);
if
(
d
.
groupName
.
indexOf
(
"
JJS-MGP
"
)
==
0
)
return
d
.
strains
.
reduce
(
groupBy
(
10
),
[]);
// Group the JJS-DIn strains by runs
return
d
.
strains
.
reduce
(
groupByRuns
(
10
),
[])
})
.
enter
()
.
enter
()
.
append
(
"
tr
"
)
.
append
(
"
tr
"
)
.
selectAll
(
"
td
"
).
data
(
function
(
d
)
{
return
d
})
.
selectAll
(
"
td
"
).
data
(
function
(
d
)
{
return
d
})
...
@@ -413,6 +416,44 @@ function groupBy(numElts)
...
@@ -413,6 +416,44 @@ function groupBy(numElts)
return
groupBy
;
return
groupBy
;
}
}
/**
* Check if the current elt number = last elt number + 1
*/
function
isRun
(
lastElt
,
currentElt
)
{
var
lastNumber
=
Number
(
lastElt
.
label
);
var
currentNumber
=
Number
(
currentElt
.
label
);
// Assume that non numeric values are runs
if
(
lastNumber
==
NaN
||
currentNumber
==
NaN
)
return
true
;
return
currentNumber
==
(
lastNumber
+
1
);
}
function
groupByRuns
(
maxNumEltsPerGroup
)
{
var
lastSeen
=
""
;
var
groupBy
=
function
(
groups
,
elt
)
{
// Initialize the groups
if
(
groups
.
length
<
1
)
{
groups
.
push
([
elt
]);
return
groups
;
}
// Check if we should append to the last group or create a new one
var
lastGrp
=
groups
[
groups
.
length
-
1
];
var
createNewGroup
=
false
;
if
(
lastGrp
.
length
>=
maxNumEltsPerGroup
)
{
// We've reached the size limit of the group
createNewGroup
=
true
;
}
else
{
// See if this is a run, if not create a new group
createNewGroup
=
!
isRun
(
lastGrp
[
lastGrp
.
length
-
1
],
elt
);
}
(
createNewGroup
)
?
groups
.
push
([
elt
])
:
lastGrp
.
push
(
elt
);
return
groups
;
}
return
groupBy
;
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
"
#main
"
).
hide
()
$
(
"
#main
"
).
hide
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment