Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
baas
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
baas
Commits
e6bde7a5
Commit
e6bde7a5
authored
9 years ago
by
Efthymia Bika
Browse files
Options
Downloads
Patches
Plain Diff
Render timeview contents when there is no error
parent
05db1e34
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
baas/timeview.js
+44
-42
44 additions, 42 deletions
baas/timeview.js
with
44 additions
and
42 deletions
baas/timeview.js
+
44
−
42
View file @
e6bde7a5
...
@@ -34,49 +34,51 @@ function show_contents_by_date(error, stdout, stderr) {
...
@@ -34,49 +34,51 @@ function show_contents_by_date(error, stdout, stderr) {
toggle_error
(
error
,
stderr
);
toggle_error
(
error
,
stderr
);
$
(
"
#time-contents
"
).
empty
();
$
(
"
#time-contents
"
).
empty
();
var
ul
=
$
(
"
<ul></ul>
"
)
if
(
!
error
)
{
.
attr
(
"
class
"
,
"
no-bullet
"
)
var
ul
=
$
(
"
<ul></ul>
"
)
.
attr
(
"
id
"
,
"
timeview-contents-list
"
);
.
attr
(
"
class
"
,
"
no-bullet
"
)
var
contents
=
JSON
.
parse
(
stdout
);
.
attr
(
"
id
"
,
"
timeview-contents-list
"
);
$
.
each
(
contents
,
function
(
i
,
el
)
{
var
contents
=
JSON
.
parse
(
stdout
);
var
f
=
"
open_folder('
"
+
escape_illegal_chars
(
el
.
name
)
+
"
')
"
;
$
.
each
(
contents
,
function
(
i
,
el
)
{
var
restore_f
=
"
show_rest_icon('
"
+
i
+
"
')
"
;
var
f
=
"
open_folder('
"
+
escape_illegal_chars
(
el
.
name
)
+
"
')
"
;
var
title
=
(
el
.
name
.
length
>
30
)
?
el
.
name
:
""
;
var
restore_f
=
"
show_rest_icon('
"
+
i
+
"
')
"
;
var
el_link
=
$
(
"
<a></a>
"
)
var
title
=
(
el
.
name
.
length
>
30
)
?
el
.
name
:
""
;
.
attr
(
"
href
"
,
"
#
"
)
var
el_link
=
$
(
"
<a></a>
"
)
.
attr
(
"
title
"
,
title
)
.
attr
(
"
href
"
,
"
#
"
)
.
attr
(
"
onclick
"
,
restore_f
);
.
attr
(
"
title
"
,
title
)
if
(
el
.
type
==
'
dir
'
)
{
.
attr
(
"
onclick
"
,
restore_f
);
el_link
.
attr
(
"
ondblclick
"
,
f
);
if
(
el
.
type
==
'
dir
'
)
{
}
el_link
.
attr
(
"
ondblclick
"
,
f
);
var
locale_date
=
new
Date
(
el
.
timestamp
).
toLocaleString
();
}
var
filename
=
(
el
.
name
.
length
>
30
)
?
var
locale_date
=
new
Date
(
el
.
timestamp
).
toLocaleString
();
el
.
name
.
substring
(
0
,
7
)
+
"
...
"
+
var
filename
=
(
el
.
name
.
length
>
30
)
?
el
.
name
.
substring
(
el
.
name
.
length
-
7
,
el
.
name
.
length
)
:
el
.
name
.
substring
(
0
,
7
)
+
"
...
"
+
el
.
name
;
el
.
name
.
substring
(
el
.
name
.
length
-
7
,
el
.
name
.
length
)
:
var
li
=
$
(
"
<li> <span>
"
+
filename
+
el
.
name
;
"
</span><span class='right'>
"
var
li
=
$
(
"
<li> <span>
"
+
filename
+
+
locale_date
+
"
</span></li>
"
)
"
</span><span class='right'>
"
.
attr
(
"
id
"
,
el
.
name
);
+
locale_date
+
"
</span></li>
"
)
var
icon_class
=
(
el
.
type
==
'
dir
'
)
.
attr
(
"
id
"
,
el
.
name
);
?
"
fa fa-folder yellow-folder left
"
:
var
icon_class
=
(
el
.
type
==
'
dir
'
)
"
fa fa-file-text-o green-file left
"
;
?
"
fa fa-folder yellow-folder left
"
:
var
icon
=
$
(
"
<i></i>
"
)
"
fa fa-file-text-o green-file left
"
;
.
attr
(
"
class
"
,
icon_class
);
var
icon
=
$
(
"
<i></i>
"
)
var
rest_icon
=
$
(
"
<i></i>
"
)
.
attr
(
"
class
"
,
icon_class
);
.
attr
(
"
id
"
,
"
rest_icon_
"
+
i
)
var
rest_icon
=
$
(
"
<i></i>
"
)
.
attr
(
"
title
"
,
"
Restore
"
)
.
attr
(
"
id
"
,
"
rest_icon_
"
+
i
)
.
attr
(
"
class
"
,
"
hide
"
)
.
attr
(
"
title
"
,
"
Restore
"
)
.
attr
(
"
onclick
"
,
"
go_to_restore_single('
"
+
.
attr
(
"
class
"
,
"
hide
"
)
escape_illegal_chars
(
el
.
name
)
+
"
')
"
);
.
attr
(
"
onclick
"
,
"
go_to_restore_single('
"
+
escape_illegal_chars
(
el
.
name
)
+
"
')
"
);
li
.
append
(
icon
);
li
.
append
(
rest_icon
);
li
.
append
(
icon
);
el_link
.
append
(
li
);
li
.
append
(
rest_icon
);
ul
.
append
(
el_link
);
el_link
.
append
(
li
);
});
ul
.
append
(
el_link
);
});
$
(
"
#time-contents
"
).
append
(
ul
);
$
(
"
#time-contents
"
).
append
(
ul
);
}
$
(
"
#loader
"
).
hide
();
$
(
"
#loader
"
).
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