Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline for visualizing jobs #15165

Draft
wants to merge 81 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
43a4925
[Functionality] Gantt Visualizations for Jobs in the current History
Nov 13, 2022
e67ee27
Remove package-lock.json file
Nov 13, 2022
b05dc05
Merge branch 'galaxyproject:dev' into Gantt
MOHITRAJANI Nov 14, 2022
4a77ebd
Change onClick to directive
shubham4315 Nov 16, 2022
6925268
Merge branch 'dev' into Gantt
shubham4315 Nov 16, 2022
c122304
Merge pull request #1 from MOHITRAJANI/gantt
MOHITRAJANI Nov 16, 2022
b779cd2
Refactored
shubham4315 Nov 16, 2022
8c1dc1d
Merge branch 'dev' into Gantt
MOHITRAJANI Nov 16, 2022
ff1eaa7
Merge pull request #2 from MOHITRAJANI/Gantt
MOHITRAJANI Nov 16, 2022
bab2b32
Added 4 random colors to the bars
shubham4315 Nov 16, 2022
f697545
Merge pull request #3 from MOHITRAJANI/Gantt
MOHITRAJANI Nov 16, 2022
13f1549
feat: now frappe-gantt is a github dependecy fix: text-align center m…
Nov 16, 2022
162b822
Revert "feat: now frappe-gantt is a github dependecy fix: text-align …
Nov 16, 2022
b68a627
revert yarn.lock
Nov 16, 2022
ace5d9c
Merge pull request #4 from MOHITRAJANI/Gitdependency-for-Gantt
MOHITRAJANI Nov 16, 2022
a46c7fe
feat: now frappe-gantt is a github dependecy fix: text-align center m…
Nov 16, 2022
a75a89a
Merge branch 'Gantt' of https://github.com/MOHITRAJANI/galaxy into Gantt
Nov 16, 2022
58a56a9
Delete yarn.lock
MOHITRAJANI Nov 16, 2022
f5efd32
feat!: Switch History and get Gantt visualization for the chosen hist…
Nov 20, 2022
3e142a7
Merge https://github.com/galaxyproject/galaxy into Gantt
Nov 20, 2022
2a381c9
Merge pull request #5 from MOHITRAJANI/dev
MOHITRAJANI Nov 20, 2022
5f655d5
Merge branch 'dev' of https://github.com/MOHITRAJANI/galaxy into Gantt
Nov 21, 2022
3e07430
feat:! New, Goodlooking, more elegant and more readable popover for t…
Nov 21, 2022
533ff3e
Now the Bar colours use KeyedColorScheme which generates random colou…
shubham4315 Nov 22, 2022
ace480c
cleanup unused code
shubham4315 Nov 22, 2022
81c7ce4
Merge pull request #6 from MOHITRAJANI/Gantt
shubham4315 Nov 22, 2022
3a1fd4e
The View Buttons are now fixed, Doesn't scroll with the Gantt Chart. …
shubham4315 Nov 25, 2022
f7479a1
fix!: Each task was shown on Gantt twice. Refactoring and Smoother tr…
Nov 27, 2022
86ef29e
Merge branch 'Gantt' of https://github.com/MOHITRAJANI/galaxy into Gantt
Nov 27, 2022
983ca90
WIP Added a Modal for choosing the time range to display in the Gantt…
shubham4315 Nov 29, 2022
ce1fd2f
Merge pull request #8 from MOHITRAJANI/loading/skeleton
MOHITRAJANI Dec 5, 2022
16674de
The dateTimeModal is separated into its own component
shubham4315 Dec 7, 2022
9328e2b
chore: modular date and time modal
Dec 8, 2022
20121f6
refactor: Modal opens up on Minute button click and modal styles move…
Dec 8, 2022
a315b3e
Merge branch 'Gantt' of https://github.com/MOHITRAJANI/galaxy into HEAD
Dec 8, 2022
7f4c659
refactor
Dec 8, 2022
6b7c8f7
Merge branch 'dev' of https://github.com/MOHITRAJANI/galaxy into Gantt
Dec 8, 2022
70541dd
feat!: loader added to Gantt, refactor: margin fixed and scoped styli…
Dec 8, 2022
449e752
feat!: minute view considers all tasks started in a 10 minute window …
Dec 10, 2022
1febdf3
refactor: formatting and lint-check
Dec 10, 2022
258faba
chore: minute view's end_time extends until the longest task in betwe…
Dec 10, 2022
492664b
feat: span message for empty histories, diabled buttons when history …
Dec 11, 2022
e87fea8
Merge branch 'dev' of https://github.com/MOHITRAJANI/galaxy into Gantt
Dec 14, 2022
4a2af3c
Merge branch 'dev' of https://github.com/MOHITRAJANI/galaxy into Gantt
Dec 16, 2022
687bd8c
refactor: gantt migrated to using pinia store for historyItems
Dec 16, 2022
e8d8362
refactor: get rid of console logs
Dec 16, 2022
3cc0d88
feat: clear gantt empties the gantt container for more smooth transit…
Dec 17, 2022
c17eff2
refactor: change discription of gantt visualization
Dec 17, 2022
6bbd02d
feat!: migrate to composition-api with full functionality
Dec 19, 2022
dcb0955
Merge branch 'dev' of https://github.com/MOHITRAJANI/galaxy into Gantt
Dec 23, 2022
c7ce25d
fix: clear residual popups if any
Dec 23, 2022
8c9eaf5
fix: Unexpected async function declaration in computed function es-li…
Dec 24, 2022
1f41360
fix: incorrect end_time for minutes_view fixed
Dec 24, 2022
e494f04
refactor: date-time-modal migration to composition-api
Dec 24, 2022
7cb021d
fix: opening gantt visualization with 0 histories
Dec 24, 2022
82ed3e8
test: failing test due to yarn.lock
Dec 24, 2022
972a514
test: history navigation test fixed
Dec 24, 2022
3cc95a4
fix: failing client test fix
Dec 25, 2022
bf7ba25
fix: bug fixes feat: new icon for gantt visualization menu
Dec 25, 2022
c85f18c
Merge branch 'dev' of https://github.com/MOHITRAJANI/galaxy into Gantt
Dec 25, 2022
ffade81
fix: conditional check for adding colors to buttons test: add testing…
Dec 28, 2022
5c2d505
Merge branch 'galaxyproject:dev' into Gantt
shubham4315 Dec 29, 2022
855418c
WIP : DateTime Modal Opening and Closing unit tests added
shubham4315 Jan 1, 2023
da8ef92
Merge branch 'galaxyproject:dev' into Gantt
shubham4315 Jan 1, 2023
a3bc3a2
fix: clearing the grid when minutes view does not consists of jobs
Jan 2, 2023
e68b626
test: fix lint issues
Jan 2, 2023
0774e9d
Changed the datetimepicker, and cleaned the test file
shubham4315 Jan 5, 2023
ccc58f4
fix: replace #default with v-slot; refactor: code cleanup
Jan 5, 2023
6dd204e
removed unused datetime packages
shubham4315 Jan 9, 2023
97e24d0
Removed unused datetime packages from package.json
shubham4315 Jan 9, 2023
6c8a695
feat: add commit hash value so that package manager installs correct …
Jan 10, 2023
49d8936
Merge branch 'Gantt' of https://github.com/MOHITRAJANI/galaxy into Gantt
Jan 10, 2023
4371013
feat!: show alert when api returns no job-metrics; refactor: disable …
Jan 10, 2023
4e3837d
Merge branch 'Gantt' of https://github.com/MOHITRAJANI/galaxy into Gantt
shubham4315 Jan 10, 2023
db21e7f
Added a bootstrap-vue modal and removed the usage of old modal
shubham4315 Jan 10, 2023
2657dc4
"chore: codebase cleanup"
Jan 10, 2023
8d84cd4
chore: remove redundant files; fix: switching from non-empty to empty…
Jan 10, 2023
60ece4d
Removed unused datetimemodal component and test file update
shubham4315 Jan 10, 2023
31bc323
review: work on suggested review changes
Jan 10, 2023
0fc11de
Merge branch 'Gantt' of https://github.com/MOHITRAJANI/galaxy into Gantt
Jan 10, 2023
c9e3d7a
WIP : Tests for Gantt Component
shubham4315 Jan 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"elkjs": "^0.7.1",
"file-saver": "^2.0.5",
"flush-promises": "^1.0.2",
"frappe-gantt": "https://github.com/MOHITRAJANI/gantt-advanced.git#2cc2c6e9500eb0c0dcbd2f17c025e0699d9df937",
"glob": "^7.2.0",
"handsontable": "^4.0.0",
"hsluv": "^0.1.0",
Expand All @@ -67,6 +68,7 @@
"localforage": "^1.10.0",
"markdown-it": "^12.3.2",
"markdown-it-regexp": "^0.4.0",
"moment": "^2.29.4",
"object-hash": "^3.0.0",
"openapi-typescript": "^6.1.0",
"openapi-typescript-fetch": "^1.1.3",
Expand All @@ -90,6 +92,7 @@
"tus-js-client": "^2.3.0",
"underscore": "^1.13.2",
"util": "^0.12.4",
"v-calendar": "^2.4.1",
"vue": "^2.7.8",
"vue-infinite-scroll": "^2.0.2",
"vue-multiselect": "^2.1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const createStore = (currentUser) => {
// all options
const expectedOptions = [
"Show Histories Side-by-Side",
"Gantt Visualization",
"Resume Paused Jobs",
"Copy this History",
"Delete this History",
Expand Down
19 changes: 19 additions & 0 deletions client/src/components/History/CurrentHistory/HistoryNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@

<b-dropdown-divider></b-dropdown-divider>

<b-dropdown-item
:disabled="currentUser.isAnonymous"
:title="userTitle('Visualize the jobs in your history using a Gantt chart')"
@click="$router.push(`/visualizations/gantt`)">
<font-awesome-icon
title="Gantt visualization"
icon="fa-solid fa-chart-bar"
class="fa-rotate-90" />
<span v-localize>Gantt Visualization</span>
</b-dropdown-item>

<b-dropdown-divider></b-dropdown-divider>

<b-dropdown-item
:title="l('Resume all Paused Jobs in this History')"
@click="iframeRedirect('/history/resume_paused_jobs?current=True')">
Expand Down Expand Up @@ -171,11 +184,17 @@ import { legacyNavigationMixin } from "components/plugins/legacyNavigation";
import CopyModal from "components/History/Modals/CopyModal";
import SelectorModal from "components/History/Modals/SelectorModal";
import { mapGetters } from "vuex";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { library } from "@fortawesome/fontawesome-svg-core";
import { faChartBar } from "@fortawesome/free-solid-svg-icons";

library.add(faChartBar);

export default {
components: {
CopyModal,
SelectorModal,
FontAwesomeIcon,
},
mixins: [legacyNavigationMixin],
props: {
Expand Down
51 changes: 51 additions & 0 deletions client/src/components/History/GanttVisualisation/Gantt.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { shallowMount } from "@vue/test-utils";
import flushPromises from "flush-promises";
import { createPinia } from "pinia";
import { getLocalVue } from "tests/jest/helpers";
import store from "@/store";
import Gantt from "./Gantt.vue";
import MockCurrentUser from "components/providers/MockCurrentUser";
import MockUserHistories from "components/providers/MockUserHistories";

const COUNT = 8;
const USER_ID = "test-user-id";
const CURRENT_HISTORY_ID = "test-history-id-0";

const pinia = createPinia();

const getFakeHistorySummaries = (num, selectedIndex = 0) => {
const result = Array.from({ length: num }, (_, index) => ({
id: `test-history-id-${index}`,
name: `History-${index}`,
tags: [],
update_time: new Date().toISOString(),
}));
result[selectedIndex].id = CURRENT_HISTORY_ID;
return result;
};

const CurrentUserMock = MockCurrentUser({ id: USER_ID });
const UserHistoriesMock = MockUserHistories({ id: CURRENT_HISTORY_ID }, getFakeHistorySummaries(COUNT, 0), false);

const localVue = getLocalVue();

describe("gantt component", () => {
let wrapper;

beforeEach(async () => {
wrapper = shallowMount(Gantt, {
store,
pinia,
stubs: {
CurrentUser: CurrentUserMock,
UserHistories: UserHistoriesMock,
},
localVue,
});
await flushPromises();
});

it("7 change view buttons should be visible", () => {
expect(wrapper.findAll('[data-description="change view button"]').length).toBe(7);
});
});
Loading