Skip to content

Commit

Permalink
[OGUI-402] Add horizontal scroll bar table (#386)
Browse files Browse the repository at this point in the history
* [OGUI-402] Add horizontal scrollbar

* [OGUI-402] Add horizontal scrollbar to envs table
  • Loading branch information
graduta authored Sep 30, 2019
1 parent b6e723d commit 5604f79
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Control/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Control/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aliceo2/control",
"description": "ALICE O2 Control GUI",
"version": "1.4.0",
"version": "1.4.1",
"main": "index.js",
"scripts": {
"start": "node index.js",
Expand Down
15 changes: 8 additions & 7 deletions Control/public/common/showTableList.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ export default (list, actions) => h('table.table', [
item[columnName]
)
),
actions && h('td.btn-group',
h('button.btn.btn-primary', {onclick: (event) => actions[0](event, item)}, 'Details'),
item.state !== 'RUNNING' && actions.length >= 2 && h('button.btn.btn-danger',
{
onclick: (event) => actions[1](event, item)
}, 'Shutdown'),
)
actions && h('td',
h('.btn-group',
h('button.btn.btn-primary', {onclick: (event) => actions[0](event, item)}, 'Details'),
item.state !== 'RUNNING' && actions.length >= 2 && h('button.btn.btn-danger',
{
onclick: (event) => actions[1](event, item)
}, 'Shutdown'),
))
]))),
]);
4 changes: 2 additions & 2 deletions Control/public/environment/environmentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const controlButton = (buttonType, environment, item, label, type, stateToHide)
* @param {Array<Actions>} actions
* @return {vnode}
*/
const displayTableOfTasks = (environment, list, actions) => h('', [
const displayTableOfTasks = (environment, list, actions) => h('.scroll-auto', [
h('table.table.table-sm', [
h('thead', [
h('tr',
Expand All @@ -237,7 +237,7 @@ const displayTableOfTasks = (environment, list, actions) => h('', [
item[columnName]
)
),
actions && h('td.btn-group',
actions && h('td',
h('button.btn.btn-primary',
{
onclick: (event) => actions[0](event, item)
Expand Down
4 changes: 2 additions & 2 deletions Control/public/environment/environmentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export const content = (model) => h('.scroll-y.absolute-fill.text-center', [
* @return {vnode}
*/
const showContent = (model, list) => (list && Object.keys(list).length > 0)
? showTableList(list, [
? h('.scroll-auto', showTableList(list, [
(event, item) => model.router.go(`?page=environment&id=${item.id}`),
(event, item) =>
confirm('Are you sure to delete this environment?' + item.id)
&& model.environment.destroyEnvironment({id: item.id})
])
]))
: h('h3.m4', ['No environments found.']);

0 comments on commit 5604f79

Please sign in to comment.