Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 16 additions & 3 deletions frontend/src/app/components/header-nav/header-nav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
: null
"
>
<span *ngIf="deploymentRunningForStage == 'PRELIVE'" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
{{ publishToPreliveButtonText() }}
</button>
<button
Expand Down Expand Up @@ -175,17 +176,29 @@
class="btn btn-success mr-2"
type="button"
(click)="requestPublishRulesTxtToSolr('LIVE')"
[attr.disabled]="
!currentSolrIndexId || deploymentRunningForStage == 'LIVE'
? ''
: null
"
>
<i class="fa fa-thumbs-up smui-icon"></i>
Yes, publish to LIVE
<i *ngIf="deploymentRunningForStage != 'LIVE'" class="fa fa-thumbs-up smui-icon"></i>
<span *ngIf="deploymentRunningForStage == 'LIVE'" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
{{ publishToLiveButtonText() }}

</button>
<button
class="btn btn-danger"
type="button"
(click)="modalService.close('confirm-publish-live')"
[attr.disabled]="
!currentSolrIndexId || deploymentRunningForStage == 'LIVE'
? ''
: null
"
>
<i class="fa fa-ban smui-icon"></i>
No, cancel publish
Cancel publish
</button>
</div>
</app-smui-modal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ export class HeaderNavComponent implements OnInit {
this.solrService
.updateRulesTxtForSolrIndex(this.currentSolrIndexId, targetPlatform)
.then(apiResult => {
this.deploymentRunningForStage = undefined
this.modalService.close('confirm-publish-live')
this.deploymentRunningForStage = undefined
this.showSuccessMsg(apiResult.message)
this.loadLatestDeploymentLogInfo()
})
.catch(error => {
this.deploymentRunningForStage = undefined
this.modalService.close('confirm-publish-live')
this.deploymentRunningForStage = undefined
this.showErrorMsg(error.error.message)
});
} // TODO handle else-case, if no currentSolrIndexId selected
Expand Down