<commit_before><div ng-class="view.classes" loading="view.loading">

    <div class="heading">
        <a ng-if="view.mode === 'new'" ng-href="#/pipelines" class="btn btn-default pull-left go-back"><i class="fa fa-chevron-left"></i> Back</a>
        <a ng-if="view.mode === 'edit'" ng-href="#/pipeline/{{ view.pipeline._id }}" class="btn btn-default pull-left go-back"><i class="fa fa-chevron-left"></i> Back</a>
        <h1>
            <div class="form-group workflow-name">
                <span class="pipeline-repo" ng-show="view.pipeline.pipeline.repo">({{view.pipeline.pipeline.repo.owner}}/{{view.pipeline.pipeline.repo.name}}) </span>
                <input ng-show="view.mode === 'new'" type="text" placeholder="Workflow Name" ng-model="view.pipeline.name" class="form-control" />
                <span ng-hide="view.mode === 'new'">{{ view.pipeline.pipeline.name }}</span>
            </div>

            <strong class="changes-mark" ng-if="view.isChanged" tooltip="There are changes in your workflow" tooltip-placement="right">
                (<i class="fa fa-asterisk"></i>)
            </strong>

            <div ng-if="view.user" class="actions pull-right">
                <button ng-if="view.mode === 'edit'" ng-click="fork()" class="btn btn-default" ng-disabled="view.saving" >
                    <i class="fa fa-code-fork"></i> Fork
                </button>
                <button ng-click="save()" class="btn btn-default" ng-disabled="view.saving">
                    <i ng-class="{'fa-plus': view.mode === 'new', 'fa-check': view.mode === 'edit'}" class="fa"></i>
                    {{ view.mode === 'new' ? 'Create' : 'Update' }}
                </button>
                <button ng-if="view.mode === 'edit' && view.user.id === view.pipeline.pipeline.user._id" ng-click="publish()" class="btn btn-primary" ng-disabled="view.saving || view.deleting">
                    <i class="fa fa-plus"></i> Publish
                </button>
                <button ng-if="view.mode === 'edit'" ng-click="delete()" class="btn btn-danger" ng-disabled="view.saving || view.deleting">
                    <i class="fa fa-trash"></i> Delete
                </button>
            </div>

        </h1>
    </div>
    <!-- # .heading -->

    <div ng-if="!view.loading" class="content">

        <div class="col content-col">
            <div pipeline="view.pipeline" edit-mode="true" pipeline-change-fn="onPipelineChange(value)" handle-pipeline-json="formatPipeline(pipeline)"></div>
        </div>

        <div class="col sidebar-col" ng-class="{closed: !view.showSidebar}">

            <div class="heading">
                <ul class="nav nav-tabs nav-tabs-steps">

                    <li class="toggle-action">
                        <a href ng-click="toggleSidebar()">
                            <i ng-class="{'fa-chevron-right': view.showSidebar, 'fa-chevron-left': !view.showSidebar}" class="fa"></i>
                        </a>
                    </li>

                    <li ng-class="{active: view.tab === 'apps'}"><a href ng-click="switchTab('apps')">Apps</a></li>
                    <li ng-class="{active: view.tab === 'params'}"><a href ng-click="switchTab('params')">Params</a></li>
                    <li ng-class="{active: view.tab === 'json'}"><a href ng-click="switchTab('json')">JSON</a></li>
                </ul>
            </div>

            <div ng-if="view.tab === 'apps'" class="filter">
                <form class="search-form" ng-submit="filterApps()" novalidate>
                    <div class="input-group">
                        <input type="text" class="form-control" ng-model="view.searchTerm" placeholder="Filter Apps" required>
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
                            <a ng-if="!(view.searchTerm | isEmpty)" class="btn btn-default" href ng-click="resetFilter()"><i class="fa fa-ban"></i></a>
                        </span>
                    </div>
                </form>
            </div>

            <div class="content">

                <div class="tabs right" ng-switch="view.tab">

                    <div class="tab" ng-class="{loading: view.filtering}" ng-switch-when="apps">

                        <ul class="app-sidebar-list">
                            <li ng-class="{open: view.groups.my}">
                                <span ng-click="toggleGroup('my')">
                                    <i class="fa" ng-class="{'fa-plus-square': !view.groups.my, 'fa-minus-square': view.groups.my}"></i>
                                    My Repository
                                </span>
                                <ul>
                                    <li ng-if="view.message"><p class="alert alert-warning">{{ view.message }}</p></li>
                                    <li ng-if="!view.message && (view.myRepositories | isEmpty)"><p class="alert alert-info">You don't have any repository yet</p></li>
                                    <li ng-repeat="(repoName, apps) in view.myRepositories" ng-class="{open: view.repoGroups[repoName]}">
                                        <span ng-click="toggleRepo(repoName)">
                                            <i class="fa" ng-class="{'fa-plus-square': !view.repoGroups[repoName], 'fa-minus-square': view.repoGroups[repoName]}"></i>
                                            {{ repoName }}
                                        </span>
                                        <ul class="apps-inner-list">
                                            <li ng-repeat="app in apps">
                                                <div ng-repeat="revision in app.revisions" class="revisions-list">
                                                    <a href drag="revision">
                                                        <i class="fa fa-puzzle-piece"></i>
                                                        {{ app.name }} <small>(revision {{ revision.order }} )</small>
                                                        <div class="pull-right">
                                                            <span ng-if="revision.version && revision.is_public" class="label label-primary"><i class="fa fa-tag"></i> {{ 'v' + revision.version }}</span>
                                                        </div>
                                                    </a>
                                                </div>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>

                            <li ng-class="{open: view.groups.other}">
                                <span ng-click="toggleGroup('other')">
                                    <i class="fa" ng-class="{'fa-plus-square': !view.groups.other, 'fa-minus-square': view.groups.other}"></i>
                                    Other Repositories
                                </span>
                                <ul>
                                    <li ng-if="(view.otherRepositories | isEmpty)"><p class="alert alert-info">There are no other repositories</p></li>
                                    <li ng-repeat="(repoName, apps) in view.otherRepositories" ng-class="{open: view.repoGroups[repoName]}">
                                        <span ng-click="toggleRepo(repoName)">
                                            <i class="fa" ng-class="{'fa-plus-square': !view.repoGroups[repoName], 'fa-minus-square': view.repoGroups[repoName]}"></i>
                                            {{ repoName }}
                                        </span>
                                        <ul class="apps-inner-list">
                                            <li ng-repeat="app in apps">
                                                <div ng-repeat="revision in app.revisions" class="revisions-list">
                                                    <a href drag="revision">
                                                        <i class="fa fa-puzzle-piece"></i>
                                                        {{ app.name }}
                                                        <div class="pull-right">
                                                            <span class="label label-warning"><i class="fa fa-tag"></i> {{ 'v' + revision.version }}</span>
                                                            <span ng-if="view.user.id === app.user && revision.is_public" class="label label-primary">public</span>
                                                        </div>
                                                    </a>
                                                </div>
                                            </li>
                                        </ul><commit_msg>revision version change and saving order<commit_after><div ng-class="view.classes" loading="view.loading">

    <div class="heading">
        <a ng-if="view.mode === 'new'" ng-href="#/pipelines" class="btn btn-default pull-left go-back"><i class="fa fa-chevron-left"></i> Back</a>
        <a ng-if="view.mode === 'edit'" ng-href="#/pipeline/{{ view.pipeline._id }}" class="btn btn-default pull-left go-back"><i class="fa fa-chevron-left"></i> Back</a>
        <h1>
            <div class="form-group workflow-name">
                <span class="pipeline-repo" ng-show="view.pipeline.pipeline.repo">({{view.pipeline.pipeline.repo.owner}}/{{view.pipeline.pipeline.repo.name}}) </span>
                <input ng-show="view.mode === 'new'" type="text" placeholder="Workflow Name" ng-model="view.pipeline.name" class="form-control" />
                <span ng-hide="view.mode === 'new'">{{ view.pipeline.pipeline.name }}</span>
            </div>

            <strong class="changes-mark" ng-if="view.isChanged" tooltip="There are changes in your workflow" tooltip-placement="right">
                (<i class="fa fa-asterisk"></i>)
            </strong>

            <div ng-if="view.user" class="actions pull-right">
                <button ng-if="view.mode === 'edit'" ng-click="fork()" class="btn btn-default" ng-disabled="view.saving" >
                    <i class="fa fa-code-fork"></i> Fork
                </button>
                <button ng-click="save()" class="btn btn-default" ng-disabled="view.saving">
                    <i ng-class="{'fa-plus': view.mode === 'new', 'fa-check': view.mode === 'edit'}" class="fa"></i>
                    {{ view.mode === 'new' ? 'Create' : 'Update' }}
                </button>
                <button ng-if="view.mode === 'edit' && view.user.id === view.pipeline.pipeline.user._id" ng-click="publish()" class="btn btn-primary" ng-disabled="view.saving || view.deleting">
                    <i class="fa fa-plus"></i> Publish
                </button>
                <button ng-if="view.mode === 'edit'" ng-click="delete()" class="btn btn-danger" ng-disabled="view.saving || view.deleting">
                    <i class="fa fa-trash"></i> Delete
                </button>
            </div>

        </h1>
    </div>
    <!-- # .heading -->

    <div ng-if="!view.loading" class="content">

        <div class="col content-col">
            <div pipeline="view.pipeline" edit-mode="true" pipeline-change-fn="onPipelineChange(value)" handle-pipeline-json="formatPipeline(pipeline)"></div>
        </div>

        <div class="col sidebar-col" ng-class="{closed: !view.showSidebar}">

            <div class="heading">
                <ul class="nav nav-tabs nav-tabs-steps">

                    <li class="toggle-action">
                        <a href ng-click="toggleSidebar()">
                            <i ng-class="{'fa-chevron-right': view.showSidebar, 'fa-chevron-left': !view.showSidebar}" class="fa"></i>
                        </a>
                    </li>

                    <li ng-class="{active: view.tab === 'apps'}"><a href ng-click="switchTab('apps')">Apps</a></li>
                    <li ng-class="{active: view.tab === 'params'}"><a href ng-click="switchTab('params')">Params</a></li>
                    <li ng-class="{active: view.tab === 'json'}"><a href ng-click="switchTab('json')">JSON</a></li>
                </ul>
            </div>

            <div ng-if="view.tab === 'apps'" class="filter">
                <form class="search-form" ng-submit="filterApps()" novalidate>
                    <div class="input-group">
                        <input type="text" class="form-control" ng-model="view.searchTerm" placeholder="Filter Apps" required>
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
                            <a ng-if="!(view.searchTerm | isEmpty)" class="btn btn-default" href ng-click="resetFilter()"><i class="fa fa-ban"></i></a>
                        </span>
                    </div>
                </form>
            </div>

            <div class="content">

                <div class="tabs right" ng-switch="view.tab">

                    <div class="tab" ng-class="{loading: view.filtering}" ng-switch-when="apps">

                        <ul class="app-sidebar-list">
                            <li ng-class="{open: view.groups.my}">
                                <span ng-click="toggleGroup('my')">
                                    <i class="fa" ng-class="{'fa-plus-square': !view.groups.my, 'fa-minus-square': view.groups.my}"></i>
                                    My Repository
                                </span>
                                <ul>
                                    <li ng-if="view.message"><p class="alert alert-warning">{{ view.message }}</p></li>
                                    <li ng-if="!view.message && (view.myRepositories | isEmpty)"><p class="alert alert-info">You don't have any repository yet</p></li>
                                    <li ng-repeat="(repoName, apps) in view.myRepositories" ng-class="{open: view.repoGroups[repoName]}">
                                        <span ng-click="toggleRepo(repoName)">
                                            <i class="fa" ng-class="{'fa-plus-square': !view.repoGroups[repoName], 'fa-minus-square': view.repoGroups[repoName]}"></i>
                                            {{ repoName }}
                                        </span>
                                        <ul class="apps-inner-list">
                                            <li ng-repeat="app in apps">
                                                <div ng-repeat="revision in app.revisions" class="revisions-list">
                                                    <a href drag="revision">
                                                        <i class="fa fa-puzzle-piece"></i>
                                                        {{ app.name }} <small>(revision {{ revision.order }} )</small>
                                                        <div class="pull-right">
                                                            <span ng-if="revision.version && revision.is_public" class="label label-primary"><i class="fa fa-tag"></i> {{ 'v' + revision.version }}</span>
                                                        </div>
                                                    </a>
                                                </div>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>

                            <li ng-class="{open: view.groups.other}">
                                <span ng-click="toggleGroup('other')">
                                    <i class="fa" ng-class="{'fa-plus-square': !view.groups.other, 'fa-minus-square': view.groups.other}"></i>
                                    Other Repositories
                                </span>
                                <ul>
                                    <li ng-if="(view.otherRepositories | isEmpty)"><p class="alert alert-info">There are no other repositories</p></li>
                                    <li ng-repeat="(repoName, apps) in view.otherRepositories" ng-class="{open: view.repoGroups[repoName]}">
                                        <span ng-click="toggleRepo(repoName)">
                                            <i class="fa" ng-class="{'fa-plus-square': !view.repoGroups[repoName], 'fa-minus-square': view.repoGroups[repoName]}"></i>
                                            {{ repoName }}
                                        </span>
                                        <ul class="apps-inner-list">
                                            <li ng-repeat="app in apps">
                                                <div ng-repeat="revision in app.revisions" class="revisions-list">
                                                    <a href drag="revision">
                                                        <i class="fa fa-puzzle-piece"></i>
                                                        {{ app.name }} <small>(revision {{ revision.order }} )</small>
                                                        <div class="pull-right">
                                                            <span ng-if="revision.version && revision.is_public" class="label label-primary"><i class="fa fa-tag"></i> {{ 'v' + revision.version }}</span>
                                                        </div>
                                                    </a>
                                                </div>
                                            </li>
                                        </ul>
{'fraction_non_alphanumeric': 0.1561176732783597, 'fraction_numerical': 0.00022286605749944285, 'mean_word_length': 1.1766917293233083, 'pattern_counts': {'":': 0, '<': 333, '<?xml version=': 0, '>': 333, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 146, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5308718', 'n_tokens_mistral': 4443, 'n_tokens_neox': 4250, 'n_words': 817}