-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from arnaugiralt/feat/LITE-LITE-28305-add-requ…
…ests-tab-in-deployment-details LITE-28305: Add requests tab in DeploymentDetails
- Loading branch information
Showing
10 changed files
with
306 additions
and
15 deletions.
There are no files selected for viewing
74 changes: 72 additions & 2 deletions
74
...eployment-details.64e888974f0cb7f2d86d.js → ...eployment-details.7fd1c2931ae682adf7b1.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
..._ppr/static/index.87eae4483d347d643754.js → ..._ppr/static/index.5fdf03c1a578e43267e6.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
<template lang="pug"> | ||
.request-tasks-tab | ||
c-data-table( | ||
v-model="requests", | ||
:headers="headers", | ||
:prepare-row="prepareRow", | ||
:show-loader="loading", | ||
hide-all-pagination-sections, | ||
fix-layout, | ||
show-manage-panel, | ||
) | ||
template(#buttons="") | ||
c-button.ppr-table__upload-btn( | ||
:icon="icons.googleAddBaseline", | ||
color="accent", | ||
mode="solid", | ||
label="Create Request", | ||
small, | ||
@click="openUploadPPRDialog", | ||
) | ||
|
||
template(#items="{ row, visibleHeaders }") | ||
tr.table__row.hoverable(:id="row.id") | ||
template(v-for="header in visibleHeaders") | ||
//- ID column | ||
td.nowrap-cell( | ||
v-if="header.value === 'id'", | ||
:key="header.value", | ||
) | ||
router-link( | ||
:to="{ name: 'RequestDetails', params: { id: row.id } }" | ||
) {{ row.id }} | ||
c-chip.request-tasks-tab__manual( | ||
v-if="row.manual", | ||
text="Manual", | ||
type="pale", | ||
small, | ||
) | ||
|
||
//- Event column | ||
td.nowrap-cell( | ||
v-if="header.value === 'ppr'", | ||
:key="header.value", | ||
) | ||
span Version {{ row.ppr }} | ||
|
||
//- Processed column | ||
td.nowrap-cell( | ||
v-if="header.value === 'created'", | ||
:key="header.value", | ||
) | ||
span(v-if="row.created") {{ row.created | utcToLocal }} | ||
span.assistive-text(v-else) – | ||
|
||
//- Status column | ||
td.nowrap-cell( | ||
v-if="header.value === 'status'", | ||
:key="header.value", | ||
) | ||
.request-tasks-tab__status | ||
c-status(:status="row.status") | ||
//template(v-if="row.status === 'failed'") | ||
// span.request-tasks-tab__dot • | ||
// a(@click="openErrorDetails(row)") Details | ||
create-deployment-request-dialog( | ||
v-model="isCreateRequestDialogOpen", | ||
:deployment="deployment", | ||
@request-created="loadRequests", | ||
) | ||
|
||
</template> | ||
|
||
<script> | ||
import { | ||
googleAddBaseline, | ||
} from '@cloudblueconnect/material-svg'; | ||
import cButton from '~components/cButton.vue'; | ||
import cChip from '~components/cChip.vue'; | ||
import cDataTable from '~components/cDataTable.vue'; | ||
import cStatus from '~components/cStatus.vue'; | ||
import CreateDeploymentRequestDialog from '~components/CreateDeploymentRequestDialog/index.vue'; | ||
import { | ||
getDeploymentRequests, | ||
} from '@/utils'; | ||
export default { | ||
components: { | ||
cButton, | ||
cChip, | ||
cDataTable, | ||
cStatus, | ||
CreateDeploymentRequestDialog, | ||
}, | ||
props: { | ||
deployment: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
data: () => ({ | ||
loading: true, | ||
requests: [], | ||
icons: { googleAddBaseline }, | ||
isCreateRequestDialogOpen: false, | ||
headers: [ | ||
{ | ||
text: 'Request', | ||
value: 'id', | ||
}, | ||
{ | ||
text: 'PPR', | ||
value: 'ppr', | ||
width: 105, | ||
}, | ||
{ | ||
text: 'Created', | ||
value: 'created', | ||
width: 137, | ||
}, | ||
{ | ||
text: 'Status', | ||
value: 'status', | ||
width: 140, | ||
}, | ||
], | ||
}), | ||
computed: { | ||
deploymentId: vm => vm.deployment.id, | ||
}, | ||
methods: { | ||
prepareRow(item) { | ||
return { | ||
id: item.id, | ||
status: item.status, | ||
created: item.events.created?.at, | ||
ppr: item.ppr.version, | ||
manual: item.manually, | ||
}; | ||
}, | ||
openUploadPPRDialog() { | ||
this.isCreateRequestDialogOpen = true; | ||
}, | ||
async loadRequests() { | ||
this.loading = true; | ||
this.requests = await getDeploymentRequests(this.deploymentId); | ||
this.loading = false; | ||
}, | ||
}, | ||
created() { | ||
this.loadRequests(); | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="stylus"> | ||
.request-tasks-tab { | ||
&__status { | ||
display: flex; | ||
align-items: center; | ||
} | ||
&__dot { | ||
margin: 0 8px; | ||
} | ||
&__manual { | ||
margin-left: 8px; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters